KosmoKrator

messaging

LINE Messaging MCP Integration for Vercel AI SDK

Connect LINE Messaging to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

5 functions 3 read 2 write Bearer token auth

Connect LINE Messaging to Vercel AI SDK

Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.

Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with --write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.

LINE Messaging MCP Config for Vercel AI SDK

Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.

{
  "mcpServers": {
    "kosmokrator-line": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=line",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=line --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only LINE Messaging instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

LINE Messaging Tools Visible to Vercel AI SDK

Vercel AI SDK sees stable MCP tool names generated from the LINE Messaging integration catalog.

MCP toolSource functionTypeDescription
integration__line__line_send_message line.line_send_message Write Send a push message to a specific LINE user, group, or room. Supports text, image, video, sticker, location, flex, and other message types.
integration__line__line_broadcast_message line.line_broadcast_message Write Broadcast a message to all users who have added the LINE Official Account as a friend. Supports all message types.
integration__line__line_get_profile line.line_get_profile Read Get the profile information of a LINE user, including display name, profile image URL, status message, and language.
integration__line__line_list_friends line.line_list_friends Read List the friends (followers) of the LINE Official Account. Returns user IDs that can be used with send_message and get_profile.
integration__line__line_get_current_user line.line_get_current_user Read Get the profile of the LINE Official Account (bot) itself, including display name, icon URL, and basic info.

Related LINE Messaging Pages