OCDocker.MCP.Server module

Note

The 12 MCP tools this module registers are documented in full, by hand, on the parent OCDocker.MCP package page — they are Python closures inside build_ocdocker_mcp_server() and are invisible to automodule below. This page covers only the module-level constants, exception, and the two public functions.

MCP server exposing the OCDocker Workbench API as LLM-callable tools.

Read/plan/preview tools are always available. Job-execute tools (run_job, cancel_job) require confirm=True and the Workbench job bearer token; see OCDocker.Workbench.Auth.

exception OCDocker.MCP.Server.OCDockerMCPError[source]

Bases: Exception

Raised when a Workbench API call made from an MCP tool fails.

OCDocker.MCP.Server.build_ocdocker_mcp_server(*, base_url='http://127.0.0.1:8765')[source]

Build the OCDocker Workbench MCP server.

Parameters:

base_url (str) – Base URL of a running ocdocker workbench serve API.

Returns:

Configured MCP server, not yet running.

Return type:

mcp.server.fastmcp.FastMCP

OCDocker.MCP.Server.serve_ocdocker_mcp(*, base_url='http://127.0.0.1:8765')[source]

Serve the OCDocker Workbench MCP server over stdio until interrupted.

Parameters:

base_url (str) – Base URL of a running ocdocker workbench serve API.

Return type:

None