- Home
- MCP servers
- LINE MCP Bot Server
LINE MCP Bot Server
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hirosuke0520-line-mcp-demo": {
"command": "node",
"args": [
"PATH/TO/line-bot-mcp-server/dist/index.js"
],
"env": {
"DESTINATION_USER_ID": "FILL_HERE",
"CHANNEL_ACCESS_TOKEN": "FILL_HERE"
}
}
}
}You deploy this MCP server to connect an AI Agent with LINE's Official Account, enabling automated message sending and rich message interactions through LINE. It exposes simple tools to push text or flexible messages and to fetch user profiles, making LINE-based automation practical and extendable for your agents.
How to use
To use this MCP server, connect it to your MCP client or agent and configure it with your LINE channel credentials. The server exposes three core capabilities: pushing plain text messages, pushing flexible flex messages, and retrieving user profiles. Use push_text_message to send quick updates or responses, push_flex_message for rich, structured content, and get_profile to fetch user details for personalized interactions. When you integrate, you typically run the MCP server locally or in a container and point your agent to the runtime command and environment variables that hold your channel access token and destination user ID.
What you can do with the tools
-
push_text_message: Send a simple text message to a LINE user. You provide the user_id and the message.text content. If user_id is not provided, it defaults to the configured destination user. This is ideal for quick replies or status updates.
-
push_flex_message: Send a highly customizable flex message. You provide user_id, altText, and a JSON content object that defines the bubble or carousel layout. This enables rich layouts, images, buttons, and interactive elements.
-
get_profile: Retrieve detailed LINE user profile information such as display name, profile picture URL, status message, and language. This helps tailor responses based on who you are messaging.
How to install
Prerequisites: ensure Node.js version 20 or later is installed on your machine.
Step 1. Install the MCP server locally (Node) and prepare dependencies.
Step 2. If you are using npm, install dependencies and build the project.
Step 3. If you prefer Docker, build the image and prepare to run the container.
Configuration and runtime examples
{
"mcpServers": {
"line_bot_node": {
"command": "node",
"args": [
"PATH/TO/line-bot-mcp-server/dist/index.js"
],
"env": {
"CHANNEL_ACCESS_TOKEN": "FILL_HERE",
"DESTINATION_USER_ID": "FILL_HERE"
}
}
}
}
Docker configuration example
If you use Docker to run the MCP server, you can start it with the following configuration.
{
"mcpServers": {
"line_bot_docker": {
"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"
}
}
}
}
Available tools
push_text_message
Push a simple text message to a LINE user. Requires user_id (defaults to DESTINATION_USER_ID) and message.text.
push_flex_message
Push a flexible, highly customizable message to LINE. Requires user_id, message.altText, and message.content with a type of 'bubble' or 'carousel' for layout.
get_profile
Retrieve detailed profile information for a LINE user, including display name, profile picture URL, status message, and language.