by line
Enables AI agents to send, receive, and manage various LINE messages and rich menus through the LINE Messaging API.
The server acts as a bridge between an AI agent (e.g., Claude Desktop, Cline) and a LINE Official Account, exposing a set of tools that let the agent push text or flex messages, broadcast to all followers, retrieve user profiles, manage message quotas, and handle rich menus.
CHANNEL_ACCESS_TOKEN
– long‑lived token for your LINE channel.DESTINATION_USER_ID
– default recipient ID (optional, but needed if the tool call does not supply user_id
).npx
(or Docker) as shown in the configuration example.mcpServers
so the agent can invoke the exposed tools.Q: Do I need to install anything besides Node.js?
A: No. With Node.js v20+ you can run the server directly using npx @line/line-bot-mcp-server
.
Q: Can I run the server without a Docker container?
A: Yes. The recommended approach is the npx
command; Docker is optional for isolated environments.
Q: What happens if I omit DESTINATION_USER_ID
?
A: The tool will require a user_id
in each call; otherwise it will return an error indicating the missing default recipient.
Q: Are there limits on the number of messages I can send?
A: The get_message_quota
tool shows your monthly quota and current consumption as defined by LINE’s Messaging API limits.
Q: How do I debug tools locally?
A: Use the MCP Inspector: npx @modelcontextprotocol/inspector node dist/index.js
to interactively test each tool.
Model Context Protocol (MCP) server implementation that integrates the LINE Messaging API to connect an AI Agent to the LINE Official Account.
[!NOTE] This repository is provided as a preview version. While we offer it for experimental purposes, please be aware that it may not include complete functionality or comprehensive support.
user_id
(string?): The user ID to receive a message. Defaults to DESTINATION_USER_ID. Either user_id
or DESTINATION_USER_ID
must be set.message.text
(string): The plain text content to send to the user.user_id
(string?): The user ID to receive a message. Defaults to DESTINATION_USER_ID. Either user_id
or DESTINATION_USER_ID
must be set.message.altText
(string): Alternative text shown when flex message cannot be displayed.message.content
(any): The content of the flex message. This is a JSON object that defines the layout and components of the message.message.contents.type
(enum): Type of the container. 'bubble' for single container, 'carousel' for multiple swipeable bubbles.message.text
(string): The plain text content to send to the users.message.altText
(string): Alternative text shown when flex message cannot be displayed.message.content
(any): The content of the flex message. This is a JSON object that defines the layout and components of the message.message.contents.type
(enum): Type of the container. 'bubble' for single container, 'carousel' for multiple swipeable bubbles.user_id
(string?): The ID of the user whose profile you want to retrieve. Defaults to DESTINATION_USER_ID.richMenuId
(string): The ID of the rich menu to delete.richMenuId
(string): The ID of the rich menu to set as default.requirements:
This MCP server utilizes a LINE Official Account. If you do not have one, please create it by following this instructions.
If you have a LINE Official Account, enable the Messaging API for your LINE Official Account by following this instructions.
Please add the following configuration for an AI Agent like Claude Desktop or Cline.
Set the environment variables or arguments as follows:
CHANNEL_ACCESS_TOKEN
: (required) Channel Access Token. You can confirm this by following this instructions.DESTINATION_USER_ID
: (optional) The default user ID of the recipient. If the Tool's input does not include user_id
, DESTINATION_USER_ID
is required. You can confirm this by following this instructions.{
"mcpServers": {
"line-bot": {
"command": "npx",
"args": [
"@line/line-bot-mcp-server"
],
"env": {
"CHANNEL_ACCESS_TOKEN" : "FILL_HERE",
"DESTINATION_USER_ID" : "FILL_HERE"
}
}
}
}
This MCP server utilizes a LINE Official Account. If you do not have one, please create it by following this instructions.
If you have a LINE Official Account, enable the Messaging API for your LINE Official Account by following this instructions.
Clone this repository:
git clone git@github.com:line/line-bot-mcp-server.git
Build the Docker image:
docker build -t line/line-bot-mcp-server .
Please add the following configuration for an AI Agent like Claude Desktop or Cline.
Set the environment variables or arguments as follows:
mcpServers.args
: (required) The path to line-bot-mcp-server
.CHANNEL_ACCESS_TOKEN
: (required) Channel Access Token. You can confirm this by following this instructions.DESTINATION_USER_ID
: (optional) The default user ID of the recipient. If the Tool's input does not include user_id
, DESTINATION_USER_ID
is required.
You can confirm this by following this instructions.{
"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"
}
}
}
}
You can use the MCP Inspector to test and debug the server locally.
git clone git@github.com:line/line-bot-mcp-server.git
cd line-bot-mcp-server
npm install
npm run build
After building the project, you can start the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js
This will start the MCP Inspector interface where you can interact with the LINE Bot MCP Server tools and test their functionality.
This project respects semantic versioning
Please check CONTRIBUTING before making a contribution.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "line-bot": { "command": "npx", "args": [ "@line/line-bot-mcp-server" ], "env": { "CHANNEL_ACCESS_TOKEN": "<YOUR_CHANNEL_ACCESS_TOKEN>", "DESTINATION_USER_ID": "<YOUR_DESTINATION_USER_ID>" } } } }
Discover more MCP servers with similar functionality and use cases
by EnesCinr
twitter-mcp is a Model Context Protocol (MCP) server that enables interaction with Twitter, allowing users to post tweets and search for tweets programmatically.
by chaindead
Manage Telegram dialogs, messages, drafts, and read statuses through an MCP server, enabling AI assistants to interact with Telegram seamlessly.
by trypeggy
instagram_dm_mcp is a Model Context Protocol (MCP) server that enables sending Instagram Direct Messages from your account. It allows integration with large language models (LLMs) to automate Instagram messaging and other interactions.
by vidhupv
x-mcp is an MCP server that allows users to create, manage, and publish X/Twitter posts directly through Claude chat.
by ertiqah
Enables GPT‑powered assistants to tap into a user's public LinkedIn activity, allowing automatic post creation, performance analysis, and voice‑consistent rewrites directly from Claude or ChatGPT.
by metricool
mcp-metricool is a Multi-Agent Collaboration Protocol (MCP) server that integrates with Metricool's social media analytics platform, enabling AI agents to access and analyze social media metrics, campaign data, and schedule content across various networks.
by sinjab
Extracts YouTube video metadata and transcripts via an MCP server with comprehensive logging and robust error handling.
by universal-mcp
A Universal MCP server for interacting with Reddit posts, comments, and subreddits.
by netdata
Real-time, per‑second infrastructure monitoring platform that provides instant insights, auto‑discovery, edge‑based machine‑learning anomaly detection, and lightweight visualizations without requiring complex configuration.