SuperAPI AI Directory

line-bot-mcp-server

line-bot-mcp-server is the Model Context Protocol (MCP) server implementation officially provided by LINE, used to connect the LINE Messaging API with AI Agents, enabling AI agents to interact with a LINE Official Account. It provides tools such as pushing text messages, pushing highly customizable Flex messages, broadcasting messages to all friends, getting user profiles, querying message quotas, managing Rich Menus, getting friend ID lists, and getting group chat summaries. This repository is currently in preview version, and the official description states that it is intended for experimental use and may not include complete functionality or comprehensive support.

Open website

About this tool

Purpose

line-bot-mcp-server is a Model Context Protocol (MCP) server implementation that integrates the LINE Messaging API to connect AI Agents to a LINE Official Account. It enables AI agents to perform operations such as message pushing, account information queries, and Rich Menu management with the LINE platform through MCP tool calls.

Main Capabilities (MCP Tools)

  • push_text_message: Push a simple text message to a user. Input userId (optional, defaults to DESTINATION_USER_ID; one of userId or DESTINATION_USER_ID must be set) and message.text (plain text content).
  • push_flex_message: Push a highly customizable Flex message to a user. Input userId (optional), message.altText (alternative text when the Flex message cannot be displayed), message.contents (a JSON object defining the message layout and components), message.contents.type (container type, bubble for a single container, carousel for multiple swipeable bubbles).
  • broadcast_text_message: Broadcast a simple text message to all users following the LINE Official Account. Input message.text.
  • broadcast_flex_message: Broadcast a highly customizable Flex message to all users who have added the LINE Official Account. Input message.altText and message.contents (including type).
  • get_profile: Get detailed LINE user profile information, including display name, avatar URL, status message, and language. Input userId (optional, defaults to DESTINATION_USER_ID).
  • get_message_quota: Get the message quota and consumption status of the LINE Official Account, showing the monthly message limit and current usage. No input.
  • get_rich_menu_list: Get the list of Rich Menus associated with the LINE Official Account.No input.
  • delete_rich_menu: Delete a rich menu from the LINE Official Account. Input richMenuId.
  • set_rich_menu_default: Set a rich menu as the default rich menu. Input richMenuId.
  • cancel_rich_menu_default: Cancel the default rich menu. No input.
  • create_rich_menu: Create a rich menu based on the given operations, generate and upload the image, and set it as the default. Input chatBarText (the text displayed in the chat bar, also used as the rich menu name) and actions (an array of rich menu actions, minimum 1 and maximum 6). Each action can be one of the following types: postback (send a postback action), message (send a text message), uri (open a URL), datetimepicker (open a date/time picker), camera (open the camera), cameraRoll (open the camera roll), location (send the current location), richmenuswitch (switch to another rich menu), clipboard (copy text to the clipboard).
  • get_follower_ids: Get the list of user IDs of users who have added the LINE Official Account as a friend, making it easy to send messages without manual preparation. Input start (optional, continuation token, used to get the next batch of user IDs, returned by the next property in the previous response) and limit (optional, the maximum number of user IDs to get in a single request).
  • get_group_summary: Use a group ID to get a group chat summary, including the group ID, group name, and group icon URL. Input groupId.

Usage

Install via npx: requires Node.js v22 or higher. Step 1: Create a LINE Official Account; if you do not have one, create it according to the official instructions. If you already have an account, enable the Messaging API for it according to the instructions. Step 2: Configure the AI Agent, add configuration for an AI Agent such as Claude Desktop or Cline, and set environment variables or parameters: CHANNEL_ACCESS_TOKEN (required, channel access token), DESTINATION_USER_ID (optional, default recipient user ID; if the tool inputdoes not include userId, then DESTINATION_USER_ID must be set).

Install via Docker: Step 1 build the line-bot-mcp-server image, first clone the repository, then build the Docker image. Step 2 configure the AI Agent, mcpServers.args (required) is the path to line-bot-mcp-server.

Local development and debugging: You can use MCP Inspector to test and debug the server locally. First clone the repository, install dependencies, build the project, and then run the Inspector. After the build is complete, you can start MCP Inspector, interact with the LINE Bot MCP Server tools in the interface, and test the functionality.

Applicable Scenarios and Limitations

Suitable for developer scenarios that require an AI Agent to interact with a LINE Official Account via MCP, such as message pushing, broadcasting, user profile queries, quota viewing, rich menu management, and group chat summary retrieval. The repository is provided as a preview version, and the official description states that it is for experimental use and may not include complete functionality or comprehensive support. The project follows the semantic versioning specification, and CONTRIBUTING must be reviewed before contributing.