/ Diretório / Playground / LINE Bot
● Oficial line 🔑 Requer sua chave

LINE Bot

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

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

line-bot.replay ▶ pronto
0/0

Instalar

Escolha seu cliente

~/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"
      ]
    }
  }
}

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

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

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

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

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

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

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

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

O Continue usa um array de objetos de servidor em vez de um map.

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

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

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

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: 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

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

Pré-requisitos
  • 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
Fluxo
  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).✓ Copiado
    → 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>'.✓ Copiado
    → 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.✓ Copiado
    → Graceful fallback path

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

Armadilhas
  • 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 com: sentry

Broadcast a monthly product update to all followers

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

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

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

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

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

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

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

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

Armadilhas
  • 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 com: sentry · linear

Narrowcast a campaign to a geographic or behavioral segment

👤 Growth teams running targeted pushes ⏱ ~20 min advanced

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

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

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

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

Combinações

Combine com outros MCPs para 10× de alavancagem

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

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
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

Custo e limites

O que custa rodar

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

Segurança

Permissões, segredos, alcance

Escopos mínimos: Channel access token (long-lived, Messaging API)
Armazenamento de credenciais: CHANNEL_ACCESS_TOKEN and CHANNEL_SECRET in env vars
Saída de dados: All calls to api.line.me and api-data.line.me
Nunca conceda: Channel secret to client-side code — it's for webhook signature verification only

Solução de problemas

Erros comuns e correções

401 Invalid channel access token

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

Verificar: 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.

Verificar: Call get_message_quota

Alternativas

LINE Bot vs. outros

AlternativaQuando usarTroca
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

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills