/ Directory / Playground / LINE Bot
● Official line 🔑 Needs your key

LINE Bot

by line · line/line-bot-mcp-server

Send LINE messages, rich Flex bubbles, and images to users or groups via the LINE Messaging API — ideal for JP/TW/TH notification flows.

LINE's official MCP wraps the LINE Messaging API. Push text, stickers, images, and Flex Message bubbles to a user by userId or to a group/room by their id. Includes broadcast (to all followers), narrowcast (segment), and profile lookups. Message costs apply beyond the free quota.

Why use it

Key features

Live Demo

What it looks like in practice

line-bot.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "line-bot",
      "command": "npx",
      "args": [
        "-y",
        "@line/line-bot-mcp-server"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "line-bot": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@line/line-bot-mcp-server"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add line-bot -- npx -y @line/line-bot-mcp-server

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use LINE Bot

Send a formatted ops alert to an on-call engineer via LINE

👤 JP/TW-based SRE teams where LINE is the standard pager ⏱ ~25 min intermediate

When to use: You want Sentry/Prometheus alerts to ping specific engineers on LINE with a tidy Flex card, not a wall of text.

Prerequisites
  • LINE Official Account + channel access token — developers.line.biz → Channel → Messaging API → Issue token
  • The engineer's userId (from your bot's webhook events) — Capture userId from a follow or message event; store in your user DB
Flow
  1. Design the Flex bubble
    Design a Flex Message bubble for a Sentry alert: header (issue title), body (event count, release, affected users), buttons (Open in Sentry, Ack).✓ Copied
    → Valid Flex JSON Claude can validate
  2. Push to the on-call user
    Push this Flex message to userId U1234567890abcdef with altText 'Sentry alert: <title>'.✓ Copied
    → messageId returned, no 400
  3. Handle fallback if user blocked the bot
    If the push fails with 400 (user blocked), multicast to the secondary on-call userIds instead and log the original failure.✓ Copied
    → Graceful fallback path

Outcome: A polished, actionable alert in LINE within 2 seconds of the underlying event.

Pitfalls
  • altText required and capped at 400 chars — pushes fail silently without it — Always include altText; keep it under 400 chars summarizing the Flex
  • Pushing without the user being a friend of the bot fails 400 — Only push to userIds you captured from a real webhook event — you can't guess them
Combine with: sentry

Broadcast a monthly product update to all followers

👤 Marketing teams with a LINE OA presence ⏱ ~20 min intermediate

When to use: Once a month, you send a digest to all followers with 3 headline items and deep links.

Prerequisites
  • Sufficient messaging quota — Check current quota with getMessageQuota; LINE Push Messages are metered per plan
Flow
  1. Check quota before sending
    Get current message quota consumption and remaining. Confirm we have at least <follower_count> messages left.✓ Copied
    → Remaining quota number
  2. Compose a Flex carousel
    Build a Flex carousel with 3 bubbles (title, image, CTA button). Inputs: [topic, image URL, link] × 3.✓ Copied
    → Valid Flex carousel JSON
  3. Broadcast
    Broadcast this carousel to all followers with altText '<brand> monthly update'.✓ Copied
    → 200 OK, requestId for audit

Outcome: A branded monthly broadcast to the whole follower base with click tracking via your redirect links.

Pitfalls
  • Broadcasts are expensive — a big list can blow through the free tier in one send — For non-urgent content consider narrowcast with a segment; or upgrade plan before sending

Let Claude post a standup summary to a team's LINE group

👤 Teams where daily standup lives in a LINE group ⏱ ~20 min intermediate

When to use: Every morning at 9, summarize yesterday's Linear/Sentry activity and post a short digest.

Prerequisites
  • groupId of the target chat — Capture from a join or message event when the bot is added to the group
Flow
  1. Assemble the digest upstream
    Pull yesterday's Linear merged PRs and top new Sentry issues. Summarize in 5 bullets.✓ Copied
    → Clean 5-bullet markdown
  2. Push to the group
    Push a text message (markdown-free; LINE doesn't render markdown) to groupId Cxxxxx with the 5 bullets as plain lines.✓ Copied
    → 200 OK
  3. Ack failures loudly
    If push fails (bot was kicked from the group), write the failure to /logs/line-standup.log and notify me via email.✓ Copied
    → Audit trail on failure

Outcome: A reliable daily standup digest that silently self-heals and alerts you if broken.

Pitfalls
  • Bot removed from group silently fails push — Subscribe to leave webhook events and mark the group inactive in your DB
  • LINE text messages don't render Markdown or HTML — Use plain text with emoji, or switch to a Flex message for rich formatting
Combine with: sentry · linear

Narrowcast a campaign to a geographic or behavioral segment

👤 Growth teams running targeted pushes ⏱ ~20 min advanced

When to use: You want to ping only Tokyo-area followers about an in-person event, not your whole list.

Prerequisites
  • Audience defined in LINE Official Account Manager — Create an audience (geo, tag, or uploaded userId list) in the OA Manager UI
Flow
  1. List audiences
    List all audiences on our LINE OA. Show name, size, last updated.✓ Copied
    → Audience catalog
  2. Compose segment-specific message
    Build a Flex card for the Tokyo meetup — location, date, CTA. Tailor copy for Tokyo-area users.✓ Copied
    → Targeted Flex JSON
  3. Narrowcast
    Narrowcast this Flex to audienceId <id>. Confirm the request was accepted.✓ Copied
    → 202 Accepted + requestId

Outcome: Precision campaigns with lower cost per impression and higher click-through.

Pitfalls
  • Narrowcast to audience < 50 fails for privacy reasons — If segment is tiny, fall back to individual push to the user list instead

Combinations

Pair with other MCPs for X10 leverage

line-bot + sentry

Auto-push a Flex alert to on-call when a critical Sentry issue appears

When a new Sentry issue in project web-prod exceeds 100 events in 5 minutes, push a Flex alert to the on-call LINE user.✓ Copied
line-bot + linear

Notify a LINE group when a P0 Linear issue is created

When a Linear issue is labeled P0, push a text message to groupId Cxxxx with the title and URL.✓ Copied
line-bot + monday

Push a daily digest of monday.com items due today

Every morning at 9am, gather my monday.com items due today, format as a Flex carousel, push to my LINE user.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
push_message to: userId|groupId|roomId, messages: Message[] Send to a known recipient id 1 message charge
multicast to: userId[], messages: Message[] Same message to <=500 specific users 1 charge per recipient
broadcast messages: Message[] Blast to all followers; confirm quota first 1 charge per follower
narrowcast messages, recipient (audience object), filter? Targeted sends by audience 1 charge per recipient
get_profile userId Personalize a message with the user's display name free
get_message_quota Before any broadcast/narrowcast free

Cost & Limits

What this costs to run

API quota
LINE API is metered in messages, not requests. Free tier: 500 free push messages/month (developer trial) or 200/month (light plan).
Tokens per call
Text message: ~200 tokens request. Flex message: 500–2000 tokens depending on bubble complexity.
Monetary
Light plan free (200 msg/mo), Standard ¥5,000/mo (up to 30k msg), Pro ¥15,000/mo (45k+).
Tip
Use reply_message whenever possible — replies are FREE. Only push when you don't have a replyToken.

Security

Permissions, secrets, blast radius

Minimum scopes: Channel access token (long-lived, Messaging API)
Credential storage: CHANNEL_ACCESS_TOKEN and CHANNEL_SECRET in env vars
Data egress: All calls to api.line.me and api-data.line.me
Never grant: Channel secret to client-side code — it's for webhook signature verification only

Troubleshooting

Common errors and fixes

401 Invalid channel access token

Token expired or revoked. Re-issue at developers.line.biz → Channel → Messaging API.

Verify: curl -H 'Authorization: Bearer $CHANNEL_ACCESS_TOKEN' https://api.line.me/v2/bot/info
400 The property, altText, must be specified

Every non-text message (image, Flex) requires altText. Add it.

400 The user hasn't added the LINE Official Account as a friend

You can't push to arbitrary userIds — only ones that messaged/followed your bot. Use replyToken instead for this recipient.

429 Monthly limit reached

You hit your plan quota. Upgrade plan or wait until next month; replies remain free.

Verify: Call get_message_quota

Alternatives

LINE Bot vs others

AlternativeWhen to use it insteadTradeoff
Slack MCPTeam is on Slack (most of Europe/NA)Different audience; LINE wins for JP/TW/TH consumers
Telegram MCPBot target is Telegram usersDifferent geo dominance; no OA/broadcast quotas
WhatsApp Cloud API MCPYou need to reach SEA/LATAM consumersHeavier BSP onboarding; stricter template approval

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills