line-mcp
Provides integration with a personal LINE account, allowing users to read, search, and answer chats, decrypt end-to-end-encrypted messages and media, and send texts, reactions, files, and voice messages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@line-mcpWhat did I miss on LINE today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unofficial โ use at your own risk. This is built on okline, which reproduces the protocol of the LINE Chrome extension. It isn't affiliated with or endorsed by LY Corporation, and unofficial clients can get an account restricted. It logs in as a companion device, so your phone stays logged in. The server rate-limits itself, but keep your usage human-like.
What you can ask
Once it's connected, just talk to Claude:
"What did I miss on LINE today?"
"Summarize the family group chat from this week."
"Find the message where Sarah sent the restaurant address."
"Show me the photo Ken sent this morning." (encrypted images are decrypted)
"Has everyone in the team group read my last message?"
"Reply 'on my way ๐' to Mai's last message." (Claude asks you first)
"Wait for a reply from the landlord and tell me when it comes."
Related MCP server: line-desktop-mcp
Features
๐ฌ Chats & messages. Contact and group names, sender names (even for group members who aren't your friends), replies, stickers, files, locations, and paging back through history.
๐ End-to-end encryption. Letter Sealing messages and media are decrypted locally, including the messages you sent yourself.
๐ Instant search. A local store of every message the server has seen. Substring search works for Thai, Japanese and other scripts without word spacing.
โก Real time. Subscribes to LINE's operation stream (like the Chrome extension does) for new messages, unsends and read notices, and catches up after a restart.
โ๏ธ Acting as you. Text, replies, photos, videos, files, voice messages, stickers, reactions, unsend and mark-read. All of these are flagged as write tools, so your client asks before using them.
๐ Read receipts. Who has read what, and when.
๐ Login from the chat. When the session expires, Claude shows the QR code right in the conversation.
๐ก๏ธ Careful by default. About 4 requests per second, at most 10 outgoing actions per minute, key caching, and secrets stored
600.
Quick start
You need Node.js 18+ installed (LINE's request signing runs in it). Then pick the option that fits how you work.
Option 1: Claude Desktop, one click
Download
line-mcp.mcpband double-click it. Claude Desktop installs everything, including Python.In a new chat, say "log me in to LINE". Claude shows a QR code; scan it with LINE on your phone (Home โ QR scanner), then type the PIN Claude gives you.
That's it, no terminal needed.
Option 2: any app, one command
uv tool install git+https://github.com/itsloukman/line-mcp # or: pipx install git+https://github.com/itsloukman/line-mcp
line-mcp setupsetup checks Node, logs you in (QR in the terminal), detects your MCP apps and adds itself to the ones you choose. It supports Claude Desktop, Claude Code, OpenAI Codex, Cursor, Windsurf, VS Code and Gemini CLI. Existing config files are merged, never overwritten, and backed up as *.bak-line-mcp.
To target specific apps later:
line-mcp install codex cursor # or: --all
line-mcp uninstall cursor
line-mcp install --print # print a JSON snippet for any other clientOption 3: configure by hand
Each snippet uses uvx to run straight from GitHub, so there's nothing to install except uv. Log in first with uvx --from git+https://github.com/itsloukman/line-mcp line-mcp login, or ask your assistant to "log me in to LINE".
claude mcp add --scope user line-personal -- uvx --from git+https://github.com/itsloukman/line-mcp line-mcp serve[mcp_servers.line-personal]
command = "uvx"
args = ["--from", "git+https://github.com/itsloukman/line-mcp", "line-mcp", "serve"]Paste into claude_desktop_config.json, ~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json or ~/.gemini/settings.json:
{
"mcpServers": {
"line-personal": {
"command": "uvx",
"args": ["--from", "git+https://github.com/itsloukman/line-mcp", "line-mcp", "serve"]
}
}
}GUI apps start servers with a minimal PATH. If yours can't find uvx, use its absolute path (which uvx).
{
"servers": {
"line-personal": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "git+https://github.com/itsloukman/line-mcp", "line-mcp", "serve"]
}
}
}Why isn't this a "custom connector"? Custom connectors in the Claude app are remote servers you add by URL. line-mcp runs locally on purpose: your LINE login keys and decrypted messages never leave your computer. The one-click .mcpb extension (Option 1) is the local equivalent.
Tools
Read tools carry readOnlyHint, so clients can auto-approve them. Everything that acts as you is a write tool, so the client asks first. Tools run in worker threads, so a slow search or wait never blocks the others.
Tool | What it does |
| Profile, E2EE status, local store and live-sync status |
| Recent chats with names, unread counts and a last-message preview |
| Messages, decrypted, oldest first. Pass the oldest id as |
| Chat info, find a DM, the latest message with a contact |
| The messages around a specific message |
| Substring search over everything stored, newest first |
| Pull a chat's history into the store so search covers it |
| What arrived recently |
| Wait for the next incoming message |
| Who has read the chat, and up to where |
| Contacts, groups and group members (with names) |
| An image message, returned as an image (E2EE decrypted) |
| Any media, saved to disk (E2EE decrypted) |
Tool | What it does |
| Send a text, optionally as a reply |
| Photo, video or document (photos arrive as photos) |
| Voice message |
| Sticker (only packs you own) |
| ๐ nice ยท โค๏ธ love ยท ๐ fun ยท ๐ฎ amazing ยท ๐ข sad ยท ๐ฑ omg |
| Recall one of your messages for everyone |
| Mark a chat read. This sends read receipts |
line_login_start returns the QR code as an image in the chat. line_login_status reports progress and gives the PIN to type on your phone. Logging in again usually skips the PIN.
How it works
flowchart LR
C["Claude / any MCP client"] <-- "stdio (MCP)" --> S["line-mcp serve"]
S <-- "HTTPS, X-Hmac signed" --> G["LINE Chrome gateway"]
G -- "SSE operation stream" --> S
S --- N["Node bridge<br/>(LINE's LTSM WASM:<br/>signing + E2EE keys)"]
S --- D[("~/.line-mcp<br/>session.json ยท messages.db")]Login replays the LINE Chrome extension's QR flow. Your phone approves this computer as a companion device and hands it the Letter Sealing keychain, which is stored in
session.json.Requests are signed by LINE's own WASM module, run in a small Node.js process. That's why Node is required.
E2EE messages are decrypted locally. Media is downloaded and decrypted the same way the extension does it (HKDF โ AES-CTR plus an HMAC check).
Live sync follows LINE's operation stream, saving its position so it can resume after a restart. A once-a-minute check fills the gaps, such as messages you send from your phone.
Privacy & safety
Everything stays on your machine. There's no third-party server; the only network traffic goes to LINE.
~/.line-mcp/holds secrets.session.jsonhas your tokens and E2EE private keys, andmessages.dbhas decrypted message text. Both are created mode600in a700directory. Never commit or share them.Don't want a local copy? Set
LINE_MCP_STORE=offto disable the message store. You lose search history, new-message queries and waiting.For agent builders: treat every write tool as acting in the user's name. Get explicit approval of the exact text or action, every time.
Configuration
Variable | Default | Purpose |
|
| Where the login session lives |
| auto-detected | Path to |
|
|
|
|
| Where the store lives |
|
| How often the backup check runs |
|
| Cap on outgoing actions |
Troubleshooting
Run line-mcp doctor first. It checks Node, the session file and its permissions, the login, the E2EE keys and the store.
Symptom | Fix |
"Node.js not found" | Install Node 18+, or set |
"LINE rejected the session" | Ask Claude to log you in ( |
Messages show "[encrypted message โ could not decrypt]" | The E2EE keys are missing or stale. Log in again |
"only send stickers you own" | LINE only allows stickers from packs in your collection |
The QR code expired | They last about 2 to 3 minutes. |
Limits
History: LINE serves a companion device only about the last two weeks of history. Anything older is only searchable if the store saw it while it was recent.
Stickers: you can only send stickers from packs you own.
Groups: okline can't create a group's first E2EE key, so sending into a sealed group that has never had an encrypted message may fail.
okline version: pinned to
<2.8, because this server patches parts of okline's E2EE internals.
Development
# build the Claude Desktop extension: npx @anthropic-ai/mcpb pack . dist/line-mcp.mcpb
git clone https://github.com/itsloukman/line-mcp && cd line-mcp
uv venv venv && uv pip install -p venv/bin/python -e '.[test]'
venv/bin/python -m pytest -q # offline tests, no LINE account neededCredits & license
MIT. Built on okline; check its license and terms too. LINE is a trademark of LY Corporation. This project is not affiliated with it, and the logo is original artwork.
This server cannot be deployed
Maintenance
Related MCP Connectors
Your personal data for AI โ Telegram, bank, courses, Zoom & more, scoped to you.
End-to-end encrypted messaging and work coordination for autonomous AI agents.
Give any AI assistant real-time access to your phone's GPS and location history.
Cross-device AI memory with encrypted activity capture and context handoff between AI tools
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI tools to read and send messages through LINE Desktop via MCP, supporting manual or automatic sending without official LINE API tokens.44 npm116MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI tools to read and send LINE messages by automating the LINE Desktop application, with macOS OCR-based reading and idle-aware scheduling.44 npmMIT
- AlicenseAqualityAmaintenanceEnables AI agents to read, reply, send images, and search LINE messages by logging in as a secondary device, without official API or browser.4138 npm2MIT
- AlicenseAqualityAmaintenanceA read-only MCP server that lets AI search and read both sides of a user's own LINE Desktop chat history on macOS using local database snapshots, without needing a LINE Official Account or altering unread state.61MIT