devops_utils.mcp.server module

MCP server exposing devops-utils core tools.

Requires the mcp optional dependency: pip install devops-utils[mcp]. The import of mcp is deferred so that importing the package never pulls in the MCP SDK when the extra is not installed.

devops_utils.mcp.server.main() → None[source]

Entry point for the devops-utils-mcp console script (stdio transport).

Only stderr — the server’s log channel — is hardened. stdout and stdin carry framed JSON-RPC that the MCP SDK owns and already writes as UTF-8 bytes; reconfiguring them here would layer a second wrapper over the same handles and, worse, let backslashreplace corrupt a frame instead of letting the serializer escape it.

The env file is loaded here because GUI launchers (Claude Desktop, Claude Code on Windows) start the server without the user’s shell session vars.