L Harness MCP Server

Run a self-hosted L Harness LINE Official Account CRM from an MCP client: friends, tags, scenarios, broadcasts

By 野田 修一 (individual) TypeScript Local · stdio CRM and salesCommunication

45 popularity score ★ 614 ↓ 295/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs LINE_HARNESS_API_URL, LINE_HARNESS_API_KEY. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add l-harness -e LINE_HARNESS_API_URL=<LINE_HARNESS_API_URL> -e LINE_HARNESS_API_KEY=<LINE_HARNESS_API_KEY> -- npx -y @line-harness/mcp-server@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "l-harness": {
      "command": "npx",
      "args": [
        "-y",
        "@line-harness/mcp-server@latest"
      ],
      "env": {
        "LINE_HARNESS_API_URL": "<LINE_HARNESS_API_URL>",
        "LINE_HARNESS_API_KEY": "<LINE_HARNESS_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "l-harness": {
      "command": "npx",
      "args": [
        "-y",
        "@line-harness/mcp-server@latest"
      ],
      "env": {
        "LINE_HARNESS_API_URL": "<LINE_HARNESS_API_URL>",
        "LINE_HARNESS_API_KEY": "<LINE_HARNESS_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "l-harness": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@line-harness/mcp-server@latest"
      ],
      "env": {
        "LINE_HARNESS_API_URL": "<LINE_HARNESS_API_URL>",
        "LINE_HARNESS_API_KEY": "<LINE_HARNESS_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.l-harness]
command = "npx"
args = ["-y", "@line-harness/mcp-server@latest"]

[mcp_servers.l-harness.env]
LINE_HARNESS_API_URL = "<LINE_HARNESS_API_URL>"
LINE_HARNESS_API_KEY = "<LINE_HARNESS_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e LINE_HARNESS_API_URL=<LINE_HARNESS_API_URL> -e LINE_HARNESS_API_KEY=<LINE_HARNESS_API_KEY> l-harness npx -- -y @line-harness/mcp-server@latest

Settings 3

LINE_HARNESS_API_URL Required: URL of your deployed L Harness Worker, e.g. https://<name>.workers.dev.
LINE_HARNESS_API_KEY Required: API key issued in the L Harness admin for a staff user.
LINE_HARNESS_ACCOUNT_ID Optional: Default LINE account ID when the deployment manages several accounts.

What it does

L Harness is an open-source CRM for LINE Official Accounts that you deploy to your own Cloudflare account (a Worker with a D1 database plus a Next.js admin site). The MCP server, published on npm as @line-harness/mcp-server, is a thin stdio wrapper around the project's TypeScript SDK: it calls your deployed Worker's HTTP API with a staff API key, and the Worker in turn talks to the LINE Messaging API.

Through it an assistant can look up friends and their details, read form answers, link clicks and conversion logs, see unanswered chats, and change most of the CRM: send a message to one friend, broadcast to everyone or a tag or segment, build step-message scenarios and enrol friends in them, manage tags, forms, rich menus, tracked links, auto-replies, message templates, traffic pools, entry routes, staff and ad platforms, and upload images or an HLS webinar video. It also exposes three read-only resources (line-harness://friends, line-harness://scenarios, line-harness://tags).

The MCP server page in the project wiki says it has 25 tools and lists 24, but the tool index at v0.24.0 registers 31; the extra ones (manage_auto_replies, manage_traffic_pools, manage_entry_routes, manage_message_templates, list_conversations, get_conversation, manage_webinar_video) appear only in the source. The client code also reads an optional LINE_HARNESS_ACCOUNT_ID that the docs do not mention, used as the default LINE account when you run several.

The project is by Shudesu (Shuichi Noda), not by LY Corporation, which runs LINE. The software is free under MIT; LINE message fees, Cloudflare usage and any domain are paid separately.

What it needs

RuntimeNode.js 20+

Node.js 20 or later for the MCP server (npx). A running L Harness deployment: a Cloudflare account (free tier works), a LINE Official Account with a Messaging API channel, and the Worker deployed with `npx create-line-harness` (that CLI needs Node.js 22+ and pnpm). You need the Worker's URL and an API key issued in the admin for a staff user. LINE delivery fees and Cloudflare usage are billed by those services.

Limits

It works only through an L Harness Worker you have deployed, not LINE directly. LINE_HARNESS_API_URL and LINE_HARNESS_API_KEY are checked on the first tool call, not at start, so a missing value shows up as every tool failing. send_message and broadcast turn URLs in a message into tracked links and text into a Flex message with a button by default (trackLinks defaults to true on send_message). list_conversations returns 50 by default, up to 200. The friends resource shows only the newest 20. manage_webinar_video does not encode video: you run ffmpeg yourself first and point it at the HLS output folder. On Cloudflare D1's free plan, queries fail once the daily read/write cap is reached.

Who it suits

Suits teams already running, or willing to self-host, L Harness on Cloudflare for a LINE Official Account in Japan or elsewhere, who want an assistant to check unanswered chats, pull friend and click data, or draft and send scenarios and broadcasts. Most tools change live data and several send messages to real customers, so it suits operators who review each send in their client. It is not a general LINE Messaging API server: without an L Harness deployment it does nothing, and someone on a paid LINE CRM such as L-step would need to migrate first.

Tools 31

list_friends
List friends, filtered by name, tag or metadata
get_friend_detail
Show one friend's profile, tags and metadata
get_form_submissions
Read answers submitted to a form
get_link_clicks
Show who clicked a tracked link and how often
get_conversion_logs
Read recorded conversion events
account_summary
Overview of friend count, tags and scenarios
list_crm_objects
Generic listing of CRM records by type
list_conversations
Unanswered chats, longest wait first
get_conversation
Read the message history with one friend
send_message
Send a text, image or Flex message to one friend
broadcast
Send a message to all friends, a tag or a segment
create_scenario
Create a step-message scenario
enroll_in_scenario
Put a friend into a scenario
create_form
Create a LIFF form
create_rich_menu
Create a rich menu, with an image
create_tracked_link
Create a click-tracking link
upload_image
Upload an image for use in messages
manage_friends
Count friends, edit metadata, switch a friend's rich menu
manage_tags
Create, edit and delete tags; add or remove them on friends
manage_scenarios
Edit, delete and list scenarios and their steps
manage_broadcasts
Create, edit, delete and send broadcasts, including segment sends
manage_rich_menus
List or delete rich menus and set the default
manage_forms
Create, edit and delete forms
manage_tracked_links
List or delete tracked links
manage_staff
Manage staff users and their roles
manage_ad_platforms
Manage ad platform connections for conversion tracking
manage_auto_replies
Keyword auto-reply rules: list, create, edit, delete
manage_message_templates
Saved text or Flex templates: list, create, edit, delete
manage_traffic_pools
Pools that spread new friends across LINE accounts
manage_entry_routes
Entry links that tag, start scenarios or route friends; funnel stats
manage_webinar_video
Upload a pre-encoded HLS webinar video from disk and publish it

Similar servers