API & MCP Gateway

HTTP API and web MCP tools work on the live site (no local Node). Optional stdio MCP for offline agents. Export the library or add notes from the UI.

Export pageNew note

HTTP API

Static JSON/Markdown endpoints — works on GitHub Pages. CORS open for easy scripting from any origin.

// Web MCP / HTTP API — no local server
const base = location.origin + '/docs'; // omit '/docs' on localhost
const manifest = await fetch(base + '/api/mcp').then(r => r.json());
const topics = await fetch(base + '/api/v1/topics').then(r => r.json());
const glossaries = await fetch(base + '/api/v1/glossaries').then(r => r.json());
const page = await fetch(base + '/llms.mdx/docs/python/glossary/content.md').then(r => r.text());

MCP (web / HTTP)

Call the same MCP tools over HTTP from the browser — no local Node process. Manifest: /api/mcp

Result appears here after Run.

MCP (local stdio, optional)

Prefer the web tools above on the deployed site. Local stdio is only for offline Cursor/Claude Desktop. Tools: list_topics, list_pages, get_page, search_docs, export_all_markdown, list_glossaries.

{
  "mcpServers": {
    "code-reference": {
      "command": "node",
      "args": ["site/mcp/server.mjs"],
      "cwd": "C:/Users/mrdan/Downloads/docs"
    }
  }
}

Discovery payload

Loading…