Open-source project
line/line-bot-mcp-server avatar
line/line-bot-mcp-server

line-bot-mcp-server: Driving a LINE Official Account from an AI Agent

MCP server that integrates the LINE Messaging API to connect an AI Agent to the LINE Official Account.

782 stars152 forksTypeScriptApache-2.0

At a glance

What is it?
LINE's official MCP server exposes Messaging API operations as agent tools, so Claude Desktop or Cline can push messages, manage rich menus and read follower IDs. It is a preview release, and the README says so.
Who is it for?
Adopt it if you already run a LINE Official Account and want an agent to push text or flex messages and manage rich menus without writing Messaging API calls yourself. Skip it if you need inbound webhook handling, batch delivery, or a stable API surface, since the repository is labelled a preview.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The gap line-bot-mcp-server fills between an agent and a LINE Official Account

An LLM agent can draft a message. It cannot, by itself, call the LINE Messaging API, because that requires a channel access token, an HTTP client and a set of endpoints the model does not know about. The usual fix is to write a small service that wraps each Messaging API call and expose it to the agent as a function. line-bot-mcp-server is that wrapper, published by LINE itself under the @line scope on npm.

The intended user is someone who already operates a LINE Official Account and wants an agent to act on it: sending a text message to one user, broadcasting a flex message to every follower, reading a profile, or creating a rich menu. The repository describes it as an MCP server implementation that integrates the LINE Messaging API with an AI Agent. It is not a bot framework. There is no webhook receiver here, so the agent can send and inspect but cannot react to incoming messages on its own.

Thirteen tools, one token, and where the state actually lives

The mechanism is deliberately thin. The server runs as a local process launched by the MCP client, holds a CHANNEL_ACCESS_TOKEN in its environment, and translates each tool call into a Messaging API request through @line/bot-sdk. The README lists thirteen tools: push_text_message, push_flex_message, broadcast_text_message, broadcast_flex_message, get_profile, get_message_quota, get_rich_menu_list, delete_rich_menu, set_rich_menu_default, cancel_rich_menu_default, create_rich_menu, get_follower_ids and get_group_summary.

The design choice worth noticing is how recipient resolution works. push_text_message and push_flex_message both take an optional userId. When it is absent, the server falls back to the DESTINATION_USER_ID environment variable. That means one deployment is effectively pinned to one default recipient unless the agent passes an ID explicitly. For a personal assistant that is convenient. For anything multi-tenant it is a footgun, because a tool call that omits userId silently goes to the configured default.

create_rich_menu is the heaviest tool. The README says it creates a rich menu from the given actions, generates and uploads an image, and sets it as default. That explains the dependency list: puppeteer and @marp-team/marp-core are present in package.json, and the Dockerfile installs Chromium plus Noto Sans JP and IPAex Gothic fonts. Rendering a rich menu image needs a headless browser and CJK fonts, which is why the container image is much larger than a plain Node runtime. It also means create_rich_menu is the tool most likely to fail in a constrained environment, since it needs a working Chromium and a font cache.

State does not live in the server. Rich menus, follower lists and message quota all live on LINE's side; the server is stateless between calls. get_follower_ids returns a next continuation token that you pass back as start to page through the list, so pagination is the caller's responsibility.

Installing line-bot-mcp-server with npx and sending a first message

The README requires Node.js v22 or later, and package.json enforces the same with an engines field of >=22. Before anything runs, you need a LINE Official Account with the Messaging API enabled, and a long-lived channel access token.

The npx path is the short one. Add this block to your MCP client configuration, for example Claude Desktop or Cline, and replace the two placeholders with the channel access token and the recipient user ID.

json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "@line/line-bot-mcp-server"
      ],
      "env": {
        "NPM_CONFIG_IGNORE_SCRIPTS": "true",
        "CHANNEL_ACCESS_TOKEN": "FILL_HERE",
        "DESTINATION_USER_ID": "FILL_HERE"
      }
    }
  }
}

After restarting the client, the thirteen tools should appear in its tool list. The first call worth making is get_message_quota, because it takes no inputs and tells you the monthly limit and current consumption for the account. If that returns a sane number, the token is valid and the server is talking to LINE.

Then send something. A prompt such as "push the text 'hello from the agent' to my default user" should invoke push_text_message with message.text set and no userId, which routes to DESTINATION_USER_ID. The recipient should see a plain LINE message.

If you would rather build the image yourself, the README's Docker route starts by cloning the repository and building the image from the Dockerfile at the root. The Dockerfile is a two-stage build on node:24-alpine, installs Chromium and the CJK fonts, and runs as a non-root appuser. Note that the Dockerfile sets PUPPETEER_EXECUTABLE_PATH to /usr/bin/chromium-browser, so if you adapt it, keep that path consistent with whatever Chromium package you install.

What the preview label actually costs you

The README carries a note that the repository is provided as a preview version, offered for experimental purposes, and may not include complete functionality or comprehensive support. Take that at face value: this is a server whose tool surface changed between releases, with v0.4.0 adding the create_rich_menu tool and v0.5.0 adding get_follower_ids.

The most concrete limitation is the absence of inbound messaging. A LINE bot normally receives webhooks when users send messages, follow the account, or tap postback actions. None of the thirteen tools covers that. An agent built on this server can push and inspect, but it cannot hold a conversation that depends on what the user just typed. If your use case is a support bot that answers questions, this is the wrong layer; you need a webhook endpoint plus your own handler, and this server may sit alongside it rather than replace it.

Two smaller constraints matter in practice. Broadcast tools target every follower of the account, and there is no dry-run or audience filter in the documented inputs, so a mistaken broadcast reaches the whole list. And the recipient fallback described earlier means a missing userId is not an error; it is a redirect to the default user. Neither is a bug, but both reward careful prompting.

Finally, the README does not document rollback for rich menu changes. delete_rich_menu and cancel_rich_menu_default exist, but recovering a previous menu layout after create_rich_menu overwrites the default is something you would have to arrange yourself, by exporting the menu definitions before you change them.

line-bot-mcp-server versus calling the Messaging API through a general HTTP tool

The obvious alternative is not another MCP server. It is giving the agent a generic HTTP fetch tool and letting it call the Messaging API directly, or writing a handful of custom functions in your own agent framework.

The difference is where the knowledge sits. With a generic HTTP tool, the agent has to construct the right endpoint, headers and JSON body for every operation, and it will get some of them wrong. With line-bot-mcp-server, that knowledge is encoded in typed tool schemas: push_flex_message expects message.altText, message.contents and a contents.type of either bubble or carousel, and the schema rejects anything else. The trade-off is coverage. A generic HTTP tool can call any Messaging API endpoint, including ones this server does not wrap, such as webhook configuration or audience management. You get correctness on thirteen operations instead of reach across all of them.

A second comparison is against the LINE Bot SDKs themselves. @line/bot-sdk, which this server depends on, is the right choice when you are writing the application logic yourself and want full control over error handling and retries. line-bot-mcp-server is for the case where the caller is a model, not a developer, and you want the model constrained to a fixed set of safe operations.

Maintenance, licence and the upgrade path

The repository is not archived, and the last push was on 2026-09-10, which is recent. Releases are infrequent rather than continuous: v0.4.0 and v0.4.2 landed in November 2025, and v0.5.0 in May 2026. The v0.4.2 title, "Fix Create Richmenu Tool via npx", is a reminder that the npx distribution path has had its own bugs separate from the library code.

Upgrading is cheap if you use npx, because the client configuration pins no version and will resolve whatever is current on npm at launch. That is also the risk: an unpinned npx invocation can pick up a new release without you changing anything. If you want reproducibility, pin the version in the args array rather than relying on the default.

The licence is Apache-2.0, which permits commercial use and modification and requires that you preserve the licence and notice files. The repository ships a LICENSE file at the root. That is a summary of the licence text, not legal advice; read the file itself if you are redistributing the server inside a product.

Operationally, the recurring cost is the channel access token. It is a long-lived credential placed in a client configuration file, so it inherits whatever protection that file has. Rotating it means editing every client that references it.

Editorial conclusion

Adopt it if you already run a LINE Official Account and want an agent to push text or flex messages and manage rich menus without writing Messaging API calls yourself. Skip it if you need inbound webhook handling, batch delivery, or a stable API surface, since the repository is labelled a preview. Before wiring it into anything shared, verify that your channel access token is a long-lived one, that DESTINATION_USER_ID resolves to the right recipient, and that get_message_quota reports enough monthly headroom for the volume your agent will generate.

Frequently asked questions

What does the line-bot-mcp-server MCP server do?

It runs as a local MCP server that exposes thirteen LINE Messaging API operations as tools, so an AI agent can push or broadcast text and flex messages, read a user profile, check message quota, and create, list, set or delete rich menus.

What is a LINE bot, and do I need a LINE Official Account for this server?

The README states that the server utilizes a LINE Official Account and links to LINE's instructions for creating one and enabling the Messaging API on it. Without an account and a channel access token, the server has nothing to authenticate against.

Is the LINE API free to use with line-bot-mcp-server?

The README does not state pricing. The closest thing is the get_message_quota tool, which the README describes as returning the monthly message limit and current usage for the LINE Official Account, so the account itself carries a message allowance you can query.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. line/line-bot-mcp-server on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/line-line-bot-mcp-server.svg)](https://hysenlabs.com/projects/line-line-bot-mcp-server)