LINE Bot MCP Server

Connects an AI agent to a LINE Official Account to send messages and manage rich menus

Official · LINE TypeScript Local · stdio CommunicationCRM and sales

76 popularity score ★ 797 ↓ 2.6k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs CHANNEL_ACCESS_TOKEN. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add line-bot -e CHANNEL_ACCESS_TOKEN=<CHANNEL_ACCESS_TOKEN> -- npx -y @line/line-bot-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "line-bot": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.line-bot]
command = "npx"
args = ["-y", "@line/line-bot-mcp-server"]

[mcp_servers.line-bot.env]
CHANNEL_ACCESS_TOKEN = "<CHANNEL_ACCESS_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e CHANNEL_ACCESS_TOKEN=<CHANNEL_ACCESS_TOKEN> line-bot npx -- -y @line/line-bot-mcp-server
Local (container)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs CHANNEL_ACCESS_TOKEN. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/line/line-bot-mcp-server.git
cd line-bot-mcp-server
docker build -t line/line-bot-mcp-server .
Claude CodeTerminal
claude mcp add line-bot -e CHANNEL_ACCESS_TOKEN=<CHANNEL_ACCESS_TOKEN> -- docker run -i --rm -e CHANNEL_ACCESS_TOKEN line/line-bot-mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "line-bot": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CHANNEL_ACCESS_TOKEN",
        "line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "line-bot": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CHANNEL_ACCESS_TOKEN",
        "line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "line-bot": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CHANNEL_ACCESS_TOKEN",
        "line/line-bot-mcp-server"
      ],
      "env": {
        "CHANNEL_ACCESS_TOKEN": "<CHANNEL_ACCESS_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.line-bot]
command = "docker"
args = ["run", "-i", "--rm", "-e", "CHANNEL_ACCESS_TOKEN", "line/line-bot-mcp-server"]

[mcp_servers.line-bot.env]
CHANNEL_ACCESS_TOKEN = "<CHANNEL_ACCESS_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e CHANNEL_ACCESS_TOKEN=<CHANNEL_ACCESS_TOKEN> line-bot docker -- run -i --rm -e CHANNEL_ACCESS_TOKEN line/line-bot-mcp-server

Settings 5

CHANNEL_ACCESS_TOKEN Required: Channel access token of the LINE Official Account's Messaging API channel; the server exits without it.
DESTINATION_USER_ID Optional: Default user ID for push and profile tools when no userId is passed.
NPM_CONFIG_IGNORE_SCRIPTS Optional: Set to true in the README's npx example so npm skips package install scripts.
PUPPETEER_EXECUTABLE_PATH Optional: Path to Chrome or Chromium used by create_rich_menu to render menu images.
LINE_MESSAGING_API_BASE_URL Optional: Overrides the Messaging API base URL; not in the README.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

LINE Bot MCP Server is LINE's own bridge between an AI agent and the LINE Messaging API. It runs on your machine over stdio and acts as one LINE Official Account, identified by that channel's access token. Through it an agent can send plain text or Flex (JSON layout) messages to a single user or broadcast them to every follower, look up a user's profile, list follower IDs, check how much of the monthly message quota is used, and list, create, delete or set the default rich menu (the tappable menu under a chat).

The create_rich_menu tool does more than call the API: it renders a menu image from up to six actions with Marp and a headless Chromium through Puppeteer, uploads it and makes the new menu the default. A default recipient can be set with DESTINATION_USER_ID so push and profile tools work without naming a user each time.

The release on npm (0.5.0) registers 12 tools (src/index.ts at tag v0.5.0). The README lists a 13th, get_group_summary, which so far exists only on the main branch. The code also reads LINE_MESSAGING_API_BASE_URL to point the client at another API base URL, a setting the README does not mention. LINE marks the project as a preview offered for experimental use that may lack complete functionality or support.

What it needs

RuntimeNode.js 22+orDocker

Node.js 22 or later for the npx way, or Docker for the image you build yourself from the repository. A LINE Official Account with the Messaging API enabled, and its channel access token. create_rich_menu needs a Chrome or Chromium that Puppeteer can launch; the README's npx snippet skips install scripts, so set PUPPETEER_EXECUTABLE_PATH to an installed browser (the Docker image ships Chromium).

Limits

Version 0.5.0 has 12 tools; get_group_summary is on main but not yet released. It reads no incoming chats: there is no webhook, so it cannot see what users send the account. create_rich_menu takes 1 to 6 actions and always sets the new menu as the default. Messages count against the account's LINE message quota. The makers call it a preview for experimental use without complete functionality or support. The Docker image is not published; you build it from a clone.

Who it suits

Suits someone who runs a LINE Official Account and wants an agent to send announcements or one-to-one pushes, check quota and manage rich menus from a desktop client. Because it can broadcast to every follower with one call, it fits a test account or close supervision better than unattended use. It does not fit anyone who needs the agent to read and answer incoming user messages, since it has no webhook, or who needs a personal LINE account rather than a business one.

Tools 12

push_text_message
Send a plain text message to one user (DESTINATION_USER_ID unless userId is given).
push_flex_message
Send a Flex layout message with alt text to one user.
broadcast_text_message
Send a plain text message to every follower of the account.
broadcast_flex_message
Send a Flex layout message to every follower of the account.
get_profile
Fetch a user's display name, picture URL, status message and language.
get_message_quota
Show the monthly message limit and how much has been used.
get_rich_menu_list
List the account's rich menus.
delete_rich_menu
Remove a rich menu by its ID.
set_rich_menu_default
Make a given rich menu the default for all users.
cancel_rich_menu_default
Clear the default rich menu.
create_rich_menu
Render an image from 1-6 actions, create and upload the menu, and set it as default.
get_follower_ids
Page through the user IDs of the account's followers.

Similar servers