Personal, single-account LINE MCP server for Cloudflare Workers. It uses
linejs and is intentionally restricted
to an allowlisted GitHub user.
line_account_statusline_list_chatsline_get_recent_messagesline_prepare_text_messageline_send_prepared_message
Messages are text-only. Sending is always a two-step operation: prepare a draft, then consume its five-minute, one-time confirmation token.
- The required dedicated KV namespaces are already configured in
wrangler.jsonc; do not reuse them for another application. - Create a GitHub OAuth App. Its callback URL is
https://<worker-domain>/oauth/github/callback; the same app also secures/admin/login. - Copy
.dev.vars.exampleto.dev.varsfor local development. For each Cloudflare environment, setGITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,LINE_STATE_ENCRYPTION_KEY,LINE_EMAIL, andLINE_PASSWORDusingwrangler secret put. The LINE email and password are Cloudflare secrets and are never accepted through the admin page or stored in Durable Object storage. - Run
npm installandnpm run check. Cloudflare deployment is performed through the Cloudflare MCP, not GitHub Actions. - Open
https://<worker-domain>/admin/login, authenticate with the allowlisted GitHub user, and begin LINE email/password login. If LINE asks for it, confirm the displayed PIN in the LINE app. Do not expose this URL to untrusted users.
Connect an MCP client to https://<worker-domain>/mcp. The server publishes
OAuth discovery endpoints automatically; authorize with the configured GitHub
account.
- LINE authentication tokens, certificates, and E2EE state are encrypted with
LINE_STATE_ENCRYPTION_KEYinside the single Durable Object. The initial LINE email and password remain Cloudflare secrets. - Only audit metadata is stored: action, actor, time, hashed chat ID, text length, and outcome. Message bodies and credentials are not logged.
- The send limit is 20 messages per 10 minutes. Confirmation tokens are bound to the GitHub user and cannot be reused.
linejsis a SelfBot library. Use only an account you control and review LINE's current terms and account-risk implications before deploying.