{"id":51007208,"url":"https://github.com/wasintoh/line-oa-mcp-ultimate","last_synced_at":"2026-06-20T21:31:59.547Z","repository":{"id":361080473,"uuid":"1252959444","full_name":"wasintoh/line-oa-mcp-ultimate","owner":"wasintoh","description":"Talk to your LINE Official Account through AI. 48 tools (34 messaging + 14 LINE Shopping) — broadcasts, rich menus, Flex, coupons, insights, plus products, orders \u0026 checkout links. Works with Claude Cowork, Claude Code, Cursor \u0026 any MCP host. Zero infrastructure, free-tier ready.","archived":false,"fork":false,"pushed_at":"2026-06-14T15:57:06.000Z","size":343,"stargazers_count":60,"open_issues_count":1,"forks_count":21,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T17:25:15.497Z","etag":null,"topics":["ai-agent","claude","claude-mcp","cursor","ecommerce","line","line-bot","line-messaging-api","line-oa","line-official-account","line-shopping","marketing-automation","mcp","mcp-server","model-context-protocol","myshop","thai","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/line-oa-mcp-ultimate","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasintoh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-29T03:18:49.000Z","updated_at":"2026-06-14T16:04:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wasintoh/line-oa-mcp-ultimate","commit_stats":null,"previous_names":["wasintoh/line-oa-mcp-ultimate"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wasintoh/line-oa-mcp-ultimate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasintoh%2Fline-oa-mcp-ultimate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasintoh%2Fline-oa-mcp-ultimate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasintoh%2Fline-oa-mcp-ultimate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasintoh%2Fline-oa-mcp-ultimate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasintoh","download_url":"https://codeload.github.com/wasintoh/line-oa-mcp-ultimate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasintoh%2Fline-oa-mcp-ultimate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34586666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","claude","claude-mcp","cursor","ecommerce","line","line-bot","line-messaging-api","line-oa","line-official-account","line-shopping","marketing-automation","mcp","mcp-server","model-context-protocol","myshop","thai","typescript"],"created_at":"2026-06-20T21:31:59.482Z","updated_at":"2026-06-20T21:31:59.534Z","avatar_url":"https://github.com/wasintoh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# LINE OA MCP Ultimate\n\n**Operate your LINE Official Account from any AI agent — through natural language.**\n\n[![npm version](https://img.shields.io/npm/v/line-oa-mcp-ultimate.svg)](https://www.npmjs.com/package/line-oa-mcp-ultimate)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%E2%89%A520-brightgreen.svg)](#requirements)\n[![MCP](https://img.shields.io/badge/MCP-1.x-purple.svg)](https://modelcontextprotocol.io)\n\n[Quick Start](#quick-start) · [What you can do](#what-you-can-do) · [Configuration](#configuration) · [Documentation](#documentation)\n\n**🇹🇭 คู่มือภาษาไทย:** [เริ่มต้น 5 นาที](docs/quickstart-th.md) · [Messaging — 34 tools](docs/messaging-guide-th.md) · [LINE Shopping — 14 tools](docs/myshop-guide-th.md)\n\n\u003c/div\u003e\n\n---\n\n## What is this?\n\n`line-oa-mcp-ultimate` is a [Model Context Protocol](https://modelcontextprotocol.io) server that lets AI agents drive your LINE Official Account through natural conversation — no code, no API knowledge required.\n\nManage **one OA or many** — a single account needs just one env var, while agencies can register every client OA in one config file and switch between them with a single command (see [Configuration](#configuration)).\n\nIt works with **Claude Cowork, Claude Code, Cursor, Codex, ChatGPT desktop, OpenClaw, Hermes**, or any MCP-compatible host.\n\n\u003e **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.\n\n---\n\n## Why use it?\n\nLINE 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:\n\n| Instead of clicking through LINE OA Manager... | Just say... |\n|---|---|\n| Open broadcast composer → pick audience → write text → preview → schedule | \"Send a Mother's Day promo to my Bangkok-based 25-44 female audience\" |\n| Navigate Insight → Delivery → pick date range → screenshot | \"Summarize last week's performance\" |\n| Open Audience → create from upload → upload CSV → wait | \"Create an audience from this CSV: customers_last_month.csv\" |\n| Open Rich Menu → design tabs → upload images → set as default | \"Build a Mother's Day rich menu and set it as default\" |\n| Open Coupon → check usage tab → cross-reference clicks | \"How many people redeemed my Mother's Day coupon?\" |\n\nThe 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.\n\n---\n\n## Who is it for?\n\n- 🪐 **AI-first marketers** who run a LINE OA from their AI workspace.\n- 🏪 **SMB owners** who already use LINE OA as their primary customer channel and want to automate routine work.\n- 🏢 **Marketing agencies** managing many client OAs from one dashboard.\n- 💻 **Developers** building LINE-integrated SaaS, automations, or AI bots.\n\n**Free-tier ready** — no Premium upgrade required for the core feature set.\n\n---\n\n## What you can do\n\n**34 messaging tools + 14 LINE Shopping tools (v2.0, opt-in) + 4 resources + 7 guided prompts**, grouped by what you actually want to do:\n\n### 📨 Send messages (2 tools)\nOne 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). Message shapes: text, Flex (template or raw JSON), sticker, **image**, **video**, **native LINE coupon** (`{ coupon_id }`), and a `message_json` passthrough for pre-built Rich/Card messages. Plus Thai-friendly sticker search.\n\n### 🎨 Rich Menus (8 tools)\nBuild a rich menu in one call (create + upload image + set as default), list, delete, and diagnose \"why doesn't this user see my menu?\". Full lifecycle too: **link/unlink** a menu to specific users or in bulk (auto-chunked at 500), **set/clear** the account default, manage rich-menu **aliases** (tab-switching menus), and **swap the image** on an existing menu.\n\n### 💎 Message Design (3 tools)\nDesign **Flex Messages** from 8 Thai-localized templates or raw JSON, build **Rich Messages** (`imagemap` — tappable image regions + optional video), and **Card Messages** (`template` — buttons / confirm / carousel / image_carousel). Each returns ready-to-send JSON you hand to `send_message`.\n\n### 🎯 Audiences (5 tools)\nBuild retargeting audiences from a CSV or from prior broadcast engagement, list, delete — and **update** an existing audience (add users, rename).\n\n### 📊 Insights (5 tools)\nQuick OA status snapshot (incl. chat mode), weekly markdown reports, per-broadcast engagement stats, pre-flight send-cost estimation, and **narrowcast delivery progress** (\"did my blast finish?\").\n\n### 🎟 Coupons (2 tools)\nCreate, list, get, and discontinue native LINE coupons with `line_manage_coupon`, then broadcast a created coupon straight into chats as a native coupon message via `send_message` (`{ coupon_id }`). Pull redemption analytics by combining coupon details with click-audience tracking.\n\n### 🔌 Webhook (2 tools)\nTest your OA's webhook URL and surface LINE's signature verification result, plus **set/get** the webhook endpoint — quick to wire up or diagnose \"why isn't my bot responding?\".\n\n### 👤 Operations (5 tools)\nUser 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.\n\n### 💻 LIFF \u0026 Token (2 tools)\nManage LIFF app lifecycle (create / update / delete / list) and verify your channel access token's validity, expiry, and scope.\n\n### 🛍️ LINE Shopping (14 tools — v2.0, opt-in)\n\nTurn your agent into a storefront operator. These register **only when a MyShop API key is configured** (see [Configuration](#configuration)) — messaging-only users never see them. Powered by the **MyShop Open API** (`X-API-KEY`, no webhook/server required).\n\n- **Products (7):** list, create, update, delete, change price, show/hide, and manage variants — e.g. *\"เพิ่มสินค้าเสื้อยืด 299 บาท สต็อก 50\"*, *\"ลดราคาคอลเลกชันนี้ 15%\"*.\n- **Inventory (1):** set / increase / decrease stock — *\"เติมสต็อก V9 อีก 50\"*.\n- **Orders (4):** list/search (with **polling** for new orders via a scheduled task), get detail, **fulfill** (mark shipped + tracking, mark COD paid, **print parcel label**), and cancel — *\"ออกใบปะหน้าให้ออเดอร์ที่จ่ายแล้ววันนี้\"*.\n- **Settlement + Checkout (2):** see real income after fees, and **create a checkout link to close the sale in chat** — *\"ลูกค้าอยากได้ 2 ชิ้น สร้างลิงก์จ่ายเงิน\"*.\n\n\u003e 📘 **Full Thai guide:** [docs/myshop-guide-th.md](docs/myshop-guide-th.md) — get the API key, every tool explained, real workflows, safety rules, and troubleshooting.\n\n**Resources** — auto-refreshing OA snapshot, Flex template catalog, sticker catalog with mood-keyword index, and a Thai festival calendar with marketing promo patterns.\n\n**Prompts** — guided workflows for daily reports, campaign building, broadcast scheduling, rich menu diagnosis, coupon campaigns, LINE Notify migration, and webhook setup.\n\n---\n\n## Quick Start\n\n### Requirements\n\n- **Node.js 20 or later**\n- A LINE Official Account with Messaging API enabled\n- A Channel Access Token\n\nNo database, no Playwright, no CDN, no public URL, no scheduler infrastructure required.\n\n### Step 1 — Get your Channel Access Token\n\n1. Open the [LINE Developers Console](https://developers.line.biz/console/).\n2. Pick your provider → open (or create) a **Messaging API channel**.\n3. Open the **Messaging API** tab → scroll to **Channel access token** → click **Issue**.\n4. Copy the long-lived token. Treat it like a password.\n\nIf you don't yet have a LINE Official Account, follow [LINE's getting started guide](https://developers.line.biz/en/docs/messaging-api/getting-started/).\n\n### Step 2 — Add the MCP server to your AI host\n\nPaste the following block into your host's MCP config file (see table below):\n\n```json\n{\n  \"mcpServers\": {\n    \"line\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"line-oa-mcp-ultimate\"],\n      \"env\": {\n        \"LINE_CHANNEL_ACCESS_TOKEN\": \"YOUR_TOKEN_HERE\"\n      }\n    }\n  }\n}\n```\n\n**Where to find the config file:**\n\n| Host | Where to add it |\n|---|---|\n| **Claude Cowork** | Settings → **Developer** → Local MCP servers → **Edit Config** |\n| **Claude Desktop** (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| **Claude Desktop** (Windows) | `%APPDATA%\\Claude\\claude_desktop_config.json` |\n| **Claude Code** | Run `claude mcp add line` or edit `~/.config/claude/mcp.json` |\n| **Cursor / Codex / ChatGPT desktop** | See your host's MCP setup docs — same JSON shape |\n\n\u003e ⚠️ **Don't replace existing MCP servers.** Add the `\"line\"` entry alongside any existing entries inside `mcpServers`.\n\n### Step 3 — Restart your AI host\n\nQuit 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.\n\n### Step 4 — Verify\n\nIn a new chat, try:\n\n```\nShow my LINE OA status\n```\n\nor in Thai:\n\n```\nดูสถานะ OA หน่อย\n```\n\nYou 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.\n\n### 🛍️ Want LINE Shopping too? (optional)\n\nAdd `LINE_MYSHOP_API_KEY` to the same `env` block (get it from `oaplus.line.biz` → **Settings → API keys**, Admin role). The full config looks like this:\n\n```json\n{\n  \"mcpServers\": {\n    \"line\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"line-oa-mcp-ultimate\"],\n      \"env\": {\n        \"LINE_CHANNEL_ACCESS_TOKEN\": \"YOUR_TOKEN_HERE\",\n        \"LINE_MYSHOP_API_KEY\": \"YOUR_MYSHOP_API_KEY_HERE\"\n      }\n    }\n  }\n}\n```\n\nRestart your host — that unlocks **14 shopping tools** (products, inventory, orders, parcel labels, settlements, checkout links). Without the key, the server stays messaging-only. See [LINE Shopping](#-line-shopping-14-tools--v20-opt-in), the **[full Thai MyShop guide](docs/myshop-guide-th.md)**, and [Image hosting](#️-image-hosting).\n\n---\n\n## Configuration\n\n### Single-OA mode (default — for most users)\n\nThat's the **Step 2** snippet above. One environment variable, one OA. Suitable for individual creators, course makers, and most SMB owners.\n\n### Multi-OA mode (for agencies)\n\nIf you manage several LINE OAs (your own plus client accounts), create a JSON config file at `~/.line-mcp/config.json` — the server auto-discovers it, so there's nothing to clone or build:\n\n```bash\nmkdir -p ~/.line-mcp\nnano ~/.line-mcp/config.json     # or: code ~/.line-mcp/config.json\n```\n\n\u003e 📘 Full walkthrough (two placement options + security notes) in [`docs/multi-oa-setup-th.md`](docs/multi-oa-setup-th.md). A ready-to-edit template lives in [`config.example.json`](config.example.json).\n\nFill in one entry per OA:\n\n```json\n{\n  \"default_oa\": \"main\",\n  \"oas\": {\n    \"main\": {\n      \"channel_access_token\": \"TOKEN_1\",\n      \"display_name\": \"Main OA\",\n      \"region\": \"TH\",\n      \"myshop_api_key\": \"MYSHOP_KEY_1\"\n    },\n    \"client_a\": {\n      \"channel_access_token\": \"TOKEN_2\",\n      \"display_name\": \"Client A — Bangkok Cafe\"\n    }\n  }\n}\n```\n\n\u003e 🛍️ **LINE Shopping (v2.0):** add `\"myshop_api_key\"` to any OA to enable the 14 shopping tools for it (get it from `oaplus.line.biz` → Settings → API keys, Admin role). In single-OA mode, set the env var `LINE_MYSHOP_API_KEY` instead. OAs without a key simply keep the messaging tools — the shopping tools never appear and never error.\n\nThen **drop the `LINE_CHANNEL_ACCESS_TOKEN` env var** from your MCP config — the server discovers `~/.line-mcp/config.json` automatically.\n\nResolution order:\n\n1. `LINE_MCP_CONFIG` env var (custom path)\n2. `~/.line-mcp/config.json`\n3. `LINE_CHANNEL_ACCESS_TOKEN` env var (single-OA fallback)\n\n### Switching the active OA at runtime\n\nAsk your AI host:\n\n```\n\"Switch to client_a\"\n→ line_use_oa({ oa_id: \"client_a\" })\n```\n\nOr override per-call with the `oa` parameter on any tool.\n\n### Advanced — HTTP transport (self-hosted)\n\nFor agencies running a shared remote instance, the server also supports Streamable HTTP. See [docs/http-transport.md](docs/http-transport.md).\n\n---\n\n## 🖼️ Image hosting\n\nEvery tool that uses an image — broadcast image, rich menu, card, imagemap, flex, **and LINE Shopping products (v2.0)** — needs a **public, direct HTTPS URL** to a JPEG/PNG. LINE fetches the image from that URL, so it must be directly accessible (not a preview page). MyShop has no binary upload endpoint, so host the image first and pass its URL.\n\n- ✅ **Recommended:** Cloudflare R2, AWS S3 (public bucket), `raw.githubusercontent.com`, Cloudinary, ImageKit — stable, direct URLs.\n- ⚠️ **Avoid:** Google Drive / Dropbox share links — they return an HTML preview page, not a direct image, so LINE can't read them reliably.\n\n## Documentation\n\n| Doc | What's in it |\n|---|---|\n| [docs/quickstart-th.md](docs/quickstart-th.md) | Thai-language quick start (5-minute walkthrough) |\n| [docs/messaging-guide-th.md](docs/messaging-guide-th.md) | 📨 **Messaging full guide — Thai.** All 34 tools explained, transports \u0026 send modes, real workflows, safety limits, and troubleshooting |\n| [docs/myshop-guide-th.md](docs/myshop-guide-th.md) | 🛍️ **LINE Shopping (MyShop) full guide — Thai.** Get the API key, all 14 tools explained, real end-to-end workflows, safety rules, and troubleshooting |\n| [docs/clients-setup-th.md](docs/clients-setup-th.md) | Per-host MCP setup — Cowork / Claude Desktop / Cursor / Codex (Thai) |\n| [docs/multi-oa-setup-th.md](docs/multi-oa-setup-th.md) | Multi-OA configuration guide (Thai) |\n| [docs/cowork-local-test-th.md](docs/cowork-local-test-th.md) | Test a local build in Claude Cowork before publishing (Thai) |\n| [docs/http-transport.md](docs/http-transport.md) | Streamable HTTP transport for self-hosted / remote use |\n| [examples/](examples/) | Runnable examples |\n\n---\n\n## Versioning\n\nThis project follows [Semantic Versioning](https://semver.org/). Current release: **v2.0.0**.\n\nLatest changes (v2.0.0): **+14 LINE Shopping tools** via the MyShop Open API — products, inventory, orders (incl. parcel labels), settlements, and checkout links. API-key only, no webhook/server, fully **opt-in** (registers only when a MyShop key is set) and **non-breaking** on the 34 messaging tools. See [RELEASE_NOTES_v2.0.0.md](RELEASE_NOTES_v2.0.0.md).\n\nPreviously (v1.1.0): +10 tools completing LINE's token-only Messaging API surface (rich-menu lifecycle, Rich/Card message builders, audience update, webhook set/get, narrowcast progress, token check). See [RELEASE_NOTES_v1.1.0.md](RELEASE_NOTES_v1.1.0.md).\n\n---\n\n## Roadmap\n\n- **v1.x** — Full token-only Messaging API coverage: outbound + rich-menu lifecycle + Rich/Card message builders + audiences + insights + coupons.\n- **v2.0** — ✅ **LINE Shopping (MyShop Open API)** shipped — products, inventory, orders, parcel labels, settlements, and checkout links (API-key only, no webhook). See [RELEASE_NOTES_v2.0.0.md](RELEASE_NOTES_v2.0.0.md).\n\nFuture direction is guided by real-world usage and community feedback.\n\n---\n\n## Contributing\n\nPRs are welcome. Please open an issue first to discuss substantial changes.\n\nWhen contributing:\n\n- Tool names: `line_{action}_{resource}` (snake_case, prefix `line_`).\n- Tool descriptions: English (for LLMs) — Thai examples encouraged.\n- User-facing strings: Thai-friendly (centralized in `src/i18n/th.ts`).\n- Pre-flight validation on every send tool.\n- Quota Guardian + Quiet Hours on every consumption tool.\n\n---\n\n## Author\n\n**Dr. Wasin Treesinthuros** (พี่โต / Dr. Wasin / #จารโต)\n\n- CEO at Innovation Vantage\n- Founder at ForgeAI — AI Transformation Studio\n- LINE Certified Coach 2026\n- AI Transformation educator, SaaS builder, university lecturer\n\nThis project is part of a broader mission to bring production-grade AI automation to every Thai practitioner — regardless of technical background.\n\nGitHub: [@wasintoh](https://github.com/wasintoh)\n\n---\n\n## License\n\n[MIT](LICENSE) © Dr. Wasin Treesinthuros — Innovation Vantage / ForgeAI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasintoh%2Fline-oa-mcp-ultimate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasintoh%2Fline-oa-mcp-ultimate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasintoh%2Fline-oa-mcp-ultimate/lists"}