Skip to content

Servers

docforge.servers

Server layer for doc-forge.

This module exposes server implementations used to provide live access to generated documentation resources. Currently, it includes the MCP documentation server.


Classes

MCPServer

MCPServer(mcp_root: Path, name: str)

MCP server for serving a pre-generated documentation bundle.

The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

Initialize the MCP server.

Parameters:

Name Type Description Default
mcp_root Path

Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

required
name str

Identifier used for the MCP server instance.

required
Functions
run
run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http') -> None

Start the MCP server.

Parameters:

Name Type Description Default
transport Literal['stdio', 'sse', 'streamable-http']

Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

'streamable-http'