Skip to main content
Glama
line-render-mcp

line-render-mcp

by pdasource

面向 Render 的 LINE Webhook + 远程 MCP

此服务提供两个公开端点:

  • POST /callback — 受 LINE_CHANNEL_SECRET 保护的 LINE Messaging API Webhook。

  • GET, POST, DELETE /mcp — 使用 MCP_API_KEY 作为 Bearer 令牌保护的 Streamable HTTP MCP 端点。

它能做什么

  • 向用户 ID (U...) 或群组 ID (C...) 发送 LINE 文本消息。

  • 发送 LINE Flex 消息。

  • 报告消息配额。

  • 接收群组 Webhook,并公开服务启动以来收到的群组 ID。

Related MCP server: Python LINE MCP Server

部署到 Render

  1. 将此目录推送到一个 私有 GitHub 仓库。不要提交 .env。

  2. 在 Render 中,选择 New > Blueprint,选择该仓库,并从 render.yaml 创建服务。

  3. 在 Render 服务的 Environment 选项卡中设置:

    • CHANNEL_ACCESS_TOKEN

    • LINE_CHANNEL_SECRET

    • DESTINATION_ID(可选)

    • 将生成的 MCP_API_KEY 保密。

  4. 部署成功后,复制公共 URL。它看起来类似 https://line-render-mcp.onrender.com。

  5. 在 LINE Developers Console > Messaging API 中:

    • 将 Webhook URL 设置为 https://line-render-mcp.onrender.com/callback;

    • 点击 Verify;

    • 打开 Use webhook;

    • 如需群组投递,请启用 Allow bot to join group chats。

  6. 在 ChatGPT Business 工作区中,使用端点 https://line-render-mcp.onrender.com/mcp 创建自定义 App,并配置为发送 Authorization: Bearer <MCP_API_KEY>,且只启用你需要的工具。

本地测试

npm install
Copy-Item .env.example .env
# Fill the values in .env, then:
npm run dev

如需进行 Webhook 测试,请仅在开发阶段使用公共 HTTPS 隧道。生产环境请使用 Render 的 URL。

安全说明

  • 绝不要把 LINE 访问令牌或 MCP_API_KEY 放进源代码、Issue 或公共仓库中。

  • 保持 Render 仓库私有。

  • MCP_API_KEY 可以发送 LINE 消息。若泄露,请立即轮换。

  • get_known_groups 目前仅将 ID 存储在进程内存中。在跨重新部署或多个服务实例依赖它之前,请先使用数据库。

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to send LINE messages, including text, stamps, Flex Messages, and check message quotas through the LINE Messaging API.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables language models to read and analyze LINE Bot conversations through a standardized MCP interface. Supports text, sticker, and image messages with webhook event handling and message storage in JSON format.
    20
    -
  • A
    license
    A
    quality
    A
    maintenance
    MCP server that integrates the LINE Messaging API to enable AI agents to send messages and manage LINE Official Accounts.
    12
    3,602 npm
    796
    Apache 2.0
  • A
    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.
    62 npm
    Apache 2.0