line-oa-mcp-ultimate
Operate your LINE Official Account from any AI agent through natural language.
README
<div align="center">
LINE OA MCP Ultimate
Operate your LINE Official Account from any AI agent — through natural language.
Quick Start · What you can do · Configuration · Documentation
</div>
What is this?
line-oa-mcp-ultimate is a Model Context Protocol server that lets AI agents drive your LINE Official Account through natural conversation — no code, no API knowledge required.
It works with Claude Cowork, Claude Code, Cursor, Codex, ChatGPT desktop, or any MCP-compatible host.
Disclaimer: This is an independent open-source project. It is not affiliated with or endorsed by LY Corporation / LINE Corp. "LINE" is a registered trademark of LY Corporation, used here in a descriptive sense.
Why use it?
LINE OA Manager works well — but it's a web UI you have to log into, click through, and operate manually. With this MCP server, the same operations become natural-language requests in your AI host of choice:
| Instead of clicking through LINE OA Manager... | Just say... |
|---|---|
| Open broadcast composer → pick audience → write text → preview → schedule | "Send a Mother's Day promo to my Bangkok-based 25-44 female audience" |
| Navigate Insight → Delivery → pick date range → screenshot | "Summarize last week's performance" |
| Open Audience → create from upload → upload CSV → wait | "Create an audience from this CSV: customers_last_month.csv" |
| Open Rich Menu → design tabs → upload images → set as default | "Build a Mother's Day rich menu and set it as default" |
| Open Coupon → check usage tab → cross-reference clicks | "How many people redeemed my Mother's Day coupon?" |
The MCP server takes care of LINE Messaging API calls, pre-flight validation, quota safety, quiet-hour warnings, and Thai-localized templates. You stay in your AI host and operate your OA the way you think about it — by intent.
Who is it for?
- 🪐 AI-first marketers who run a LINE OA from their AI workspace.
- 🏪 SMB owners who already use LINE OA as their primary customer channel and want to automate routine work.
- 🏢 Marketing agencies managing many client OAs from one dashboard.
- 💻 Developers building LINE-integrated SaaS, automations, or AI bots.
Free-tier ready — no Premium upgrade required for the core feature set.
What you can do
27 tools + 4 resources + 7 guided prompts, grouped by what you actually want to do:
📨 Send messages (3 tools)
One universal send_message covers every LINE transport (reply / push / multicast / narrowcast / broadcast). Three modes: send_now, draft (for scheduling via LINE OA Manager UI), and dry_run (validate + estimate cost without sending). Includes typing indicator and Thai-friendly sticker search.
🎨 Rich Menus (4 tools)
Build a rich menu in one call — create + upload image + set as default. List existing menus, delete with cleanup, or diagnose "why doesn't this user see my menu?".
💎 Flex Messages (1 tool)
Design Flex Messages from 8 Thai-localized templates (receipt, voucher, shipping update, promo, thank you, ...) or raw JSON. Returns ready-to-send Flex JSON plus a LINE Flex Simulator preview URL.
🎯 Audiences (4 tools)
Build retargeting audiences from a CSV or from prior broadcast engagement (people who clicked your previous send). The audience your CRM never had.
📊 Insights (4 tools)
Quick OA status snapshot, weekly markdown reports, per-broadcast engagement stats, and pre-flight send cost estimation.
🎟 Coupons (2 tools)
Create, list, get, and discontinue coupons. Pull redemption analytics by combining coupon details with click-audience tracking.
🔌 Webhook (1 tool)
Test your OA's webhook URL and surface LINE's signature verification result — quick to diagnose "why isn't my bot responding?".
👤 Operations (5 tools)
User profile lookup, follower listing, multi-OA listing and switching, and run_on_many_oas for agencies that need to run a read-only tool across all client OAs in parallel.
💻 Developer Pack (3 tools)
LIFF lifecycle management plus code generators for LIFF SDK init (5 frameworks) and a full LINE Login OAuth scaffold.
Resources — auto-refreshing OA snapshot, Flex template catalog, sticker catalog with mood-keyword index, and a Thai festival calendar with marketing promo patterns.
Prompts — guided workflows for daily reports, campaign building, broadcast scheduling, rich menu diagnosis, coupon campaigns, LINE Notify migration, and webhook setup.
Quick Start
Requirements
- Node.js 20 or later
- A LINE Official Account with Messaging API enabled
- A Channel Access Token
No database, no Playwright, no CDN, no public URL, no scheduler infrastructure required.
Step 1 — Get your Channel Access Token
- Open the LINE Developers Console.
- Pick your provider → open (or create) a Messaging API channel.
- Open the Messaging API tab → scroll to Channel access token → click Issue.
- Copy the long-lived token. Treat it like a password.
If you don't yet have a LINE Official Account, follow LINE's getting started guide.
Step 2 — Add the MCP server to your AI host
Paste the following block into your host's MCP config file (see table below):
{
"mcpServers": {
"line": {
"command": "npx",
"args": ["-y", "line-oa-mcp-ultimate"],
"env": {
"LINE_CHANNEL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
Where to find the config file:
| Host | Where to add it |
|---|---|
| Claude Cowork | Settings → Developer → Local MCP servers → Edit Config |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Code | Run claude mcp add line or edit ~/.config/claude/mcp.json |
| Cursor / Codex / ChatGPT desktop | See your host's MCP setup docs — same JSON shape |
⚠️ Don't replace existing MCP servers. Add the
"line"entry alongside any existing entries insidemcpServers.
Step 3 — Restart your AI host
Quit completely (Cmd+Q on macOS) and reopen. On first start the host runs npx -y line-oa-mcp-ultimate, downloads the package from npm, and caches it for subsequent starts.
Step 4 — Verify
In a new chat, try:
Show my LINE OA status
or in Thai:
ดูสถานะ OA หน่อย
You should see a health card with friend count, monthly quota, webhook status, and the default rich menu. That's it — you're now operating your LINE OA from your AI agent.
Configuration
Single-OA mode (default — for most users)
That's the Step 2 snippet above. One environment variable, one OA. Suitable for individual creators, course makers, and most SMB owners.
Multi-OA mode (for agencies)
If you manage several LINE OAs (your own plus client accounts), copy the config.example.json shipped with this repo to your home directory:
mkdir -p ~/.line-mcp
cp config.example.json ~/.line-mcp/config.json
Open ~/.line-mcp/config.json and fill in one entry per OA:
{
"default_oa": "main",
"oas": {
"main": {
"channel_access_token": "TOKEN_1",
"display_name": "Main OA",
"region": "TH"
},
"client_a": {
"channel_access_token": "TOKEN_2",
"display_name": "Client A — Bangkok Cafe"
}
}
}
Then drop the LINE_CHANNEL_ACCESS_TOKEN env var from your MCP config — the server discovers ~/.line-mcp/config.json automatically.
Resolution order:
LINE_MCP_CONFIGenv var (custom path)~/.line-mcp/config.jsonLINE_CHANNEL_ACCESS_TOKENenv var (single-OA fallback)
Switching the active OA at runtime
Ask your AI host:
"Switch to client_a"
→ line_use_oa({ oa_id: "client_a" })
Or override per-call with the oa parameter on any tool.
Advanced — HTTP transport (self-hosted)
For agencies running a shared remote instance, the server also supports Streamable HTTP. See docs/http-transport.md.
Documentation
| Doc | What's in it |
|---|---|
| docs/quickstart-th.md | Thai-language quick start (5-minute walkthrough) |
| docs/multi-oa-setup-th.md | Multi-OA configuration guide (Thai) |
| docs/http-transport.md | Streamable HTTP transport for self-hosted / remote use |
| examples/ | Runnable examples |
Versioning
This project follows Semantic Versioning. Current release: v1.0.0.
Roadmap
- v1.x — Outbound operations (current).
- v2.x — Companion inbound package: webhook ingestion, chat 1:1 reply, auto-reply rules, greeting messages, chat tags.
- v3.x — Hosted SaaS for agency multi-tenant use.
Contributing
PRs are welcome. Please open an issue first to discuss substantial changes.
When contributing:
- Tool names:
line_{action}_{resource}(snake_case, prefixline_). - Tool descriptions: English (for LLMs) — Thai examples encouraged.
- User-facing strings: Thai-friendly (centralized in
src/i18n/th.ts). - Pre-flight validation on every send tool.
- Quota Guardian + Quiet Hours on every consumption tool.
Author
Dr. Wasin Treesinthuros (พี่โต / Dr. Wasin / #จารโต)
- CEO at Innovation Vantage
- Founder at ForgeAI — AI Transformation Studio
- LINE Certified Coach 2026
- AI Transformation educator, SaaS builder, university lecturer
This project is part of a broader mission to bring production-grade AI automation to every Thai practitioner — regardless of technical background.
GitHub: @wasintoh
License
MIT © Dr. Wasin Treesinthuros — Innovation Vantage / ForgeAI
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.