Expand description
Mcp command - proxy stdio JSON-RPC to Materialize’s developer MCP server.
Materialize exposes a developer MCP server at POST /api/mcp/developer
over HTTP with HTTP Basic auth. Most MCP clients (Claude Desktop, Claude
Code, Cursor) launch their MCP servers as subprocesses speaking JSON-RPC
over stdio. This command bridges the two: read newline-delimited JSON-RPC
from stdin, POST each message to the developer endpoint with the active
profile’s credentials, and write each response back to stdout.
Constants§
- LOCAL_
HTTP_ 🔒PORT - Default HTTP port for a local Materialize.
- MCP_
DEVELOPER_ 🔒PATH - Path of the developer MCP endpoint on the Materialize HTTP listener.
Functions§
- developer_
url 🔒 - Build the developer MCP URL from the profile’s
http_host. - resolve_
profile 🔒 - Resolve the active profile without going through
Settings::load, so the MCP proxy works outside an mz-deploy project directory. - run
- Proxy stdio JSON-RPC to the developer MCP HTTP endpoint.
- synthesize_
error 🔒 - Build a JSON-RPC error response so the MCP client gets a structured error instead of a hang when the HTTP layer fails before the server can respond.