MCP Server Modules#

This page documents internal MCP server modules for contributor visibility. These underscored module paths are intentionally unstable.

Module entrypoint for built-in stdio MCP server.

Adapters between internal tool contracts and MCP JSON-RPC payloads.

design_research_agents._mcp_server._adapters.tool_result_to_mcp_payload(result)[source]

Convert one ToolResult into MCP tools/call response payload.

Parameters:

result – Internal tool invocation result.

Returns:

MCP-compatible tools/call response payload.

design_research_agents._mcp_server._adapters.tool_spec_to_mcp_payload(spec)[source]

Convert one ToolSpec into MCP tools/list payload shape.

Parameters:

spec – Internal tool specification to expose over MCP.

Returns:

MCP-compatible tools/list entry.

CLI helpers for built-in MCP server.

design_research_agents._mcp_server._cli.main()[source]

Stdio MCP server for CLI entrypoints.

Returns:

Process exit code (0 on normal shutdown).

Official MCP SDK server exposing runtime tools.

exception design_research_agents._mcp_server._server.McpServerDependencyError[source]

Raised when the optional MCP SDK is not installed.

class design_research_agents._mcp_server._server.StdioMcpServer(*, runtime=None)[source]

Thin compatibility wrapper around an official FastMCP stdio server.

Initialize the server with a runtime or default unified runtime.

run()[source]

Run the wrapped server over process stdio.

serve(*, stdin, stdout)[source]

Serve over stdio.

The official MCP SDK owns process stdio directly. The stdin and stdout parameters are accepted for backward-compatible call sites, but custom stream injection is no longer supported.

design_research_agents._mcp_server._server.create_mcp_server(*, runtime=None)[source]

Build a FastMCP server from a tool runtime.