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.
HTTP API
Static JSON/Markdown endpoints — works on GitHub Pages. CORS open for easy scripting from any origin.
- GET/api/v1/discovery— Discovery
- GET/api/v1/topics— Topics
- GET/api/v1/pages— Page index
- GET/api/v1/glossaries— Topic glossaries
- GET/api/v1/coverage— Coverage report
- GET/api/v1/openapi— OpenAPI 3.1
- GET/api/v1/export— Full Markdown export
- GET/api/v1/topic-export/{topic}— Per-topic Markdown
- GET/api/mcp— MCP tools manifest (web)
- GET/api/search— Orama search index
- GET/llms-full.txt— LLM full dump
// 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…