Home
Content

MCP Integration

Document MCP servers with tools, resources, and prompts rendered as browsable reference docs.

Sourcey generates reference documentation from Model Context Protocol server snapshots. Tools, resources, resource templates, and prompts render with the same quality as OpenAPI specs — parameter tables, expandable schemas, code samples, and search.

Note

MCP support was added in Sourcey 3.4.0. Make sure you're on the latest version.

Configuration

Add an mcp tab to your config. The path points to an mcp.json file relative to sourcey.config.ts.

navigation: {
  tabs: [
    {
      tab: "MCP Reference",
      slug: "mcp",
      mcp: "./mcp.json",
    },
  ],
}

MCP tabs work alongside any other tab type. A typical setup pairs an MCP reference with markdown guides:

navigation: {
  tabs: [
    {
      tab: "MCP Reference",
      slug: "mcp",
      mcp: "./mcp.json",
    },
    {
      tab: "Guides",
      groups: [
        { group: "Getting Started", pages: ["introduction", "quickstart"] },
      ],
    },
  ],
}

What is mcp.json?

An mcp.json file is a static snapshot of an MCP server's capabilities. It captures the tools, resources, and prompts that an MCP server exposes at runtime, in a versionable JSON file.

You can generate one from a running server with mcp-parser, or write it by hand. The format mirrors the MCP protocol's own introspection responses.

See the MCP ecosystem page for the full type definitions and tooling.

What gets rendered

Tools

Each tool renders as an operation card with:

  • A purple TOOL method pill and the tool name
  • Description
  • Parameter table from the tool's inputSchema properties, each marked as "argument"
  • Expandable schema view for tools with nested or complex input structures
  • Returns section showing the outputSchema (or a default MCP content array description)
  • Auto-generated code samples in JSON-RPC, TypeScript SDK, and Python SDK

Resources and resource templates

Resources render with a green RESOURCE pill and the resource URI. Resource templates (like weather://{city}/forecast) extract path parameters from the URI template and display them in a parameter table.

Prompts

Prompts render with a blue PROMPT pill and the prompt name. Arguments are listed as parameters.

The sidebar groups operations by type: Tools, Resources, Prompts. Each group only appears if the spec contains that type. You can override grouping with the x-sourcey-group vendor extension on any tool, resource, or prompt.

Code samples

Every operation gets auto-generated code samples in three formats:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "city": "San Francisco" }
  }
}
const result = await client.callTool("get_weather", {
  city: "San Francisco",
});
result = await session.call_tool("get_weather", arguments={
    "city": "San Francisco",
})

Connection config

If the spec includes transport information, a connection config card renders below the introduction showing how to add the server to an MCP client:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["my-mcp-server"]
    }
  }
}

The card also shows the MCP protocol version, transport type, and declared capabilities.

Annotation badges

Tools with annotations display coloured badges:

AnnotationBadge
readOnlyHintread-only (green)
destructiveHintdestructive (red)
idempotentHintidempotent (blue)
openWorldHintopen-world (amber)

Live example

The Cheese Store MCP tab demonstrates MCP rendering with tools, resources, resource templates, and prompts.

Next steps