/ Verzeichnis / Playground / LINE Bot
● Offiziell line 🔑 Eigener Schlüssel nötig

LINE Bot

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

line-bot.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren 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"
      ]
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: 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

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

Voraussetzungen
  • 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
Ablauf
  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).✓ Kopiert
    → 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>'.✓ Kopiert
    → 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.✓ Kopiert
    → Graceful fallback path

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

Fallstricke
  • 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
Kombinieren mit: sentry

Broadcast a monthly product update to all followers

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

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

Voraussetzungen
  • Sufficient messaging quota — Check current quota with getMessageQuota; LINE Push Messages are metered per plan
Ablauf
  1. Check quota before sending
    Get current message quota consumption and remaining. Confirm we have at least <follower_count> messages left.✓ Kopiert
    → 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.✓ Kopiert
    → Valid Flex carousel JSON
  3. Broadcast
    Broadcast this carousel to all followers with altText '<brand> monthly update'.✓ Kopiert
    → 200 OK, requestId for audit

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

Fallstricke
  • 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

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

Voraussetzungen
  • groupId of the target chat — Capture from a join or message event when the bot is added to the group
Ablauf
  1. Assemble the digest upstream
    Pull yesterday's Linear merged PRs and top new Sentry issues. Summarize in 5 bullets.✓ Kopiert
    → 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.✓ Kopiert
    → 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.✓ Kopiert
    → Audit trail on failure

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

Fallstricke
  • 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
Kombinieren mit: sentry · linear

Narrowcast a campaign to a geographic or behavioral segment

👤 Growth teams running targeted pushes ⏱ ~20 min advanced

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

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

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

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

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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.✓ Kopiert
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.✓ Kopiert
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.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

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

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Channel access token (long-lived, Messaging API)
Credential-Speicherung: CHANNEL_ACCESS_TOKEN and CHANNEL_SECRET in env vars
Datenabfluss: All calls to api.line.me and api-data.line.me
Niemals gewähren: Channel secret to client-side code — it's for webhook signature verification only

Fehlerbehebung

Häufige Fehler und Lösungen

401 Invalid channel access token

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

Prüfen: 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.

Prüfen: Call get_message_quota

Alternativen

LINE Bot vs. andere

AlternativeWann stattdessenKompromiss
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

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen