The agent door: every subsystem's operations as MCP tools
Model Context Protocol over JSON-RPC 2.0 — one POST per message, stateless, protocol revision 2026-07-28.
POST /v1/mcp
| Address | https://api.hanzo.ai/v1/mcp |
| Method | POST |
| Operation | post_mcp |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Model Context Protocol over JSON-RPC 2.0 — one POST per message, stateless, protocol revision 2026-07-28. tools/list answers without a credential with one tool per subsystem (its operations in the "op" enum) plus "describe", which returns one operation's input schema. tools/call names a subsystem tool and carries {"op": <operation>, "input": <its arguments>}; it takes the same bearer the REST API does, and a call that carries none is answered 401 with a WWW-Authenticate header naming the resource metadata at /.well-known/oauth-protected-resource, which names the authorization server to sign in at. The tool surface is the public contract: the operator's admin product is not offered, and a name that would disclose a secret or mutate an identity is withheld — the list says how many, under _meta.
Request
5 fields, body application/json.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | body | any | — | |
jsonrpc | body | string | — | |
method | body | string | — | |
params | body | object | — | |
params.* | body | any | — |
Response
| Status | Body | Meaning |
|---|---|---|
2XX | MCPResponse | Success |
2XX body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
error | body | MCPError | — | |
error.code | body | integer | — | |
error.data | body | any | — | |
error.message | body | string | — | |
id | body | any | — | |
jsonrpc | body | string | — | |
result | body | object | — | |
result.* | body | any | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, OpenapiApi } from 'hanzoai';
const api = new OpenapiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postMcp({ id: "<id>", jsonrpc: "<jsonrpc>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import OpenapiApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = OpenapiApi(client).post_mcp(id="<id>", jsonrpc="<jsonrpc>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.OpenapiAPI.PostMcp(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, openapi_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = openapi_api::post_mcp(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.OpenapiApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new OpenapiApi(client).postMcp();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "<id>",
"jsonrpc": "<jsonrpc>"
}'The door declares no tool for openapi — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?