Required Environment Variables
DESTINATION_USER_ID
– (string) LINE user ID or group to receive messages.CHANNEL_ACCESS_TOKEN
– (string) LINE Official Account channel access token.
Steps
-
Install Meshagent and dependencies:
- Sign up and authenticate: Follow instructions at Meshagent CLI: Getting Started.
-
Start an MCP server agent in the test room:
- This starts a Meshagent Room named
test
with a test MCP server running in it. Rooms auto-close if inactive.
- This starts a Meshagent Room named
-
Join a chatbot to the test room:
- Starts a chatbot that can use the LINE MCP server toolkit in the same room.
- The command output provides a link to the room UI.
-
Test the setup:
- Open the room link in your browser and send messages to the agent to interact with the MCP server tools.
Project-Level Deployment (for Persistent Production Use)
Make the MCP server tools and chatbot available automatically in every new Meshagent project room. This is ideal for production and removes the need to run extra MCP/chatbot processes locally—the services join on every room creation.-
Create a persistent MCP server agent for the project:
-
Create a persistent chatbot service:
Tools Available
This MCP server provides the following tools to connect an AI agent to the LINE Official Account:Tool: broadcast_flex_message
Broadcast a highly customizable flex message via LINE to all users who have added your LINE Official Account. Supports both bubble (single container) and carousel (multiple swipeable bubbles) layouts. Sends to all users.Parameters:
message
(object
)
Tool: broadcast_text_message
Broadcast a simple text message via LINE to all users who have followed your LINE Official Account. Use for plain text messages. Sends to all users.Parameters:
message
(object
)
Tool: cancel_rich_menu_default
Cancel the default rich menu.
Tool: delete_rich_menu
Delete a rich menu from your LINE Official Account.Parameters:
richMenuId
(string
): The ID of the rich menu to delete.
Tool: get_message_quota
Get the message quota and consumption of the LINE Official Account. Shows monthly message limit and current usage.
Tool: get_profile
Get detailed profile information of a LINE user including display name, profile picture URL, status message, and language.Parameters:
userId
(string
, optional): The user ID to get a profile. Defaults toDESTINATION_USER_ID
.
Tool: get_rich_menu_list
Get the list of rich menus associated with your LINE Official Account.
Tool: push_flex_message
Push a highly customizable flex message to a user via LINE.Parameters:
message
(object
)userId
(string
, optional): The user ID to receive the message. Defaults toDESTINATION_USER_ID
.
Tool: push_text_message
Push a simple text message to a user via LINE.Parameters:
message
(object
)userId
(string
, optional): The user ID to receive the message. Defaults toDESTINATION_USER_ID
.
Tool: set_rich_menu_default
Set a rich menu as the default rich menu.Parameters:
richMenuId
(string
): The ID of the rich menu to set as default.
Resources
- Meshagent: https://www.meshagent.com/
- Meshagent Documentation: https://docs.meshagent.com
- Meshagent MCP Tool Image: https://hub.docker.com/r/meshagent/mcp-line
- MCP Server (LINE) Repo: https://github.com/line/line-bot-mcp-server
- What is an MCP Server? https://www.anthropic.com/news/model-context-protocol
- Why use Docker for MCP Servers? https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/