openapi_to_mcp
Convert an OpenAPI spec from a URL or inline JSON/YAML into MCP tool definitions with JSON Schema inputs, annotations, and HTTP forwarding hints for agent use.
Instructions
Convert an OpenAPI spec (JSON/YAML, URL or inline) into MCP tool definitions: LLM-safe unique names, descriptions, JSON Schema inputSchema (query/path/header params + JSON body), MCP annotations (readOnly/destructive/idempotent), plus HTTP forwarding hints and a ready tools/list response. Costs 0.003 USDC on Base per successful call (x402). Without a payment key this tool returns the 402 challenge.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "openapi_to_mcp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Spec URL | |
| spec | No | Inline spec (POST) | |
| base_url | No | Override server URL |