{
  "markdown": "# KanseiLink MCP Server\n\n[![npm version](https://img.shields.io/npm/v/%40kansei-link%2Fmcp-server)](https://www.npmjs.com/package/@kansei-link/mcp-server) [![npm downloads](https://img.shields.io/npm/dm/%40kansei-link%2Fmcp-server)](https://www.npmjs.com/package/@kansei-link/mcp-server) [![GitHub stars](https://img.shields.io/github/stars/kansei-link/kansei-mcp-server?style=social)](https://github.com/kansei-link/kansei-mcp-server)\n\n> Reduce your AI agent's token waste with collective intelligence.\n\nYour agent burns tokens on three things: **searching** for SaaS docs it could look up locally, **retrying** errors other agents already solved, and **re-reading** context it already processed. KanseiLink tackles the first two — and measures all three so you know exactly where your tokens go.\n\n**Measured savings: 89–97% on SaaS integration research** (avg ~16,800 tokens without → ~950 with KanseiLink, across 7 services).\n\n## How It Works\n\n```\nInstall MCP → agent wastes fewer tokens (lookup + collective intelligence)\n                    ↓\n            usage data stays local (opt-in: anonymous scalars only)\n                    ↓\n            collective intelligence grows → everyone's agent gets smarter\n```\n\n1. **Measure** — auto-installed hooks track every session: total tokens, cache split, error loops, stuck time. Nothing leaves your machine.\n2. **Reduce** — SaaS lookup eliminates trial-and-error on API integrations. Error-resolution intelligence (coming soon) prevents repeat failures across the community.\n3. **Compare** — opt-in monthly \"Wrapped\" report shows where your tokens went and how you rank among measured users.\n\nIf KanseiLink saves your agent tokens, [give it a star ⭐](https://github.com/kansei-link/kansei-mcp-server) — 700+ developers install it from npm every month, and stars are how the next one finds it.\n\n## Quick Start\n\n```bash\nnpx @kansei-link/mcp-server\n```\n\nWorks with **Claude Code, Cursor, Cline, Zed, Windsurf** — any MCP client.\n\nAdd to your config (`claude_desktop_config.json`, `.cursor/mcp.json`, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"kansei-link\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@kansei-link/mcp-server\"]\n    }\n  }\n}\n```\n\nOr with Claude Code CLI:\n\n```bash\nclaude mcp add -s user kansei-link -- npx -y @kansei-link/mcp-server\n```\n\n## Wrapped: Your Monthly Agent Fuel-Efficiency Report\n\nKanseiLink measures — locally, on your machine — how many tokens your\nagent sessions consume and how much of that KanseiLink saved you, then\nrenders a monthly \"Wrapped\" share card.\n\n**1. Install the measurement hooks** (one command, idempotent, backs up\nyour settings first):\n\n```bash\nnpx -y @kansei-link/mcp-server kansei-link-install-hooks\n```\n\nThis adds a `Stop`/`SessionEnd` hook that parses each session transcript\nand writes token totals + KanseiLink call stats to\n`~/.kansei-link/usage/`. **Nothing is uploaded.**\n\n**2. See your report** any time:\n\n```bash\nnpx -y @kansei-link/mcp-server kansei-link-wrapped            # current month (JA)\nnpx -y @kansei-link/mcp-server kansei-link-wrapped --lang en  # English\nnpx -y @kansei-link/mcp-server kansei-link-wrapped --share    # opt-in: get your rank\n```\n\nThe report separates **measured** numbers (your total tokens, KanseiLink\ncall counts and response sizes — parsed from your own transcripts) from\n**estimated** ones (the avoided web-research cost, based on the 2026-04-16\nfreee/kintone/smarthr benchmark) — labels shown on every surface.\n\nIt also shows where your agent got **stuck**: failed tool calls, retry\nchains (2+ consecutive failures of the same tool), the tokens burned\nwhile stuck, and your worst-failing tools.\n\n`--share` submits only scalar monthly aggregates (anonymous id + token\ncounts, never content) and returns how you rank among measured users\n(\"top X% saver\"). Below 20 measured users for the month, you get the\ncohort size instead of a rank.\n\nDisable measurement anytime: `export KANSEI_USAGE_HOOK=off`, or\n`kansei-link-install-hooks --remove`.\n\n## SaaS Integration Intelligence\n\nThe core reason agents waste tokens on SaaS APIs: they search docs, guess auth flows, and recover from errors — every single time. KanseiLink ships a local SQLite DB so your agent gets the answer on the first try.\n\n| | Count | Description |\n|---|---|---|\n| Services | **11,000+** | MCP servers and SaaS APIs across 23 categories (2,257 MCP-verified via handshake) |\n| Recipes | **200** | Multi-service workflow compositions (standup, PR review, incident response, onboarding...) |\n| API Guides | **199** | Auth setup, endpoints, rate limits, pitfalls, and workarounds |\n| Trust Scores | **Weekly** | Based on automated health probes + real agent usage data |\n\nAll data ships inside the npm package as a local SQLite DB. **Zero API calls needed.** No server dependency, no signup.\n\n### Without vs. With KanseiLink\n\n| Without KanseiLink | With KanseiLink |\n|---|---|\n| `web_search` \"freee API auth\" | `search_services({ intent: \"send invoice\" })` |\n| `web_fetch` docs landing page (SPA, mostly nav) | `lookup({ service_id: \"freee\" })` |\n| `web_fetch` endpoint reference | Agent has auth flow, pitfalls, workarounds |\n| `web_fetch` auth guide | in **~950 tokens** |\n| Trial-and-error on wrong params | First try succeeds |\n| **~16,800 tokens burned** | **89–97% saved** |\n\n### Claude Code: install the skill (auto-invocation)\n\nInstalling the MCP alone doesn't teach Claude Code *when* to call KanseiLink. The bundled skill fixes that:\n\n```bash\nnpx -y @kansei-link/mcp-server kansei-link-install-skill\n```\n\nThis copies a `SKILL.md` to `~/.claude/skills/kansei-link/`. Claude Code auto-discovers it and fires the skill on phrases like \"connect to Stripe\", \"Slack MCPある？\", \"send invoice via freee\" — no need to say \"use KanseiLink\".\n\n### Optional: PostToolUse hook\n\nAuto-capture success/failure after every MCP call (agents tend to forget reporting).\n\n**Consent (v1.2, BREAKING).** Installing the hook alone no longer transmits\nanything. All central transmission is governed by one consent gate\n(`~/.kansei-link/consent.json`), with this priority:\n`DO_NOT_TRACK=1` / explicit OFF → explicit ON (`KANSEI_REPORT_HOOK=on`) →\nLive Updates consent (`npx -y @kansei-link/mcp-server kansei-link-live-updates --enable`) →\n**default OFF (Local Mode, zero transmission)**. Existing hook users are OFF\nuntil they re-consent. Manage: `kansei-link-live-updates --status|--enable|--disable`,\n`kansei-link-privacy --status|--reset-id`.\n\n**What this hook sends when enabled (and what it never sends).** A small\npseudonymous event to KanseiLink's hosted endpoint after each MCP tool call. The payload is a fixed\n7-field set, frozen by a snapshot test (`scripts/smoke-hook-payload.mjs`):\n\n- sent: service slug (or MCP server name), success/failure, tool name,\n  error **category** (e.g. `auth_error`), a fixed context string\n- never sent: prompts, tool inputs/outputs, page/customer/record names,\n  API keys, file paths, free text of any kind. No account or machine\n  identifier is attached.\n\nInstalling the hook does NOT opt you in — transmission requires the consent gate above (Live Updates consent, or an explicit `KANSEI_REPORT_HOOK=on`). Disable anytime: `kansei-link-live-updates --disable` or `export KANSEI_REPORT_HOOK=off`.\n\nAdd to `~/.claude/settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PostToolUse\": [{\n      \"matcher\": \"mcp__.*\",\n      \"hooks\": [{ \"type\": \"command\", \"command\": \"npx -y @kansei-link/mcp-server kansei-link-report-hook\" }]\n    }]\n  }\n}\n```\n\nDisable anytime: `export KANSEI_REPORT_HOOK=off`\n\n## Tools (5)\n\nv1.0 consolidates the tool surface from 25 individual tools into 5 unified tools with mode auto-detection.\n\n### Standard Flow (3 tools — all you need)\n\n```\nsearch_services --> lookup --> (execute your API call) --> report\n```\n\n| Tool | Modes | Description |\n|------|-------|-------------|\n| `search_services` | -- | Find services by intent (FTS5 + trigram + category boost) |\n| `lookup` | 8 modes | Get tips, detail, insights, recipes, combinations, history, feedback, voices |\n| `report` | 4 modes | Report outcomes, submit feedback, record events, share your voice |\n\n### Admin Tools (2 additional)\n\n| Tool | Modes | Description |\n|------|-------|-------------|\n| `inspect` | 8 modes | Colony health: inspection queue, anomaly verification, update proposals, snapshots |\n| `analyze` | 4 modes | Analytics: token savings, cost audit, AEO reports and articles |\n\n### Lookup Modes\n\n| Mode | Trigger | Example |\n|------|---------|---------|\n| **tips** (default) | `service_id` alone | `lookup({ service_id: \"freee\" })` |\n| **detail** | `detail: true` | `lookup({ service_id: \"freee\", detail: true })` |\n| **insights** | `insights: true` | `lookup({ service_id: \"freee\", insights: true })` |\n| **recipe** | `goal` | `lookup({ goal: \"onboard employee\" })` |\n| **combinations** | `service` (fuzzy name) | `lookup({ service: \"freee\" })` |\n| **history** | `period` | `lookup({ service_id: \"freee\", period: \"30d\" })` |\n| **feedback** | `feedback_status` | `lookup({ feedback_status: \"open\" })` |\n| **voices** | `mode: \"voices\"` | `lookup({ mode: \"voices\", service_id: \"freee\" })` |\n\n### Report Modes\n\n| Mode | Trigger | Example |\n|------|---------|---------|\n| **outcome** | `success` (boolean) | `report({ service_id: \"freee\", success: true })` |\n| **feedback** | `subject` + `body` | `report({ subject: \"...\", body: \"...\" })` |\n| **event** | `event_type` | `report({ event_type: \"api_change\", event_date: \"2025-01-15\", title: \"...\" })` |\n| **voice** | `question_id` | `report({ question_id: \"best_feature\", response_text: \"...\", service_id: \"freee\" })` |\n\n## Example Workflows\n\n**Find and integrate a service:**\n```\nsearch_services({ intent: \"send invoice to clients\", compact: true })\n--> lookup({ service_id: \"freee\" })        // tips: auth, pitfalls, workarounds\n--> lookup({ service_id: \"freee\", detail: true })  // full connection guide\n--> (execute your API call)\n--> report({ service_id: \"freee\", success: true, task_type: \"create_invoice\" })\n```\n\n**Multi-service workflow:**\n```\nlookup({ goal: \"create invoice and notify via slack\", services: [\"freee\", \"slack\"] })\n--> Step-by-step recipe with coverage scoring\n```\n\n**Share your honest opinion:**\n```\nreport({\n  service_id: \"stripe\",\n  question_id: \"biggest_frustration\",\n  response_text: \"Webhook signature verification docs are unclear for non-Node runtimes\"\n})\n```\n\n## Categories (23)\n\nCRM, Project Management, Communication, Accounting, HR, E-commerce, Legal, Marketing, Groupware, Productivity, Storage, Support, Payment, Logistics, Reservation, Data Integration, BI/Analytics, Security, Developer Tools, AI/ML, Database, Design, DevOps\n\n## Architecture\n\n```\nAgent <-> KanseiLink MCP Server <-> SQLite (local, zero-config)\n              |\n              +-- search_services  -> FTS5 + trigram (CJK) + LIKE + category detection\n              +-- lookup           -> tips / detail / insights / recipe / combinations /\n              |                       history / feedback / voices (auto-detected)\n              +-- report           -> outcome / feedback / event / voice (auto-detected)\n              +-- inspect          -> queue / submit / propose / review / snapshot / evaluate\n              +-- analyze          -> token_savings / cost / aeo_report / aeo_article\n```\n\n## For SaaS Companies\n\nKanseiLink doubles as an **Agent Readiness Index (ARI)** evaluation platform. Real agents using real APIs generate objective telemetry — success rates, latency, error patterns, and resolution paths — that no survey or benchmark can replicate.\n\nWhat we can show you:\n- **Agent success rate** for your API over time\n- **Error patterns** and how agents work around them\n- **Agent Voice**: why agents choose (or avoid) your service\n- **Category ranking** vs competitors\n- **Impact of API changes** (before/after analysis)\n\nThis data comes from the same MCP that saves individual developers tokens — the collective intelligence that helps agents is the same signal that evaluates services.\n\nSee [kansei-link.com](https://kansei-link.com) or reach out.\n\n## Privacy & Data Handling\n\nKanseiLink is **privacy-preserving by default**:\n\n- **Local-first**: the full service DB ships inside the npm package. No API calls needed.\n- **Measurement stays local**: the usage hook writes to `~/.kansei-link/usage/` on your machine. Nothing is uploaded unless you opt in with `--share`, which sends only scalar aggregates (token counts), never content.\n- **PII auto-masking**: every `report` call scrubs emails, phone numbers, IP addresses, and Japanese names before storage.\n- **Agent identity anonymized**: only the agent *type* (claude / gpt / gemini) is retained — never the user ID.\n- **No telemetry by default**: the local stdio server does **not** phone home.\n\nSee [SECURITY.md](SECURITY.md) for full details.\n\n## Troubleshooting\n\n<details>\n<summary><b>The skill isn't firing — Claude Code doesn't call KanseiLink when I ask about SaaS.</b></summary>\n\n1. Verify the skill was installed:\n   ```bash\n   ls ~/.claude/skills/kansei-link/SKILL.md\n   ```\n   If absent, run `npx -y @kansei-link/mcp-server kansei-link-install-skill`.\n2. Restart Claude Code. Skills are indexed on session start.\n3. Check that the MCP is registered under the name `kansei-link`:\n   ```bash\n   claude mcp add -s user kansei-link -- npx -y @kansei-link/mcp-server\n   ```\n</details>\n\n<details>\n<summary><b><code>search_services</code> returns nothing for a service I know exists.</b></summary>\n\n1. Try category filter: `search_services({ intent: \"...\", category: \"accounting\" })`.\n2. Try the English equivalent — most entries are indexed bilingually, but some only in EN.\n3. If the service truly isn't there, submit feedback: `report({ subject: \"Missing: ServiceX\", body: \"...\" })`.\n</details>\n\n<details>\n<summary><b>Auth error when calling a SaaS endpoint after KanseiLink suggests it.</b></summary>\n\n1. Start with `lookup({ service_id: \"...\" })` — it returns known OAuth pitfalls and refresh-token workarounds.\n2. Report the failure: `report({ service_id: \"...\", success: false, error_type: \"auth_error\", workaround: \"...\" })` — your fix helps the next agent.\n</details>\n\n## Contributing\n\n```bash\ngit clone https://github.com/kansei-link/kansei-mcp-server.git\ncd kansei-mcp-server\nnpm install\nnpm run build\nnpm start       # start stdio server\n```\n\nPRs welcome. If you find a service that's missing or has wrong info, the fastest path is:\n\n```\nreport({ subject: \"Fix: ServiceX auth is OAuth2 not API key\", body: \"...\" })\n```\n\n## Links\n\n- [npm](https://www.npmjs.com/package/@kansei-link/mcp-server)\n- [Website](https://kansei-link.com)\n- [MCP Registry](https://registry.modelcontextprotocol.io): `io.github.kansei-link/kansei-mcp-server`\n- [Glama](https://glama.ai/mcp/servers/kansei-link/kansei-mcp-server)\n\n## License\n\nMIT — [Synapse Arrows PTE. LTD.](https://kansei-link.com)\n",
  "bytes": 14814,
  "sha": "fcb986bde46d08e46db5d6c761a72efd245d1553229bbda7687de0d6e1b7d684",
  "repo_slug": "kansei-link/kansei-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kansei_link_kansei_mcp_server_8dbf172d/readme"
}