Skip to content

Mcp Utils

docforge.cli.mcp_utils

generate_resources

generate_resources(module: str, project_name: str | None, out_dir: Path) -> None

Generate MCP-compatible documentation resources.

Parameters:

Name Type Description Default
module str

The dotted path of the primary module to document.

required
project_name str | None

Optional override for the project name.

required
out_dir Path

Directory where the MCP JSON resources and nav will be written.

required

serve

serve(module: str, mcp_root: Path) -> None

Serve MCP documentation from a pre-built bundle.

Parameters:

Name Type Description Default
module str

The dotted path of the primary module to serve.

required
mcp_root Path

Path to the directory containing index.json, nav.json, and modules/.

required