LINE published an official MCP server for its Messaging API, which means an AI agent can now drive a LINE Official Account directly — sending messages, broadcasting promotions, and pushing Flex Message cards without writing any API code.
I set it up with Codex and worked through every capability the server exposes, from creating a fresh account to delivering a message to a real phone. This guide is the result: a complete walkthrough, and an honest account of the three places where the documentation and reality diverge.
Key takeaways
- MCP is agent-agnostic. The same LINE server works with Codex, Claude Desktop, and Cline — only the config file format changes, from TOML to JSON.
-
Codex stores MCP config in TOML, at
~/.codex/config.toml. Most guides assume the JSON format used by Claude Desktop, which is the single most common setup mistake. -
Verified account and API-capable account are different things. A free account can use the Messaging API, but
get_follower_idsreturns 403 Forbidden until the account is verified or on a premium plan. - Official security advice can conflict with official features. LINE's example config disables npm install scripts, which also prevents the headless browser that the rich menu tool depends on from being installed.
- Agents have habits. Codex is a coding agent first: asked in natural language to build a rich menu, it wrote a Node script instead of calling the MCP tool. Naming the tool explicitly in the prompt fixes it.
-
Broadcasts cannot be recalled. Set
default_tools_approval_mode = "writes"so the agent asks before any send.
Every screenshot comes from the actual working setup, including the errors.
The article is available in both English and Thai.
Top comments (0)