Integrations
MCP Server
Enable the built-in MCP server so AI tools like Claude and Cursor can browse your docs programmatically.
Tiramisu Docs includes a built-in MCP (Model Context Protocol) server that allows AI assistants like Claude, Cursor, and other MCP-compatible tools to browse your documentation programmatically.
The server is hosted as an HTTP JSON-RPC endpoint at /mcp on your deployed docs site. It ships as a SvelteKit route — no CLI, no separate process, no local setup. Deploy your site and the MCP server is live.
Enabling the Server
Set mcp: true in your config to generate a /mcp POST route and show "Connect" buttons in your docs UI:
import { defineConfig } from "@tiramisu-docs/kit";
export default defineConfig({
mcp: true,
// ...
}); When enabled, this does two things:
- Generates a
/mcpPOST route that handles JSON-RPC 2.0 requests from AI tools - Shows Connect with MCP and Connect to VSCode buttons on your docs pages — the URL is derived automatically from your site's origin
Custom Server URL
If you host your MCP server separately or want the UI buttons to point to a different endpoint, pass a URL string instead:
export default defineConfig({
mcp: "https://docs.example.com/mcp",
// ...
}); When a string is provided:
- The UI buttons point to the given URL
- No
/mcproute is generated — you are responsible for hosting the server at that URL
Connecting AI Tools
Once your site is deployed with mcp: true, AI tools can connect using the hosted URL.
Claude Code
Add to your .mcp.json file in the project root:
{
"mcpServers": {
"my-docs": {
"type": "streamableHttp",
"url": "https://docs.example.com/mcp"
}
}
} Replace docs.example.com with your actual docs domain.
Cursor
In Cursor's MCP settings, add a new server and paste your docs MCP URL (e.g. https://docs.example.com/mcp). Cursor supports HTTP MCP endpoints natively.
VSCode
Your docs site shows a Connect to VSCode button in the Open dropdown. Clicking it uses the vscode:mcp/install protocol handler to register the server automatically — no manual configuration needed.
Available Tools
The server exposes five tools to AI assistants:
| Tool | Description |
|---|---|
search_docs | Search pages by keyword |
read_doc | Read a specific page by slug |
list_pages | List all documentation pages, optionally filtered by section |
list_sections | List all sections with page counts |
get_table_of_contents | Get headings for a specific page |
How It Works
The MCP server is a standard SvelteKit POST route at /mcp. It speaks JSON-RPC 2.0 over HTTP — each request is a single POST with a JSON body, and the response is JSON.
Documentation data comes from the virtual:tiramisu-docs module at build time. The server does not scan the filesystem at runtime, which means it works on any deployment target: serverless functions, edge runtimes, static adapters with prerendering, or traditional Node.js servers. Wherever SvelteKit runs, the MCP server runs.