Skip to content

Releases: wasintoh/line-oa-mcp-ultimate

v2.0.0 — LINE Shopping (MyShop)

14 Jun 16:01

Choose a tag to compare

Release Notes — v2.0.0 "Shopping"

LINE OA MCP Ultimate v2.0 brings LINE Shopping (MyShop Open API) into the same AI-agent workflow. v1 let your agent talk to customers; v2 lets it sell to and manage them — products, stock, orders, parcel labels, settlements, and payment links — all in natural language.

Additive & non-breaking. Every v1 tool is untouched. The 14 shopping tools are opt-in: they register only when a MyShop API key is configured. Messaging-only users see no change.


✨ What's new — 14 LINE Shopping tools

🛍️ Products (7)
line_list_products · line_create_product · line_update_product · line_delete_product · line_update_product_price · line_set_product_visibility · line_manage_product_variant

📦 Inventory (1)
line_manage_inventory — set / increase / decrease stock (1–100,000).

🧾 Orders (4)
line_list_orders (search/filter + polling entry point) · line_get_order · line_fulfill_order (ship / mark-paid / update-tracking / parcel-label) · line_cancel_order

💰 Settlement + 🔗 Checkout (2)
line_get_settlement (income & fees per order) · line_create_checkout_link (close the sale in chat — generate a payment link and paste it to the customer)

Covers all 21 MyShop endpoints using only an API key — no webhook, no server required.


🔑 Setup

  1. Enable MyShop / LINE Shopping on your LINE OA (free).
  2. As Admin, go to oaplus.line.bizSettings → API keys → Generate.
  3. Add the key to your config:
    • Single-OA: env LINE_MYSHOP_API_KEY
    • Multi-OA: "myshop_api_key": "..." per OA in ~/.line-mcp/config.json

That's it — the shopping tools appear automatically once a key is present.


🖼️ Image hosting

LINE Shopping (like every image surface in this server) needs a public HTTPS image URL — there is no binary upload endpoint. Host product images on Cloudflare R2 / S3 / Cloudinary / ImageKit / raw.githubusercontent.com. Avoid Google Drive / Dropbox share links (they serve an HTML preview, not a direct image). See README → Image hosting.


🚫 Intentionally out of scope (v2.0)

  • Order webhook — would require an always-on server. Use line_list_orders polling + a scheduled task instead.
  • Order Messaging API — not self-serve (requires emailing LINE to enable).
  • Audience / MyCustomer API — overlaps v1 audiences; deferred.

🛡️ Compatibility

  • All 34 v1 tools unchanged; no breaking changes.
  • New client (MyShopClient) is fully separate from LineClient (different host + X-API-KEY auth + error envelope).
  • TypeScript strict build passes; unit tests added for the client and key-resolution gate.

🔭 Architecture notes

  • Base: https://developers-oaplus.line.biz · auth: X-API-KEY · errors: { code, message, info?, timestamp }.
  • Rate limit: 50 req/s, 1,000 req/min per resource (surfaced to agents).
  • Schema verified against the live MyShop Swagger (Redoc 1.0.0) on 2026-06-03.
  • Spec: docs/v2-shopping/PRD.md + docs/v2-shopping/TECH-SPEC.md.

v1.1.0 — API Completeness Pack

03 Jun 10:34

Choose a tag to compare

Release Notes — v1.1.0 (API Completeness)

Theme: Complete LINE's token-only Messaging API surface — every tool works with just a channel access token, no webhook, no hosted server. Stays fully npx-installable in Claude Cowork, Claude Code, Codex, OpenClaw, Hermes, and any MCP host.

Tool count: 27 → 34 (+10 new, −3 removed). Zero new npm dependencies (Node built-ins only).


Added (10 tools)

Rich Menu lifecycle

  • line_link_rich_menu — link/unlink a rich menu to specific users (single or bulk; auto-chunked at 500 ids/request). Per-user menus override the default → segment-specific menus (e.g. paid vs free).
  • line_set_default_rich_menu — set or clear the account-wide default menu (clearing had no tool before).
  • line_manage_rich_menu_alias — alias CRUD (create/update/delete/get/list). Required for tab-switching menus.
  • line_upload_rich_menu_image — replace the image on an existing menu without recreating it.

Message builders

  • line_design_imagemap — builds an imagemap message = OA Manager's "Rich Message" (tappable image regions + optional video). Validates the 1040px base-width contract.
  • line_design_card — builds a template message = OA Manager's "Card Message" (buttons / confirm / carousel / image_carousel), all limits enforced.

Audience / Webhook / Stats / Token

  • line_update_audience — add users to / rename an existing upload audience.
  • line_set_webhook_endpoint — set/get the webhook URL via API (v1 had test only).
  • line_get_narrowcast_progress — check whether a broadcast finished or failed.
  • line_check_token — verify the active token's validity, expiry, and scope (never prints the token).

Extended

  • line_send_message — now also sends image, video (optional tracking_id), and a generic message_json passthrough (forwards objects from line_design_imagemap / line_design_card / line_design_flex). The image type existed in v1 but was never wired.
  • line_get_oa_status — now reports chat_mode (bot = auto-respond / chat = manual operator) and mark_as_read_mode.

Removed (4 tools) — don't fit an AI-agent workflow

  • line_show_typing — the loading animation is a real-time chatbot UX (needs an end-user waiting in a LINE chat); meaningless when an AI agent calls it through Cowork.
  • line_emit_liff_code, line_emit_login_snippet — code generators; an AI agent already writes that code natively.
  • line_issue_link_token — account-link token belongs to a real-time, backend-driven binding flow, not an ad-hoc agent call.

Rationale: a distributed MCP should expose only what the agent actually uses. Removing these keeps the tool list honest for Cowork / OpenClaw / Hermes users.

Fixes

  • TH.replyTokenExpiredFallback corrected: reply-token lifetime is ~1 minute, not "~30 seconds" (verified against LINE docs).
  • https-only enforced on all fetched/area image URLs (rich-menu image, imagemap actions) — small SSRF hardening.

Quality gate

  • tsc --noEmit: clean (strict + noUncheckedIndexedAccess, no any).
  • vitest run: 56/56 passimagemap-builder (17), template-builder (17), chunk boundary 500/501 (6), coupon-body (16).
  • npm run build: clean.
  • Agent QC (vs live LINE docs): every endpoint path, method, body field, response field, and limit verified → SHIP.
  • Agent Code Review (security / types / DRY / pattern): no token leakage, pattern-faithful to existing tools → SHIP.

Versioning note

The 10 additions are backward-compatible (existing tools unchanged), so this is a minor bump (1.0.x → 1.1.0). The 3 removed v1 tools are technically a breaking change under strict SemVer, but they're niche, the package is early, and the feature additions dominate — so 1.1.0 is the pragmatic, honest choice over forcing a 2.0.0.

Compatibility

  • No new dependencies; same @line/bot-sdk + @modelcontextprotocol/sdk + zod.
  • New files: src/line/{imagemap-builder,template-builder}.ts, 10 src/tools/*.ts, 3 test suites, docs/v2-prd.md.
  • Extended: src/line/client.ts, src/types.ts, src/constants.ts, src/i18n/th.ts, src/tools/{send-message,get-oa-status,build-rich-menu}.ts, src/server.ts.

v1.0.4 — Coupon fixes + native coupon message

01 Jun 15:00

Choose a tag to compare

Release Notes — v1.0.4

Release date: 2026-06-01
Type: Patch (bug fixes + backward-compatible additions, no breaking changes)

🐛 Fixes

  • Coupon create was completely brokenline_manage_coupon { mode: "create" } rejected every request with LINE 400: The request body has 7 error(s). The handler sent { startTime, endTime, code, maxRedemptions, termsUrl }, but POST /v2/bot/coupon requires 8 fields: title, reward, acquisitionCondition, startTimestamp, endTimestamp, timezone, visibility, maxUseCountPerTicket — hence exactly 7 missing/renamed fields. The create path was rewritten to build the correct body from friendly inputs:
    • discount_type (percentage | fixed | explicit) + discount_value (or price_before/price_after) → reward.priceInfo
    • valid_from / valid_to accept YYYY-MM-DD, ISO datetime, or epoch → converted to UNIX seconds (LINE uses seconds, not milliseconds)
    • sensible defaults: timezone: ASIA_BANGKOK, visibility: UNLISTED, acquisitionCondition.type: normal, maxUseCountPerTicket: 1
  • Coupon list always returned 0line_manage_coupon { mode: "list" } read res.coupons, but GET /v2/bot/coupon returns a pager response keyed items. Now reads items (with a coupons fallback) so created coupons actually show up.
  • Opaque API errorsline_manage_coupon now surfaces LINE's per-field details[] instead of just "N error(s)", so validation failures are debuggable at a glance.

✨ Added

  • Send a native LINE couponline_send_message gained a fifth message shape { coupon_id, delivery_tag? }. It builds LINE's coupon message object ({ type: "coupon", couponId, deliveryTag? }) so a coupon created via line_manage_coupon can be broadcast/pushed straight into chats. delivery_tag (≤30, [A-Za-z0-9_]) feeds LINE's coupon-path insights.

✅ Tests & Verification

  • New unit tests for the coupon body mapper (tests/coupon-body.test.ts) — 15 assertions covering required fields, UNIX-seconds conversion, percentage/fixed/explicit rewards, default values, and validation errors.
  • Verified live end-to-end against the LINE API: create (real couponId returned), get (status: RUNNING), list (coupon appears), and a native coupon-message broadcast (success: true).

📝 Documentation

  • README.md — Coupons and Send-messages sections note native coupon sending; version bumped to v1.0.4 with a "latest changes" summary.
  • docs/clients-setup-th.md — version-pin example updated to @1.0.4.
  • docs/http-transport.md — startup banner and /health example updated to 1.0.4.
  • docs/cowork-local-test-th.md — local-build test guide for validating fixes in Claude Cowork before publishing.

🔁 Consistency

  • Version is now 1.0.4 across package.json, package-lock.json, src/constants.ts, README.md, and every doc.

Previous notes: RELEASE_NOTES_v1.0.3.md · RELEASE_NOTES_v1.0.1.md

v1.0.3

01 Jun 10:52

Choose a tag to compare

Release Notes — v1.0.3

Release date: 2026-06-01
Type: Patch (no breaking changes)

🐛 Fixes

  • Version reportingSERVER_VERSION in src/constants.ts was hard-pinned to 1.0.0, so every published build (1.0.0 → 1.0.2) reported v1.0.0 in its startup banner and /health response regardless of the real package version. It is now synced to the package version, so the banner and /health endpoint report the correct version again.

📝 Documentation

  • Install methoddocs/quickstart-th.md, docs/multi-oa-setup-th.md, and docs/http-transport.md now use the published npm package via npx -y line-oa-mcp-ultimate. Removed the old local-development steps (repo clone, npm run build, and hard-coded /Users/... paths) that only worked on the author's machine.
  • Multi-OA setup — rewritten around the auto-discovered ~/.line-mcp/config.json (plus LINE_MCP_CONFIG for a custom path), since users installing via npx don't have a local repo folder. Switched from a personal/dev voice to general public-facing docs.
  • HTTP transport — corrected the server name (was @line-mcp/server / line-mcp-server) to line-oa-mcp-ultimate, updated the version strings, and added an npx-based run command alongside the repo script.
  • README — the package description and intro now highlight multi-OA / agency support; the Multi-OA section no longer assumes a cloned repo and links to the full Thai walkthrough.

🔁 Consistency

  • Version is now 1.0.3 across package.json, package-lock.json, src/constants.ts, README.md, and every doc.

Previous notes: RELEASE_NOTES_v1.0.1.md

v1.0.1 — Initial Public Release

29 May 04:36

Choose a tag to compare

v1.0.1 — Initial Public Release 🎉

The first stable release of LINE OA MCP Ultimate — a Model Context Protocol server that lets you operate your LINE Official Account from any AI agent through natural language.

Note: v1.0.0 was published with placeholder package metadata. Use v1.0.1 as the canonical first release.


What's inside

27 tools · 4 resources · 7 guided prompts covering the full LINE OA operating workflow.

📨 Messaging

  • line_send_message — universal sender (5 transports, 3 modes)
  • line_show_typing — typing indicator
  • line_find_sticker — sticker search by mood / keyword

🎨 Rich Menu

  • line_build_rich_menu — create + upload + set default in one call
  • line_list_rich_menus
  • line_delete_rich_menu
  • line_audit_user_menu — "why does user X see menu Y?"

💎 Flex Message

  • line_design_flex — 8 Thai-localized templates + raw JSON

🎯 Audiences

  • line_build_audience_from_csv — CSV → audience
  • line_build_audience_from_engagement — retarget from prior broadcast clicks
  • line_list_audiences
  • line_delete_audience

📊 Insights

  • line_get_oa_status — quick health card
  • line_get_oa_report — markdown digest for a date range
  • line_get_message_stats — per-broadcast engagement
  • line_estimate_send_cost — pre-flight cost estimate

🎟 Coupons

  • line_manage_coupon — CRUD
  • line_get_coupon_stats — redemption analytics

🔌 Webhook

  • line_test_webhook — ping configured webhook URL

👤 Operations

  • line_get_user_profile
  • line_list_followers (Premium TH/JP/TW only)
  • line_list_oas
  • line_use_oa — switch active OA mid-session
  • line_run_on_many_oas — agency feature

💻 Developer Pack

  • line_manage_liff_app — LIFF lifecycle CRUD
  • line_emit_liff_code — generate LIFF SDK init code (5 frameworks)
  • line_emit_login_snippet — generate LINE Login OAuth scaffold

Resources

  • line://oa/{id}/snapshot — auto-refreshing OA status
  • line://flex/templates — Flex template catalog
  • line://stickers/catalog — sticker catalog with mood-keyword index
  • line://calendar/thai-holidays — Thai festival calendar with promo patterns

Prompts

  • daily-oa-report · build-campaign · schedule-broadcast-howto
  • diagnose-rich-menu · coupon-campaign
  • migrate-from-line-notify · webhook-setup-guide

Highlights

  • 🪶 Zero infrastructure — no database, no public URL, no CDN, no tunnel.
  • 30-second install — single env var, one npx -y command.
  • 🇹🇭 Thai-first — Flex templates, error messages, sticker keywords, holiday calendar.
  • 🛡 Built-in safety — Quota Guardian, quiet-hours guard, pre-flight validation, reply-token TTL handling.
  • 🏢 Multi-OA ready — operate dozens of client OAs from a single instance (agency-grade).
  • 🆓 Free-tier ready — no LINE Premium upgrade required for the core feature set.

Install

{
  "mcpServers": {
    "line": {
      "command": "npx",
      "args": ["-y", "line-oa-mcp-ultimate"],
      "env": {
        "LINE_CHANNEL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
      }
    }
  }
}

Full setup walkthrough in the README.


Compatibility

  • Node.js 20+
  • MCP hosts: Claude Cowork · Claude Desktop · Claude Code · Cursor · Codex · ChatGPT desktop · any MCP-compatible host

Roadmap

  • 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.

Author: Dr. Wasin Treesinthuros (พี่โต) — Innovation Vantage / ForgeAI / LINE Certified Coach 2026

License: MIT