mcp-to-line messaging api translation layer
Implements a bidirectional protocol adapter that translates Model Context Protocol tool calls from AI agents (like Claude) into LINE Messaging API requests using the @line/bot-sdk. The server uses StdioServerTransport for stdio-based communication with the AI agent and converts structured MCP tool invocations into authenticated LINE API calls, handling schema validation via Zod before transmission.
Unique: Uses MCP's stdio-based transport protocol as the primary integration point rather than REST webhooks, enabling direct stdio communication between AI agents and the LINE server without requiring HTTP infrastructure or webhook URL exposure
vs alternatives: Simpler than building custom REST API wrappers because it leverages MCP's standardized tool-calling interface, reducing boilerplate and making the integration portable across any MCP-compatible AI agent
targeted text message delivery to individual users
Implements the push_text_message tool that sends plain-text messages to a specific LINE user by user ID. The tool accepts a message.text parameter and optional user_id, validates input via Zod schema, and invokes the LINE Bot SDK's client.pushMessage() method with the user ID and text message object, returning the LINE API response with message metadata.
Unique: Exposes LINE's pushMessage API as a discrete MCP tool with Zod-validated schemas, allowing AI agents to invoke messaging without understanding LINE SDK internals or managing authentication tokens
vs alternatives: More direct than building a custom REST endpoint because it integrates directly into the agent's tool-calling interface, eliminating the need for agents to construct HTTP requests or parse LINE API documentation
rich interactive message delivery via flex messages
Implements push_flex_message and broadcast_flex_message tools that send LINE's Flex Message format (JSON-based rich messages with buttons, carousels, and interactive components) to individual users or all followers. The tools accept message.altText (fallback text), message.content or message.contents (Flex message JSON structure), validate via Zod, and invoke the LINE Bot SDK's pushMessage() or broadcastMessage() methods with the Flex message object.
Unique: Exposes both targeted (push_flex_message) and broadcast (broadcast_flex_message) variants as separate tools, allowing agents to choose between individual delivery and mass distribution without conditional logic
vs alternatives: Enables agents to send interactive UI elements (buttons, carousels) directly through the messaging interface, whereas plain text tools require agents to describe actions in prose or use external link generation
broadcast text messaging to all followers
Implements the broadcast_text_message tool that sends a plain-text message to all followers of a LINE Official Account without requiring individual user IDs. The tool accepts message.text, validates via Zod, and invokes the LINE Bot SDK's broadcastMessage() method, which distributes the message to the entire follower base in a single API call.
Unique: Separates broadcast messaging into its own tool distinct from targeted push_text_message, forcing agents to explicitly choose between one-to-one and one-to-many delivery patterns rather than inferring intent from missing user IDs
vs alternatives: Simpler than agents managing follower lists or pagination because LINE's broadcastMessage API handles distribution server-side, eliminating the need for agents to query user lists or batch messages
user profile retrieval and caching
Implements the get_profile tool that retrieves a LINE user's profile information (display name, profile picture URL, status message) by user ID. The tool invokes the LINE Bot SDK's getProfile() method, which queries LINE's user profile API and returns structured profile data. The server does not implement caching, so repeated calls for the same user incur API latency.
Unique: Exposes LINE's getProfile API as a discrete MCP tool, allowing agents to fetch user metadata on-demand without managing SDK client initialization or error handling
vs alternatives: Enables agents to personalize responses with user names and pictures without requiring agents to parse webhook payloads or maintain user databases, delegating profile storage to LINE
environment-based default user targeting
Implements optional DESTINATION_USER_ID environment variable that serves as a fallback user ID when push_text_message or get_profile tools are invoked without an explicit user_id parameter. The server reads this variable at startup and uses it as the default target for message delivery, reducing boilerplate in agent configurations where a single primary user is the primary recipient.
Unique: Uses environment variables for runtime configuration rather than hardcoding or requiring agent-side configuration, enabling deployment-time customization without rebuilding the server
vs alternatives: Simpler than agents managing user ID routing logic because the server centralizes default targeting, reducing conditional logic in agent tool calls
zod-based input validation and schema enforcement
Integrates Zod schema validation library to validate all tool parameters (message text, user IDs, Flex message structures) before invoking LINE Messaging API calls. The server defines Zod schemas for each tool's input, validates incoming MCP tool calls against these schemas, and returns validation errors to the agent if parameters are malformed or missing required fields.
Unique: Uses Zod for declarative schema validation rather than imperative if-checks, enabling reusable, composable validation logic that can be extended without modifying tool implementation code
vs alternatives: More maintainable than manual parameter validation because Zod schemas serve as both validation logic and documentation, reducing the gap between spec and implementation
docker-based deployment packaging
Provides a Dockerfile and Docker Compose configuration enabling the LINE Bot MCP Server to be containerized and deployed in Docker environments without requiring Node.js installation on the host. The Docker image includes Node.js v20+, installs dependencies via npm, and exposes the server via stdio for MCP client communication.
Unique: Provides both Dockerfile and Docker Compose templates, enabling both single-container deployments and multi-container orchestration without requiring users to write Docker configurations from scratch
vs alternatives: Simpler than manual Node.js installation and dependency management because Docker encapsulates all runtime requirements, reducing deployment friction and environment-specific issues
+2 more capabilities