line-mcp
Give your coding agents your LINE chats. line-mcp keeps a local SQLite copy of one personal LINE account and serves it over MCP, so Claude Code, Codex and T3 Code can read, search and answer your messages.
[!WARNING]
line-mcp is an unofficial client, not affiliated with or endorsed by LINE. It speaks LINE's private protocol through LINEJS. Using it may break LINE's terms of use, and LINE may restrict or ban an account that uses it. Use it at your own risk.
Quick start
You need Node 24.18 or a later Node 24, or Node 26 or later, on macOS, Linux with systemd or Windows, and the LINE app on your phone, logged in to the account.
npm i -g line-mcp-server
line-mcp login # scan the QR code with LINE on your phone, then enter the PIN
line-mcp install # start the background daemon
line-mcp doctor # check the setup without contacting LINE
line-mcp joins the account as a secondary device; the phone stays the primary one. From then on the daemon syncs every chat, starts again after a reboot, and serves MCP at http://127.0.0.1:47822/mcp. If LINE ends the session, it keeps serving the local archive, shows a desktop notification and waits for another login.
Linux and Windows have a few extra requirements: see Platforms.
Connect your agent
Claude Code
claude plugin marketplace add stickerdaniel/line-mcp-server
claude plugin install line-mcp-server@line-mcp-server
Codex
codex plugin marketplace add stickerdaniel/line-mcp-server
codex plugin add line-mcp-server@line-mcp-server
The plugin connects the agent to the running daemon and adds the line-mcp skill. T3 Code runs Claude Code and Codex, so it needs nothing else.
Without the plugin, or with another port
The plugins expect the default port. Otherwise add the server by hand, with your LINE_MCP_PORT in place of 47822.
Claude Code:
claude mcp add --transport http --scope user line http://127.0.0.1:47822/mcp
Codex, in ~/.codex/config.toml:
[mcp_servers.line]
url = "http://127.0.0.1:47822/mcp"
# Attachment downloads can take longer than the 60 s default.
tool_timeout_sec = 180
For the skill, link or copy plugins/line-mcp-server/skills/line-mcp/ from this repository into the agent's skills directory. It runs line-mcp from PATH, where the npm install puts it.
Tools
| Tool | What it does |
|---|
query | Read-only SQL over the local archive: chats, names, messages, read state, full-text search. |
status | Session health, last sync times, coverage gaps, backfill progress and the archive time zone. |
get_attachment | Metadata of an image, video, audio or file message, or the file saved to a private cache. |
get_announcements | Pinned announcements of a group, room or OpenChat. |
get_profile | Your own profile, another LINE user's, or an OpenChat member's. |
send_message | Sends text, an image or a file, optionally as a reply. |
react | Reacts to a message. |
unsend | Unsends one of your messages for everyone. |
Reads never mark anything as read. Every send, reaction and unsend needs an idempotency_key: a retry with the same key and arguments never acts twice. A result with state unknown means LINE may have acted: check the chat before you retry with a new key. Any local process can call these tools: see SECURITY.md.
CLI
Every tool is also a line-mcp command that calls the running daemon:
line-mcp query --sql "
SELECT local_time(sent_at), text FROM message
WHERE instr(text, '晚餐') ORDER BY sent_at DESC LIMIT 5"