Skill & MCP

Skill & MCP

Connect an AI agent to Bazantic — install the skill, point an MCP client at a gateway, or wire in the Recipe catalog.

There are three ways to put Bazantic in front of an agent, and they work together: the skill teaches the agent how to work, a gateway's MCP server gives it typed tools for one API, and the Recipe server gives it whole tasks as single tools.

Install the skill

The skill is a single Markdown file served at bazantic.com/skill. It teaches an agent to route third-party API calls through a gateway instead of reaching for a provider signup and an API key, and it documents the CLI workflows for registering and inspecting gateways.

For Claude Code, download and review the file before you install it. This example limits trust to the current project:

curl -fsSL https://bazantic.com/skill -o /tmp/using-bazantic-SKILL.md
less /tmp/using-bazantic-SKILL.md
mkdir -p .claude/skills/using-bazantic
install -m 0644 /tmp/using-bazantic-SKILL.md .claude/skills/using-bazantic/SKILL.md

Install the reviewed file in a user skills directory only when you want it in every project. Any agent that reads SKILL.md files can consume the same file.

Point an MCP client at a gateway

A gateway's MCP server, when it has one, is always its own URL plus /mcp. Take endpointUrl from baz gateway list --json (or the dashboard's Overview tab) and append /mcp. The listing's mcp flag tells you whether a server can be generated from that gateway's spec — OpenAPI pairs with a REST service, OpenRPC with a JSON-RPC one — so a gateway with no spec, or a spec that contradicts its protocol, has no MCP server to point at.

Any MCP client that reads an mcpServers block takes this — Cursor's .cursor/mcp.json included:

{
  "mcpServers": {
    "example-api": { "url": "https://<your-gateway>/mcp" }
  }
}

Claude — the link opens the Add-custom-connector dialog prefilled; review and confirm there:

https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=example-api&connectorUrl=https://<your-gateway>/mcp

Claude Code publishes no install link. Add it from the CLI instead:

claude mcp add --transport http example-api https://<your-gateway>/mcp

Cursor has the same kind of link — its documented cursor:// deeplink, name plus a base64-encoded config, both URL-encoded:

cursor://anysphere.cursor-deeplink/mcp/install?name=example-api&config=<base64 of {"url":"https://<your-gateway>/mcp"}>

(cursor.com/install-mcp?…, same params, is the https wrapper Cursor offers for contexts that strip custom URL schemes, like GitHub READMEs.)

ChatGPT / Codex — ChatGPT adds the server through Settings → Connectors, by hand, behind Developer mode — no link opens it for you. Codex CLI takes a one-liner:

codex mcp add example-api --url https://<your-gateway>/mcp

Listing the tools is free. A JSON-RPC tools/list call returns every operation with its parameters, which is the cheapest way to learn what a gateway exposes:

curl -s -X POST -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
  https://<your-gateway>/mcp | sed -n 's/^data: //p' | jq -r '.result.tools[].name'

The reply is an SSE stream (event: message / data: {…}) rather than bare JSON, so it needs the sed before jq.

MCP discovers; the CLI pays

Calling a priced tool over MCP returns 402 Payment Required, and an ordinary MCP client cannot settle that challenge. Use the MCP server to discover routes and schemas. Then make the paid call with one of these:

  • baz curl, from a terminal.
  • The fetch tool of baz mcp, from an MCP client. Install it with baz mcp install --client <client>.
  • baz recipe mcp, for a Recipe. baz recipe install adds it to an MCP client.

See Paid calls in an MCP client.

Wire in the Recipe catalog

A Recipe is one task published as a single MCP tool — typed inputs, a fixed prompt, and the tools it may call. Each of those tools is an Ingredient, and every Ingredient comes from a gateway already on Bazantic. Where a gateway's MCP server gives an agent one API's endpoints, the Recipe server gives it finished tasks that span several.

One command wires the whole published catalog into a client, payment included:

baz recipe install --client claude-code   # or codex, or cursor

The installer previews the bazantic-recipes entry before it writes the config and backs up the file it replaces. It saves no individual tool, so every tools/list returns the catalog as it stands. Calls are paid, and the payer is the wallet or grant this device already has — set the per-call ceiling as gateway.maxAmountUsd. With a signed-in session the same server also carries the bazantic_* control tools for listing, drafting and publishing Recipes; see Command line. Recipe commands need @bazantic/cli 0.9.0 or later.

Reading the catalog costs nothing and needs no key, so an agent can decide what to call before it spends:

# every published Recipe, with its input schema
curl -s https://api.bazantic.com/v1/recipes | jq -r '.[] | [.handle, .name] | @tsv'

# the same catalog as typed MCP tools
curl -s -X POST -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
  https://api.bazantic.com/mcp | jq -r '.result.tools[].name'

The Accept header is required and needs both media types — without it the server answers 406. The reply is plain JSON rather than an SSE stream, so it needs no sed before jq. The pages people read are at bazantic.com/recipes.

The public Recipe server discovers only

https://api.bazantic.com/mcp answers initialize and tools/list. A tools/call there returns Method not found — the paid call goes to the gateway URL the initialize result advertises under _meta["com.bazantic/recipe"].gateway_mcp_url. Read that URL from initialize rather than building it by hand; baz recipe install does all of this for you.

If a tool returns an error, read MCP errors. The reference explains each Recipe error, execution status, and the next action for people and agents.

Which to use

SituationUse
The agent should stop suggesting API-key signupsThe skill
The agent needs typed tools for one specific APIThat gateway's MCP server
The task spans several APIs and should be one callA Recipe, via baz recipe install
The call must settle a paymentbaz curl in a terminal, or baz mcp in an MCP client
You are scripting gateway setup or auditsThe CLI directly