passing module for mcp server name

This commit is contained in:
2026-01-22 17:43:34 +05:30
parent 2ed962d639
commit cb68b0b93f
5 changed files with 12 additions and 5 deletions

View File

@@ -20,11 +20,12 @@ def generate_resources(module: str, project_name: str | None, out_dir: Path) ->
renderer = MCPRenderer()
renderer.generate_sources(project, out_dir)
def serve(mcp_root: Path) -> None:
def serve(module: str, mcp_root: Path) -> None:
"""
Serve MCP documentation from a pre-built bundle.
Args:
module: The dotted path of the primary module to serve.
mcp_root: Path to the directory containing index.json, nav.json, and modules/.
"""
if not mcp_root.exists():
@@ -42,6 +43,6 @@ def serve(mcp_root: Path) -> None:
server = MCPServer(
mcp_root=mcp_root,
name="doc-forge-mcp",
name=f"{module}-mcp",
)
server.run()