Skip to main content
Glama
zendbot-line-mcp-server

zendbot-line-mcp-server

by MNGCS10

zendbot-line-mcp-server

Remote MCP server that lets Claude (Cowork / claude.ai) send and inspect LINE OA messages for ทัวริสอัส, by proxying the already-deployed zendbot-line-console Worker instead of talking to the LINE Messaging API directly.

Claude / Cowork  ──MCP (Streamable HTTP)──▶  zendbot-line-mcp-server (this repo)
                                                        │  HTTPS + X-Console-Password
                                                        ▼
                                          zendbot-line-console Worker (existing)
                                                        │  Bearer <LINE token>
                                                        ▼
                                              LINE Messaging API

No new LINE channel token, no duplicated sending logic — this is a thin, auth-gated adapter in front of the console you already run in production.

Tools exposed

Tool

Type

What it does

line_get_dashboard

read-only

Quota/usage/followers/estimated cost

line_list_contacts

read-only

Known contacts (userId, name, last seen)

line_get_profile

read-only

Look up one user's display name by userId

line_send_push_message

write

Text message to ONE user

line_send_multicast_message

write

Text message to a specific list of userIds

line_send_broadcast_message

write, destructive

Text message to ALL followers — requires confirm: true, no confirm = nothing is sent

All five map onto the console's existing /api/dashboard, /api/contacts, /api/profile, and /api/send (push/multicast/broadcast) routes.

Related MCP server: LINE OA MCP Ultimate

1. Configure

Edit wrangler.jsonc → vars.CONSOLE_BASE_URL to your deployed zendbot-line-console Worker URL (the same one the console's frontend calls), e.g.:

"vars": {
  "CONSOLE_BASE_URL": "https://zendbot-line-console.<your-account>.workers.dev"
}

2. Install & set secrets

npm install

# Bearer token Cowork/claude.ai will present to THIS server.
# Generate one yourself, e.g.: openssl rand -hex 32
npx wrangler secret put MCP_AUTH_TOKEN

# Same value as the CONSOLE_PASSWORD secret already set on zendbot-line-console.
npx wrangler secret put CONSOLE_PASSWORD

These are two different secrets on purpose:

  • MCP_AUTH_TOKEN protects this MCP server from anyone else calling it.

  • CONSOLE_PASSWORD is what this server forwards to the console — it never touches the LINE channel access token itself, which stays only on the console Worker as today.

3. Deploy

npx wrangler deploy

Note the URL it prints, e.g. https://zendbot-line-mcp-server.<account>.workers.dev. The MCP endpoint is the Worker root (no /mcp suffix needed — the whole fetch handler is the MCP handler).

npx wrangler dev

In another terminal:

npx @modelcontextprotocol/inspector

Point the Inspector at http://localhost:8787 with a Streamable HTTP transport and an Authorization: Bearer <MCP_AUTH_TOKEN> header, then try line_get_dashboard first (read-only, safe) before any send tool.

5. Register as a custom connector in claude.ai / Cowork

  1. claude.ai → Settings → Connectors → Add custom connector

  2. URL: the Worker URL from step 3

  3. Auth: Bearer token = the MCP_AUTH_TOKEN you set in step 2

  4. Save, then enable it for the chat/session you want to use it in

Cowork will then list line_get_dashboard, line_send_push_message, etc. as callable tools.

Safety notes

  • line_send_broadcast_message will refuse to send unless confirm: true is explicitly passed — treat this the same as any other "post publicly" action: get explicit approval for the exact message text before approving that confirm flag.

  • Nothing here reads or stores the LINE channel access token — it stays on zendbot-line-console exactly as today (CLEARKEY principle preserved).

  • Rotate MCP_AUTH_TOKEN any time by re-running npx wrangler secret put MCP_AUTH_TOKEN and updating the connector in claude.ai.

Extending

Natural next tools to add (same pattern — wrap another /api/* route): line_send_flex_message (booking/quote/invoice worksheets), line_send_sticker (official or brand stickers), line_list_followers. Add each as a server.registerTool(...) block in src/index.ts following the existing ones.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables sending LINE messages (push, multicast, broadcast), retrieving user profiles, checking quotas, and sending flex messages via Claude using the LINE Messaging API.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to operate one or many LINE Official Accounts through natural language — sending broadcasts, Flex/Rich/card messages, building rich menus, coupons, audiences, insights, and LINE Shopping operations, with pre-flight quota checks and quiet-hour guardrails.
      141 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude Desktop to connect to a personal LINE account through MCP, reading chats and history, sending messages, and retrieving or sending E2EE images in one-on-one and group conversations without opening LINE Desktop.
      14
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI agent to work LINE Official Account Manager chats like a customer-support person, including listing, reading, searching, viewing profiles and attachments, and optionally sending replies with human approval while remaining read-only by default.
      MIT