@cendor/mcp
v0.1.3
Published
Read-only Model Context Protocol server that hands your AI coding assistant Cendor's live docs and correct call-shapes — local (npx) or remote (mcp.cendor.ai). Built from the docs source of truth; never copies docs.
Maintainers
Readme
@cendor/mcp · cendor-mcp
A read-only Model Context Protocol server that hands your
AI coding assistant Cendor's live docs and correct call-shapes. Connect it once and, in agent
mode, your assistant can look up the right way to call Cendor instead of guessing — Cendor is new,
and a few of its shapes are non-obvious (budget(cfg)(fn) is curried in TypeScript; prices.estimate
is positional in Python; the SQLite session store is spelled differently in each language).
- Local —
npx @cendor/mcp(Node, stdio) oruvx cendor-mcp(Python, stdio). Fully offline; the docs are bundled. Nothing leaves your machine — only the tool arguments your assistant sends. - Remote — a Cloudflare Worker at
https://mcp.cendor.ai(Streamable HTTP). Zero-install; always current.
It is pull-based and read-only: your assistant calls a tool, the server answers, your assistant
writes the code. The server never pushes into your editor and your codebase never flows to us. No
sampling/elicitation (server→client) calls.
The libraries need no server. Cendor is local-first — this MCP server is optional developer tooling for wiring an assistant up. No Cendor library requires it (or any server) at runtime.
What it exposes (five read-only tools)
| Tool | What it does |
|---|---|
| search_docs(query, limit?) | Full-text search over the docs → matching sections with cendor.ai URLs. |
| get_page(slug) | A full docs page as markdown ("tokenguard", "getting-started", "sdk/agents", …). |
| get_api(symbol, lang?) | The anti-hallucination tool — the current correct call-shape + the common wrong one, for a symbol. lang is "python" or "ts" (py / js aliased); omit for both. |
| example(task, lang?) | A runnable, CI-typechecked snippet for a task ("budget a loop", "gate input", …). Same lang values as get_api. |
| list_recipes() | The cookbook index, grouped by category (recipes live in cendor-cookbook). |
Answers are stamped with the current published package versions (from the site
/releases source of truth), so the server never teaches a shape
newer than what's on PyPI/npm.
Connect your assistant
Full walkthrough (all four assistants, remote + local, screenshots): https://cendor.ai/mcp.
Honest limit — agent mode only. MCP tools are called by agent modes (Claude Code, Cursor Composer/agent, Copilot agent, Windsurf Cascade). Inline autocomplete does not call MCP — for that path, Cendor ships types +
@examples inside every package ("Type Teach"); see/docs/for-ai-assistants.
Claude Code
# remote (recommended — always current)
claude mcp add --transport http cendor https://mcp.cendor.ai
# or local, offline
claude mcp add cendor -- npx -y @cendor/mcpCursor → .cursor/mcp.json
{ "mcpServers": { "cendor": { "url": "https://mcp.cendor.ai" } } }GitHub Copilot (agent mode, VS Code) → .vscode/mcp.json
{ "servers": { "cendor": { "type": "http", "url": "https://mcp.cendor.ai" } } }Windsurf → ~/.codeium/windsurf/mcp_config.json
{ "mcpServers": { "cendor": { "serverUrl": "https://mcp.cendor.ai" } } }Local / offline (any client) — swap the remote URL for a stdio command:
{ "mcpServers": { "cendor": { "command": "npx", "args": ["-y", "@cendor/mcp"] } } }{ "mcpServers": { "cendor": { "command": "uvx", "args": ["cendor-mcp"] } } }How it's built (docs are never copied here)
The server's content is built from the docs source of truth — the sibling library repos, exactly like cendor-site does:
../cendor-libs/docs(the seven libraries + thefor-ai-assistants.mdtrap registry)../cendor-sdk/docs(the governed agent SDK)../cendor-libs-js/docs(the TypeScript parity matrix)../cendor-cookbook/recipes(category names only, forlist_recipes()— optional link-out data)
scripts/build-index.mjs reads that markdown and emits a small searchable index (data/index.json,
inlined into the npm/Worker bundle via src/generated/index.ts and bundled into the Python wheel).
No docs are ever copied into this repo — fix docs in the library repos, rebuild, and both the site
and this server reflect the change. In CI/cloud, scripts/fetch-docs.mjs sparse-clones the sibling
docs (and the cookbook's recipes/ tree) first (same mechanism as the site).
Develop
pnpm install
pnpm build:index # read sibling docs → data/index.json + src/generated/index.ts
pnpm build # build:index + tsc → dist/
pnpm test # vitest (offline)
pnpm lint # biome
node dist/cli.js # run the stdio server locally
pnpm dev:worker # wrangler dev → local Streamable-HTTP endpoint (does NOT deploy)Python twin: cd python && uv build (run pnpm build:index from the repo root first — it writes
the index the wheel bundles). See PUBLISHING.md.
Status
Live. @cendor/mcp (npm), cendor-mcp (PyPI), and the mcp.cendor.ai Worker are published/deployed —
see PUBLISHING.md. Apache-2.0.
