Are you ready to connect your AI to the world of LINE? Let’s dive into the LINE MCP server, a super cool tool that bridges your AI agents with LINE’s Messaging API. In this tutorial, I’ll break down what the LINE MCP server is, why it’s awesome, and how to set it up. Grab a coffee, ready up your local machine and let’s get working in a fun, conversational vibe!
Want an integrated, All-in-One platform for your Developer Team to work together with maximum productivity?
Apidog delivers all your demands, and replaces Postman at a much more affordable price!
What Is LINE and Its Messaging API?
If you’re new to LINE, it’s a mega-popular messaging app, especially in Asia, with millions of users chatting, sharing, and connecting daily. LINE’s Messaging API lets developers build chatbots and services that interact with users through LINE Official Accounts. Think of it as a way to create smart, interactive bots that can send messages, handle user queries, or even broadcast updates.
The LINE MCP server takes this to the next level by letting AI agents—like Claude or Gemini—control your LINE bot using natural language prompts. It’s like giving your AI the keys to your LINE account to create seamless, engaging user experiences!

Meet the LINE MCP Server
The LINE MCP server is an open-source tool from LINE that connects AI agents to the LINE Messaging API via the Model Context Protocol (MCP). MCP is like a universal plug (think USB-C for AI) that standardizes how AI systems access tools and data. With the LINE MCP server, your AI can:
- Send and receive messages through a LINE Official Account.
- Create Flex Messages for rich, interactive content.
- Broadcast messages to multiple users.
- Fetch user profile info, like display names or profile pictures.
It’s still in trial mode, so it supports a subset of Messaging API features, but it’s already powerful for building AI-driven chatbots.
Why You’ll Love the LINE MCP Server
Here’s why the LINE MCP server is a game-changer:
- AI-Powered Chats: Let your AI handle conversations using natural language, making your bot feel human.
- Less Coding Hassle: Skip complex API integrations and focus on designing awesome user experiences.
- Rich Features: Create dynamic messages, broadcast updates, or pull user data with ease.
- Open-Source Goodness: Customize and extend it via GitHub.
Installing the LINE MCP Server with Claude Desktop
Prerequisites
Before we jump in, ensure you have:
- Node.js 20+: Required for the
npx
installation method (nodejs.org/en/download). - Docker: Required for the Docker installation method (docker.com/get-started).
- LINE Official Account: Set up via LINE Developers Console.
- LINE Channel Access Token: From your Messaging API channel (Messaging API tab).
- LINE Destination User ID: Optional, but required if the tool’s input doesn’t specify a
user_id
(check User ID in LINE Console). - Claude Desktop: We’ll install this as part of the steps.
- A GitHub account (for Docker method) to clone the repo.
Installation Option 1: Using npx
Step 1: Create LINE Official Account
- Head to the LINE Developers Console.
- Create a Provider (e.g., “MyBotTeam”) if you don’t have one.
- Create a Messaging API channel and note down the Channel Access Token (issue it under the Messaging API tab).
- Enable the webhook in your channel (you’ll set the URL later).


Step 2: Install Claude Desktop
Download and install Claude Desktop from claude.ai/download, available for macOS and Windows. Once installed:
- Open Claude Desktop and click Get Started.
- Log in with your Claude account or sign in with a Google account.

Step 3: Configure the LINE MCP Server for Claude Desktop
Set up Claude Desktop to connect to the LINE MCP server:
- Open Claude Desktop and go to Settings (gear icon).

2. Select the Developer tab and click Edit Config. This opens the folder containing the config file.

3. Locate or create claude_desktop_config.json
and add:
{
"mcpServers": {
"line-bot": {
"command": "npx",
"args": ["@line/line-bot-mcp-server"],
"env": {
"CHANNEL_ACCESS_TOKEN": "FILL_HERE",
"DESTINATION_USER_ID": "FILL_HERE"
}
}
}
}
4. Replace FILL_HERE
with your Channel Access Token and Destination User ID (if needed).
5. Save the file and restart Claude Desktop by closing and reopening it.

Installation Option 2: Using Docker
Step 1: Create LINE Official Account
Follow the same steps as in the npx
method to set up your LINE Official Account and obtain the Channel Access Token and Destination User ID.
Step 2: Build the LINE Bot MCP Server Image

Clone the repository and build the Docker image:
git clone git@github.com:line/line-bot-mcp-server.git
cd line-bot-mcp-server
docker build -t line/line-bot-mcp-server .
This creates a Docker image for the LINE MCP server.
Step 3: Configure the LINE MCP Server for Claude Desktop
Set up Claude Desktop to connect to the Dockerized LINE MCP server:
- Open Claude Desktop and go to Settings (gear icon).
- Select the Developer tab and click Edit Config.
- Locate or create
claude_desktop_config.json
and add:
{
"mcpServers": {
"line-bot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CHANNEL_ACCESS_TOKEN",
"-e",
"DESTINATION_USER_ID",
"line/line-bot-mcp-server"
],
"env": {
"CHANNEL_ACCESS_TOKEN": "FILL_HERE",
"DESTINATION_USER_ID": "FILL_HERE"
}
}
}
}
- Replace
FILL_HERE
with your Channel Access Token and Destination User ID (if needed). - Save the file and restart Claude Desktop.

Test Line Mcp Server with Prompt Examples
Now, let’s try some prompts in Claude Desktop to see the LINE MCP server in action! Here are four use-case examples (unchanged from the previous article):
1. Send a Text Message
Prompt:
Send LINE message to user say "I love you MCP"

Claude will send a text message to your LINE user saying “I love you MCP” via the LINE MCP server.
2. Get LINE User Profile and Send Flex Message
Prompt:
Get user profile and create beautiful Flex message and send to user

Claude will fetch the user’s profile (e.g., display name, picture) and send a personalized Flex Message with a hero image, greeting, and status message.
Troubleshooting Tips
- Webhook Issues? Verify the ngrok URL and ensure the webhook is enabled in the LINE Console.
- Server Not Starting? Check Node.js (for
npx
) or Docker installation and ensure environment variables are correct. - Claude Not Connecting? Confirm the
claude_desktop_config.json
settings and restart Claude Desktop. - npx/Docker Errors? Ensure
npx
or Docker is installed and accessible in your PATH.
How the LINE MCP Server Powers AI Workflows
The LINE MCP server makes your LINE bot an AI-powered conversational superstar. Here’s how it shines:
- Seamless AI Integration: Your AI can send messages, create Flex Messages, or fetch user data without complex coding.
- User-Friendly Prompts: Users or AI can control the bot with natural language, like “Broadcast a sale alert!”
- Scalable Design: Run it locally for testing or deploy it to a cloud server for production.
- Trial Features: Currently supports messaging, user profile retrieval, and broadcasting, with more to come.
For example, you could build a bot that lets users ask, “What’s my profile name?” and the AI fetches it via the LINE MCP Server, or broadcast a promo to all followers with a single prompt. The possibilities are endless!
Conclusion
And that’s a wrap! The LINE MCP server is your ticket to creating AI-driven LINE chatbots that are smart, engaging, and easy to build. By connecting your AI agents to LINE’s Messaging API, you’re opening up a world of interactive possibilities for your users. Whether you’re a seasoned developer or just starting out, this tool makes AI integration a breeze.
Want an integrated, All-in-One platform for your Developer Team to work together with maximum productivity?
Apidog delivers all your demands, and replaces Postman at a much more affordable price!