logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

line-platform-interface-server-mcp

Facilitates AI agent interaction with a LINE Official Account via the Messaging API, enabling the transmission and retrieval of messages, including rich, structured layouts, and access to subscriber profile data and bulk messaging capabilities.

Author

line-platform-interface-server-mcp logo

line

Apache License 2.0

Quick Info

GitHub GitHub Stars 468
NPM Weekly Downloads 3593
Tools 1
Last Updated 2026-02-19

Tags

linemcpmessagingline botline messagingbot mcp

日本語版 READMEはこちら

LINE Bot MCP Server

npmjs

Implementation of the Model Context Protocol (MCP) server layer, designed to bridge an Artificial Intelligence Agent with a LINE Official Account through the utilization of the LINE Messaging API.

[!NOTE] This package is currently distributed as an early access release. It is intended primarily for trial use and experimentation, and may lack certain finalized features or complete official support documentation.

Available Functions

  1. transmit_text_message
  2. Dispatches a standard text-only communication to an individual LINE recipient.
  3. Parameters:
    • user_id (string?): Identifier for the message recipient. Resolves to the configured DESTINATION_USER_ID if unspecified. One must be provided.
    • message.text (string): The textual payload intended for the user.
  4. transmit_rich_message
  5. Sends a highly customizable, visually complex message structure (Flex Message) to a recipient on LINE.
  6. Parameters:
    • user_id (string?): Identifier for the message recipient. Resolves to the configured DESTINATION_USER_ID if unspecified. One must be provided.
    • message.altText (string): Fallback text displayed when the rich content rendering fails.
    • message.content (any): The complete JSON definition governing the Flex Message's arrangement and elements.
    • message.contents.type (enum): Defines the container type: 'bubble' for singular content blocks or 'carousel' for swipeable collections.
  7. mass_notify_text
  8. Issues a plain text broadcast to every end-user subscribed to the connected LINE Official Account.
  9. Parameters:
    • message.text (string): The plain text content for the broad distribution.
  10. mass_notify_rich
  11. Distributes a complex, customizable Flex Message to the entire follower base of the LINE Official Account.
  12. Parameters:
    • message.altText (string): Alternative text displayed if the rich content is unavailable.
    • message.content (any): The structured JSON object detailing the visual composition of the message.
    • message.contents.type (enum): Specifies the primary container type: 'bubble' or 'carousel'.
  13. fetch_subscriber_profile
  14. Retrieves comprehensive identity data for a specified LINE user, including their displayed name, avatar URL, status message, and preferred language settings.
  15. Parameters:
    • user_id (string?): The unique identifier of the subscriber whose data is sought. Defaults to DESTINATION_USER_ID.
  16. query_message_sending_limits
  17. Examines the current monthly message sending allowance and consumption metrics for the registered LINE Official Account.
  18. Parameters:
    • None specified.
  19. retrieve_rich_menu_definitions
  20. Fetches the catalogue of all configured Rich Menu assets linked to the LINE Official Account.
  21. Parameters:
    • None specified.
  22. decommission_rich_menu
  23. Permanently erases a specific Rich Menu resource using its unique identifier.
  24. Parameters:
    • richMenuId (string): The unique identifier of the Rich Menu resource targeted for removal.
  25. designate_rich_menu_primary
    • Designates a specified Rich Menu as the default interactive menu for users.
    • Parameters:
    • richMenuId (string): The unique identifier of the menu to be set as the primary/default option.
  26. revoke_rich_menu_primary_status
    • Deactivates any currently set default Rich Menu configuration.
    • Parameters:
    • None specified.

Deployment via npx

Required Foundation: - Node.js version 20 or higher

Stage 1: Establish LINE Official Account Prerequisites

This server component necessitates an active LINE Official Account. If one is unavailable, please proceed with creation following these guidelines.

If an account exists, ensure the Messaging API functionality is activated by referencing this procedure.

Stage 2: Configure Agent Environment

Integrate the subsequent configuration details into your operational AI Agent environment (e.g., Claude Desktop or Cline):

Set the required environment variables or command-line arguments:

  • CHANNEL_ACCESS_TOKEN: (Mandatory) The authorized token for API access. Obtainable per these instructions.
  • DESTINATION_USER_ID: (Optional) The default target identifier for one-to-one messages. Essential if the function call omits a user_id. Reference this resource for retrieval.

Configuration Snippet Example:

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

Deployment via Docker Containerization

Stage 1: LINE Official Account Setup

(Repeat of prerequisite setup for LINE OA and API enablement as described above.)

Stage 2: Construct the line-bot-mcp-server Image

Acquire source code via Git:

git clone git@github.com:line/line-bot-mcp-server.git

Build the container artifact:

docker build -t line/line-bot-mcp-server .

Stage 3: Configure AI Agent for Docker Execution

Supply these configuration directives to your AI Agent framework:

  • mcpServers.args: (Mandatory) Specifies the location or executable path for the server wrapper.
  • CHANNEL_ACCESS_TOKEN: (Mandatory) Required API credential.
  • DESTINATION_USER_ID: (Optional) Default recipient identifier if not supplied in specific tool invocations.

Docker Run Example:

{
  "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"
      }
    }
  }
}

Local Iteration Utilizing the MCP Inspector

Testing and debugging capabilities are accessible via the MCP Inspector utility running locally.

Required Preparatory Steps

  1. Clone the repository and navigate into the directory:
git clone git@github.com:line/line-bot-mcp-server.git
cd line-bot-mcp-server
  1. Install required dependencies:
npm install
  1. Compile the source code:
npm run build

Launching the Inspector Session

Execute the following command to initialize the local server accessible via the Inspector UI:

npx @modelcontextprotocol/inspector node dist/index.js

This action initiates the interface where you can examine and validate the functionality of the LINE Bot MCP Server tools.

Version Control Standard

This software adheres to the principles of semantic versioning. Refer to http://semver.org/ for details.

Collaboration Guidelines

Consult CONTRIBUTING prior to submitting any modifications or enhancements.

WIKIPEDIA: Enterprise management utilities encompass the array of systems, software applications, oversight mechanisms, computational frameworks, and systematic approaches leveraged by organizations to effectively navigate volatile market conditions, maintain competitive advantage, and elevate overall operational performance.

See Also

`