Create mcp

Model Context Protocol over JSON-RPC 2.0 — one POST per message, stateless, protocol revision 2026-07-28.

POST /v1/mcp

Addresshttps://api.hanzo.ai/v1/mcp
MethodPOST
Operationpost_mcp
AuthAuthorization: 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.

FieldInTypeRequiredDescription
idbodyany—
jsonrpcbodystring—
methodbodystring—
paramsbodyobject—
params.*bodyany—

Response

StatusBodyMeaning
2XXMCPResponseSuccess

2XX body — 8 fields.

FieldInTypeAlwaysDescription
errorbodyMCPError—
error.codebodyinteger—
error.databodyany—
error.messagebodystring—
idbodyany—
jsonrpcbodystring—
resultbodyobject—
result.*bodyany—

Failure carries the platform error shape — see Errors.

Examples

hanzo mcp create
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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.OpenapiAPI.PostMcp(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new OpenapiApi(client).postMcp();
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>"
     }'

MCP 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.


OpenAPI API · All Hanzo APIs · Interactive reference

Was this page useful?