agenza-line-bot-mcp
v0.0.9
Published
MCP server for interacting with LINE Official Account (Core features only - optimized for low memory)
Readme
LINE Bot MCP Server (Custom - Core Edition)
Note: This is a customized fork from https://github.com/line/line-bot-mcp-server
⚡ Optimized for low memory usage - Rich menu tools disabled by default
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.
Tools (Core Edition)
Available Tools:
- push_text_message - Push a simple text message to a user via LINE.
- push_flex_message - Push a highly customizable flex message to a user via LINE.
- get_profile - Get detailed profile information of a LINE user.
- get_message_quota - Get the message quota and consumption of the LINE Official Account.
Disabled Tools (to reduce memory usage):
- broadcast_text_message
- broadcast_flex_message
- get_rich_menu_list
- delete_rich_menu
- set_rich_menu_default
- cancel_rich_menu_default
- create_rich_menu (uses puppeteer - heavy memory usage)
If you need rich menu features, consider using them via LINE Messaging API directly or enable them manually in
src/index.ts
Installation (Using npx)
requirements:
- Node.js v20 or later
Step 1: Create LINE Official Account
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.
Step 2: Configure AI Agent
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 includeuserId,DESTINATION_USER_IDis required. You can confirm this by following this instructions.
Note: Since this is a custom fork, you'll need to clone and build locally instead of using npx with the official package.
{
"mcpServers": {
"line-bot": {
"command": "node",
"args": [
"YOUR_PATH/line-bot-mcp-server/dist/index.js"
],
"env": {
"CHANNEL_ACCESS_TOKEN" : "FILL_HERE",
"DESTINATION_USER_ID" : "FILL_HERE"
}
}
}
}Installation (Using Docker)
Step 1: Create LINE Official Account
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.
Step 2: Build line-bot-mcp-server image
Clone this custom repository:
git clone https://github.com/YOUR_USERNAME/line-bot-mcp-server.gitBuild the Docker image:
docker build -t custom/line-bot-mcp-server .Step 3: Configure AI Agent
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 toline-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 includeuserId,DESTINATION_USER_IDis 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",
"custom/line-bot-mcp-server"
],
"env": {
"CHANNEL_ACCESS_TOKEN" : "FILL_HERE",
"DESTINATION_USER_ID" : "FILL_HERE"
}
}
}
}Local Development with Inspector
You can use the MCP Inspector to test and debug the server locally.
Prerequisites
- Clone the repository:
git clone https://github.com/Mbiz-consultant/line-bot-mcp
cd line-bot-mcp-server- Install dependencies:
npm install- Build the project:
npm run buildRun the Inspector
After building the project, you can start the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js \
-e CHANNEL_ACCESS_TOKEN="YOUR_CHANNEL_ACCESS_TOKEN" \
-e DESTINATION_USER_ID="YOUR_DESTINATION_USER_ID"This will start the MCP Inspector interface where you can interact with the LINE Bot MCP Server tools and test their functionality.
Versioning
This project respects semantic versioning
See http://semver.org/
Contributing
Please check CONTRIBUTING before making a contribution.
