{"id":48038003,"url":"https://github.com/zients/line-mcp-server","last_synced_at":"2026-04-04T14:01:15.969Z","repository":{"id":346127818,"uuid":"1188619592","full_name":"zients/line-mcp-server","owner":"zients","description":"MCP Server for LINE Messaging API — send messages, manage groups, rich menus, and query analytics","archived":false,"fork":false,"pushed_at":"2026-03-22T10:52:28.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-23T01:32:31.279Z","etag":null,"topics":["ai","line","line-bot","line-messaging-api","mcp","mcp-server","npm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zients.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-22T10:51:59.000Z","updated_at":"2026-03-22T11:13:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zients/line-mcp-server","commit_stats":null,"previous_names":["zients/line-mcp-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zients/line-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fline-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fline-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fline-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fline-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zients","download_url":"https://codeload.github.com/zients/line-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fline-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","line","line-bot","line-messaging-api","mcp","mcp-server","npm","typescript"],"created_at":"2026-04-04T14:00:34.352Z","updated_at":"2026-04-04T14:01:15.953Z","avatar_url":"https://github.com/zients.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @zients/line-mcp-server\n\n[![npm version](https://img.shields.io/npm/v/%40zients%2Fline-mcp-server.svg)](https://www.npmjs.com/package/@zients/line-mcp-server)\n[![Node.js](https://img.shields.io/node/v/%40zients%2Fline-mcp-server.svg)](https://nodejs.org)\n[![License: MIT](https://img.shields.io/npm/l/%40zients%2Fline-mcp-server.svg)](./LICENSE)\n\nMCP Server for LINE Messaging API — let AI agents send messages, manage groups, configure rich menus, and query analytics on LINE. Works with Claude Code, OpenClaw, and any MCP-compatible client.\n\n\u003e **Disclaimer:** This project is not affiliated with, endorsed by, or sponsored by LY Corporation or LINE.\n\n## Features\n\n### Messaging (12 tools)\n\n| Tool | Description |\n|------|-------------|\n| `push_text_message` | Send text to a user, group, or room |\n| `push_image_message` | Send an image (HTTPS URLs only) |\n| `push_sticker_message` | Send a LINE sticker |\n| `push_flex_message` | Send a Flex Message (rich layout) |\n| `push_video_message` | Send a video (HTTPS URLs only) |\n| `push_audio_message` | Send an audio clip (HTTPS URLs only) |\n| `push_location_message` | Send a location (lat/lng) |\n| `show_loading_indicator` | Display a loading animation in a chat |\n| `broadcast_text_message` | Broadcast text to all followers |\n| `multicast_text_message` | Send text to multiple users (max 500) |\n| `broadcast_flex_message` | Broadcast a Flex Message to all followers |\n| `multicast_flex_message` | Send a Flex Message to multiple users (max 500) |\n\n### Profile (2 tools)\n\n| Tool | Description |\n|------|-------------|\n| `get_user_profile` | Get user display name, picture, status, and language |\n| `get_group_summary` | Get group name and picture (bot must be a member of the group) |\n\n### Group \u0026 Room Management (8 tools)\n\n| Tool | Description |\n|------|-------------|\n| `get_group_member_count` | Get number of members in a group |\n| `get_group_member_ids` | List all member IDs in a group |\n| `get_group_member_profile` | Get a specific member's profile within a group |\n| `leave_group` | Bot leaves a group (permanent) |\n| `get_room_member_count` | Get number of members in a room |\n| `get_room_member_ids` | List all member IDs in a room |\n| `get_room_member_profile` | Get a specific member's profile within a room |\n| `leave_room` | Bot leaves a room (permanent) |\n\n### Rich Menu (9 tools)\n\n| Tool | Description |\n|------|-------------|\n| `create_rich_menu` | Create a new rich menu |\n| `list_rich_menus` | List all rich menus |\n| `get_rich_menu` | Get a specific rich menu by ID |\n| `delete_rich_menu` | Delete a rich menu |\n| `set_default_rich_menu` | Set the default rich menu for all users |\n| `get_default_rich_menu` | Get the current default rich menu ID |\n| `cancel_default_rich_menu` | Remove the default rich menu |\n| `link_rich_menu_to_user` | Assign a rich menu to a specific user |\n| `unlink_rich_menu_from_user` | Remove a user's assigned rich menu |\n\n### Insight \u0026 Analytics (13 tools)\n\n| Tool | Description |\n|------|-------------|\n| `get_bot_info` | Get bot's display name, ID, chat mode, and mark-as-read mode |\n| `get_message_quota` | Get monthly message sending quota |\n| `get_message_quota_consumption` | Get messages sent this month |\n| `get_follower_ids` | List follower user IDs (paginated) |\n| `get_number_of_followers` | Get follower count statistics for a date (yyyyMMdd, UTC+9) |\n| `get_friend_demographics` | Get follower demographic data (age, gender, area) |\n| `get_sent_reply_count` | Get number of sent reply messages for a date (yyyyMMdd, UTC+9) |\n| `get_sent_push_count` | Get number of sent push messages for a date (yyyyMMdd, UTC+9) |\n| `get_sent_multicast_count` | Get number of sent multicast messages for a date (yyyyMMdd, UTC+9) |\n| `get_sent_broadcast_count` | Get number of sent broadcast messages for a date (yyyyMMdd, UTC+9) |\n| `get_message_deliveries` | Get number of message deliveries for a date (yyyyMMdd, UTC+9) |\n| `get_message_event` | Get message event statistics by request ID |\n| `get_statistics_per_unit` | Get statistics for a custom aggregation unit within a date range |\n\n## Prerequisites\n\n- Node.js \u003e= 22\n- A LINE Official Account with Messaging API enabled\n- Channel Access Token\n\n## Create a LINE Official Account\n\n1. Go to [LINE Official Account Manager](https://manager.line.biz/) and create an account\n2. Go to [LINE Developers Console](https://developers.line.biz/console/) and log in\n3. Create a **Provider** (or select an existing one)\n4. Under the Provider, create a **Messaging API Channel** linked to your Official Account\n5. Go back to [LINE Developers Console](https://developers.line.biz/console/), select your Provider and Channel\n6. In the **Basic settings** tab, find **Your user ID** (`U...`) — for testing push messages to yourself\n7. Go to the **Messaging API** tab, scroll to the bottom, and click **Issue** under **Channel access token (long-lived)** to generate your token\n\n### Enable Group/Room Features (Optional)\n\nTo use group/room tools or send messages to groups and rooms:\n\n1. In [LINE Official Account Manager](https://manager.line.biz/) → **Settings** → **Account settings** → enable **Allow bot to join groups**\n2. In [LINE Official Account Manager](https://manager.line.biz/) → **Settings** → **Response settings** → enable **Webhook**\n3. In [LINE Developers Console](https://developers.line.biz/console/) → your Channel → **Messaging API** tab → set your **Webhook URL**\n4. Invite the bot to a group or room in the LINE app (search by the bot's **Basic ID** `@xxx` shown in LINE Developers Console → Basic settings)\n5. To get the ID, receive the `join` event or any message event via Webhook — it will contain `source.groupId` (for groups) or `source.roomId` (for rooms)\n\n## Setup (npx — recommended)\n\nNo installation needed — just configure your MCP client.\n\n### Claude Code\n\n```bash\nclaude mcp add @zients/line-mcp-server -t stdio \\\n  -e CHANNEL_ACCESS_TOKEN=\u003cyour-token\u003e \\\n  -- npx -y @zients/line-mcp-server\n```\n\n### OpenClaw (mcporter)\n\n```bash\nmcporter config add @zients/line-mcp-server \\\n  --command npx \\\n  --arg -y --arg @zients/line-mcp-server \\\n  --env CHANNEL_ACCESS_TOKEN=\u003cyour-token\u003e \\\n  --description \"LINE Messaging API tools\"\n```\n\n### Other MCP clients\n\nAdd the following to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"@zients/line-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zients/line-mcp-server\"],\n      \"env\": {\n        \"CHANNEL_ACCESS_TOKEN\": \"\u003cyour-token\u003e\"\n      }\n    }\n  }\n}\n```\n\n## Setup (build from source)\n\n```bash\ngit clone https://github.com/zients/line-mcp-server.git\ncd line-mcp-server\nnpm install\nnpm run build   # compiles TypeScript to dist/\n```\n\n### Claude Code\n\n```bash\nclaude mcp add @zients/line-mcp-server -t stdio \\\n  -e CHANNEL_ACCESS_TOKEN=\u003cyour-token\u003e \\\n  -- node /path/to/line-mcp-server/dist/index.js\n```\n\n### OpenClaw (mcporter)\n\n```bash\nmcporter config add @zients/line-mcp-server \\\n  --command node \\\n  --arg /path/to/line-mcp-server/dist/index.js \\\n  --env CHANNEL_ACCESS_TOKEN=\u003cyour-token\u003e \\\n  --description \"LINE Messaging API tools\"\n```\n\n### Verify \u0026 call tools (mcporter)\n\n```bash\nmcporter list @zients/line-mcp-server --schema\nmcporter call @zients/line-mcp-server.push_text_message to=U... text=\"Hello\"\nmcporter call @zients/line-mcp-server.get_user_profile userId=U...\nmcporter call @zients/line-mcp-server.get_bot_info\n```\n\nAfter registration, Claude can call LINE tools directly:\n\n\u003e \"Send 'Hello' to my LINE group C1234567890\"\n\n## Target ID Prefixes\n\n| Prefix | Type |\n|--------|------|\n| `U...` | User ID |\n| `C...` | Group ID |\n| `R...` | Room ID |\n\n## Project Structure\n\n```\nsrc/\n├── index.ts                          # Entry point (stdio MCP server)\n├── services/\n│   └── line.ts                       # LineService interface + LineMessagingClient\n├── tools/\n│   ├── messaging.ts                  # 12 messaging tools\n│   ├── profile.ts                    # 2 profile tools\n│   ├── group.ts                      # 8 group/room management tools\n│   ├── richmenu.ts                   # 9 rich menu tools\n│   └── insight.ts                    # 13 insight/analytics tools\n└── utils/\n    ├── error.ts                      # Error formatting utility\n    └── flex.ts                       # Flex message JSON validation\n\ntests/\n├── helpers/\n│   └── mock-line-service.ts          # Shared mock LineService for all tests\n├── integration/\n│   └── server.test.ts                # MCP server integration test (all 44 tools)\n├── services/\n│   └── line.test.ts                  # LineMessagingClient unit tests\n├── tools/\n│   ├── messaging.test.ts             # Messaging tool handler tests\n│   ├── profile.test.ts               # Profile tool handler tests\n│   ├── group.test.ts                 # Group/room tool handler tests\n│   ├── richmenu.test.ts              # Rich menu tool handler tests\n│   └── insight.test.ts               # Insight tool handler tests\n└── utils/\n    └── error.test.ts                 # Error formatting tests\n```\n\n## Testing\n\n```bash\nnpm test              # run all tests\nnpm run test:coverage # run with coverage report\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `CHANNEL_ACCESS_TOKEN` | Yes | LINE Messaging API channel access token |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Fline-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzients%2Fline-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Fline-mcp-server/lists"}