@zients/line-mcp-server
Provides tools for interacting with the LINE Messaging API, enabling AI agents to send messages (text, image, sticker, flex, video, audio, location), manage groups and rooms, configure rich menus, and query analytics such as follower counts and message statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@zients/line-mcp-server Broadcast a text message to all followers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@zients/line-mcp-server
MCP Server for LINE Messaging API — let AI agents send messages, manage groups, configure rich menus, and query analytics on LINE. Works with Codex CLI, Claude Code, OpenClaw, and any MCP-compatible client.
Disclaimer: This project is not affiliated with, endorsed by, or sponsored by LY Corporation or LINE.
Features
Messaging (12 tools)
Tool | Description |
| Send text to a user, group, or room |
| Send an image (HTTPS URLs only) |
| Send a LINE sticker |
| Send a Flex Message (rich layout) |
| Send a video (HTTPS URLs only) |
| Send an audio clip (HTTPS URLs only) |
| Send a location (lat/lng) |
| Display a loading animation in a chat |
| Broadcast text to all followers |
| Send text to multiple users (max 500) |
| Broadcast a Flex Message to all followers |
| Send a Flex Message to multiple users (max 500) |
Profile (2 tools)
Tool | Description |
| Get user display name, picture, status, and language |
| Get group name and picture (bot must be a member of the group) |
Group & Room Management (8 tools)
Tool | Description |
| Get number of members in a group |
| List all member IDs in a group |
| Get a specific member's profile within a group |
| Bot leaves a group (permanent) |
| Get number of members in a room |
| List all member IDs in a room |
| Get a specific member's profile within a room |
| Bot leaves a room (permanent) |
Rich Menu (9 tools)
Tool | Description |
| Create a new rich menu |
| List all rich menus |
| Get a specific rich menu by ID |
| Delete a rich menu |
| Set the default rich menu for all users |
| Get the current default rich menu ID |
| Remove the default rich menu |
| Assign a rich menu to a specific user |
| Remove a user's assigned rich menu |
Insight & Analytics (13 tools)
Tool | Description |
| Get bot's display name, ID, chat mode, and mark-as-read mode |
| Get monthly message sending quota |
| Get messages sent this month |
| List follower user IDs (paginated) |
| Get follower count statistics for a date (yyyyMMdd, UTC+9) |
| Get follower demographic data (age, gender, area) |
| Get number of sent reply messages for a date (yyyyMMdd, UTC+9) |
| Get number of sent push messages for a date (yyyyMMdd, UTC+9) |
| Get number of sent multicast messages for a date (yyyyMMdd, UTC+9) |
| Get number of sent broadcast messages for a date (yyyyMMdd, UTC+9) |
| Get number of message deliveries for a date (yyyyMMdd, UTC+9) |
| Get message event statistics by request ID |
| Get statistics for a custom aggregation unit within a date range |
Related MCP server: LINE Bot MCP Server
Prerequisites
Node.js >= 22
A LINE Official Account with Messaging API enabled
Channel Access Token
Create a LINE Official Account
Go to LINE Official Account Manager and create an account
Go to LINE Developers Console and log in
Create a Provider (or select an existing one)
Under the Provider, create a Messaging API Channel linked to your Official Account
Go back to LINE Developers Console, select your Provider and Channel
In the Basic settings tab, find Your user ID (
U...) — for testing push messages to yourselfGo to the Messaging API tab, scroll to the bottom, and click Issue under Channel access token (long-lived) to generate your token
Enable Group/Room Features (Optional)
To use group/room tools or send messages to groups and rooms:
In LINE Official Account Manager → Settings → Account settings → enable Allow bot to join groups
In LINE Official Account Manager → Settings → Response settings → enable Webhook
In LINE Developers Console → your Channel → Messaging API tab → set your Webhook URL
Invite the bot to a group or room in the LINE app (search by the bot's Basic ID
@xxxshown in LINE Developers Console → Basic settings)To get the ID, receive the
joinevent or any message event via Webhook — it will containsource.groupId(for groups) orsource.roomId(for rooms)
Setup (npx — recommended)
No installation needed — just configure your MCP client.
DEFAULT_UID is optional. Set it when you want single-target messaging tools to use a default LINE User ID, so calls like push_text_message can omit to.
Codex CLI
codex mcp add @zients/line-mcp-server \
--env CHANNEL_ACCESS_TOKEN=<your-token> \
--env DEFAULT_UID=U... \
-- npx -y @zients/line-mcp-serverStart a new Codex session after adding the MCP server so Codex loads the new tools.
Claude Code
claude mcp add @zients/line-mcp-server -t stdio \
-e CHANNEL_ACCESS_TOKEN=<your-token> \
-e DEFAULT_UID=U... \
-- npx -y @zients/line-mcp-serverOpenClaw (mcporter)
mcporter config add @zients/line-mcp-server \
--command npx \
--arg -y --arg @zients/line-mcp-server \
--env CHANNEL_ACCESS_TOKEN=<your-token> \
--env DEFAULT_UID=U... \
--description "LINE Messaging API tools"Other MCP clients
Add the following to your MCP client configuration:
{
"mcpServers": {
"@zients/line-mcp-server": {
"command": "npx",
"args": ["-y", "@zients/line-mcp-server"],
"env": {
"CHANNEL_ACCESS_TOKEN": "<your-token>",
"DEFAULT_UID": "U..."
}
}
}
}Setup (build from source)
git clone https://github.com/zients/line-mcp-server.git
cd line-mcp-server
npm install
npm run build # compiles TypeScript to dist/Codex CLI
codex mcp add @zients/line-mcp-server \
--env CHANNEL_ACCESS_TOKEN=<your-token> \
--env DEFAULT_UID=U... \
-- node /path/to/line-mcp-server/dist/index.jsClaude Code
claude mcp add @zients/line-mcp-server -t stdio \
-e CHANNEL_ACCESS_TOKEN=<your-token> \
-e DEFAULT_UID=U... \
-- node /path/to/line-mcp-server/dist/index.jsOpenClaw (mcporter)
mcporter config add @zients/line-mcp-server \
--command node \
--arg /path/to/line-mcp-server/dist/index.js \
--env CHANNEL_ACCESS_TOKEN=<your-token> \
--env DEFAULT_UID=U... \
--description "LINE Messaging API tools"Verify & call tools (mcporter)
mcporter list @zients/line-mcp-server --schema
mcporter call @zients/line-mcp-server.push_text_message to=U... text="Hello"
mcporter call @zients/line-mcp-server.push_text_message text="Hello from DEFAULT_UID"
mcporter call @zients/line-mcp-server.get_user_profile userId=U...
mcporter call @zients/line-mcp-server.get_bot_infoAfter registration, Claude can call LINE tools directly:
"Send 'Hello' to my LINE group C1234567890"
Target ID Prefixes
Prefix | Type |
| User ID |
| Group ID |
| Room ID |
Project Structure
src/
├── index.ts # Entry point (stdio MCP server)
├── services/
│ └── line.ts # LineService interface + LineMessagingClient
├── tools/
│ ├── messaging.ts # 12 messaging tools
│ ├── profile.ts # 2 profile tools
│ ├── group.ts # 8 group/room management tools
│ ├── richmenu.ts # 9 rich menu tools
│ └── insight.ts # 13 insight/analytics tools
└── utils/
├── error.ts # Error formatting utility
├── flex.ts # Flex message JSON validation
└── target.ts # DEFAULT_UID parsing and target fallback
tests/
├── helpers/
│ └── mock-line-service.ts # Shared mock LineService for all tests
├── integration/
│ └── server.test.ts # MCP server integration test (all 44 tools)
├── services/
│ └── line.test.ts # LineMessagingClient unit tests
├── tools/
│ ├── messaging.test.ts # Messaging tool handler tests
│ ├── profile.test.ts # Profile tool handler tests
│ ├── group.test.ts # Group/room tool handler tests
│ ├── richmenu.test.ts # Rich menu tool handler tests
│ └── insight.test.ts # Insight tool handler tests
└── utils/
├── error.test.ts # Error formatting tests
└── target.test.ts # DEFAULT_UID and target fallback testsTesting
npm test # run all tests
npm run test:coverage # run with coverage reportEnvironment Variables
Variable | Required | Description |
| Yes | LINE Messaging API channel access token |
| No | Default recipient User ID (must start with |
License
MIT
Available Tools
44 toolsbroadcast_flex_messageBroadcast Flex MessageA
Broadcast a Flex Message (rich layout) to ALL followers of the LINE Official Account. Use with caution.
Inputs: altText (required), contents (required).
broadcast_text_messageBroadcast Text MessageA
Broadcast a text message to ALL followers of the LINE Official Account. Use with caution.
Inputs: text (required).
get_bot_infoGet Bot InfoA
Get information about the LINE Official Account bot, including name, ID, chat mode, and mark-as-read mode.
Inputs: no named parameters.
get_follower_idsGet Follower IDsA
Get a list of user IDs of users who have added the LINE Official Account as a friend. Supports pagination via the start token.
Inputs: start.
get_friend_demographicsGet Friend DemographicsA
Get demographic information about the LINE Official Account's friends, including gender, age, and area breakdowns.
Inputs: no named parameters.
get_group_member_countGet Group Member CountA
Get the number of members in a LINE group chat. The bot must be a member of the group.
Inputs: groupId (required).
get_group_member_idsGet Group Member IDsB
Get the user IDs of all members in a LINE group chat. The bot must be a member of the group.
Inputs: groupId (required).
get_group_member_profileGet Group Member ProfileA
Get a member's profile in a LINE group chat. The bot must be a member of the group.
Inputs: userId (required), groupId (required).
get_group_summaryGet Group SummaryB
Get a LINE group's name and picture URL. The bot must be a member of the group.
Inputs: groupId (required).
get_message_deliveriesGet Message DeliveriesB
Get the number of message deliveries on a specified date, including breakdowns by API type.
Inputs: date (required).
get_message_eventGet Message EventA
Get statistics about how users interact with messages, including impressions, clicks, and other engagement metrics.
Inputs: requestId (required).
get_message_quotaGet Message QuotaA
Get the message quota for the LINE Official Account, including the quota type and limit.
Inputs: no named parameters.
get_message_quota_consumptionGet Message Quota ConsumptionB
Get the number of messages sent this month for the LINE Official Account.
Inputs: no named parameters.
get_number_of_followersGet Number of FollowersA
Get the number of followers for the LINE Official Account on a specified date. Returns follower count, targeted reaches, and blocks.
Inputs: date (required).
get_room_member_countGet Room Member CountA
Get the number of members in a LINE multi-person chat room. The bot must be a member of the room.
Inputs: roomId (required).
get_room_member_idsGet Room Member IDsA
Get the user IDs of all members in a LINE multi-person chat room. The bot must be a member of the room.
Inputs: roomId (required).
get_room_member_profileGet Room Member ProfileA
Get a member's profile in a LINE multi-person chat room. The bot must be a member of the room.
Inputs: roomId (required), userId (required).
get_sent_broadcast_countGet Sent Broadcast Message CountA
Get the number of broadcast messages sent on a specified date.
Inputs: date (required).
get_sent_multicast_countGet Sent Multicast Message CountB
Get the number of multicast messages sent on a specified date.
Inputs: date (required).
get_sent_push_countGet Sent Push Message CountA
Get the number of push messages sent on a specified date.
Inputs: date (required).
get_sent_reply_countGet Sent Reply Message CountA
Get the number of reply messages sent on a specified date.
Inputs: date (required).
get_statistics_per_unitGet Statistics Per UnitC
Get statistics per custom aggregation unit for messages sent within a specified date range.
Inputs: to (required), from (required), customAggregationUnit (required).
get_user_profileGet User ProfileA
Get a LINE user's display name, picture URL, status message, and language.
Inputs: userId (required).
leave_groupLeave GroupA
Leave a LINE group chat. Bot will leave the group permanently.
Inputs: groupId (required).
leave_roomLeave RoomA
Leave a LINE multi-person chat room. Bot will leave the room permanently.
Inputs: roomId (required).
multicast_flex_messageMulticast Flex MessageA
Send a Flex Message (rich layout) to multiple LINE users at once (max 500 user IDs).
Inputs: altText (required), userIds (required), contents (required).
multicast_text_messageMulticast Text MessageA
Send a text message to multiple LINE users at once (max 500 user IDs).
Inputs: text (required), userIds (required).
push_audio_messagePush Audio MessageA
Send an audio message to a LINE user, group, or room.
Inputs: duration (required), originalContentUrl (required), to.
push_flex_messagePush Flex MessageB
Send a Flex Message (rich layout) to a LINE user, group, or room. Pass the Flex container as a JSON string.
Inputs: altText (required), contents (required), to.
push_image_messagePush Image MessageA
Send an image to a LINE user, group, or room.
Inputs: previewImageUrl (required), originalContentUrl (required), to.
push_location_messagePush Location MessageA
Send a location message to a LINE user, group, or room.
Inputs: title (required), address (required), latitude (required), longitude (required), +1 more.
push_sticker_messagePush Sticker MessageA
Send a LINE sticker. See LINE sticker list for valid packageId/stickerId.
Inputs: packageId (required), stickerId (required), to.
push_text_messagePush Text MessageA
Send a text message to a LINE user, group, or room. Target ID prefixes: User="U", Group="C", Room="R".
Inputs: text (required), to.
push_video_messagePush Video MessageC
Send a video to a LINE user, group, or room.
Inputs: previewImageUrl (required), originalContentUrl (required), to.
show_loading_indicatorShow Loading IndicatorA
Display a loading animation in the LINE chat to indicate processing.
Inputs: chatId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Every tool has a clearly distinct purpose, with clear prefixes for messaging (push, broadcast, multicast), retrieval (get), and management (create, delete, set, etc.). The target audience (user, group, room) is specified in descriptions, eliminating confusion. Parallel tools for groups and rooms are distinct by entity type.
All tool names follow a consistent verb_noun pattern in snake_case, using predictable prefixes like push_, get_, create_, list_, delete_, set_, cancel_, link_, unlink_, leave_, and show_. This uniformity makes the toolset easy to navigate and understand.
With 44 tools, the server is on the heavier side, but the breadth of LINE Official Account functionality (messaging, rich menus, group/room management, analytics) justifies the count. Each tool serves a distinct purpose, and the structure is logical, so it does not feel excessive for the domain.
The toolset covers core messaging (push, broadcast, multicast), rich menu CRUD, group/room info, and analytics. However, there are notable gaps: reply messages are missing, and broadcast/multicast are only available for text and flex, not for image/video/audio/location/sticker. These are missing but workable around, so overall completeness is strong but not perfect.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server for Sendbird — chat users, channels, members, and messages from your AI client.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseAqualityDmaintenanceAI-powered MCP server for managing LINE Official Accounts. Send broadcasts, push messages, check analytics, manage rich menus — all through natural language via Claude, ChatGPT, or Cursor. 10 tools included: * Account info, friend count, message quota * Broadcast, push message, multicast * Delivery stats, user profiles, follower list * Rich menu management Supports 95M+ LINE users across Jap10MIT

LINE Bot MCP Serverofficial
AlicenseAqualityAmaintenanceMCP server that integrates the LINE Messaging API to enable AI agents to send messages and manage LINE Official Accounts.122,722 npm802Apache 2.0- AlicenseNot gradedqualityDmaintenanceMCP server for LINE Messaging API — send messages, manage groups, rich menus, webhooks, and more through 25 tools.21 npmMIT
- AlicenseCqualityDmaintenanceMCP Server for the LINE Shopping API, enabling AI agents and tools to interact with LINE Shopping data and operations via the Model Context Protocol.2223MIT