https://api.peel.sh/mcp. Use call_endpoint to run the same compiled endpoints you call over REST with the same api_id, endpoint names, and schemas. Peel may also expose useful endpoints as dedicated discoverable tools, while generic helper endpoints stay behind call_endpoint.
Quick setup via CLI
The fastest way to connect your agents:- Claude Code
- Codex CLI
- Cursor
- Claude Desktop
peel auth login instead. If you want the full health check after setup, keep using peel setup because it runs peel doctor at the end.
Manual config
If you prefer manual setup, pick the auth method your client supports and use one of these config blocks:- OAuth
- API key
X-API-Key for a fixed credential.
If negotiation fails, check the client-side MCP logs first. The URL or auth method is usually wrong before anything on Peel’s side is. Your client may require a client-specific OAuth callback URI. For example, Cursor registers cursor://anysphere.cursor-mcp/oauth/callback. Check the client’s MCP setup docs for the exact value.
Direct JSON-RPC clients
Clients that callPOST /mcp directly must send an Accept header that includes application/json or text/event-stream. Send MCP-Protocol-Version: 2025-11-25 after initialization when your client supports the current protocol. Peel also accepts 2025-03-26 for older clients, and treats a missing protocol-version header as 2025-03-26 for backward compatibility.
Batch JSON-RPC payloads are only accepted with MCP-Protocol-Version: 2025-03-26. Current-protocol requests must send one JSON-RPC request or notification per POST.
Use the API through an agent
Once connected, the agent sees Peel’s platform tools alongside any useful endpoint tools Peel exposes directly. The runtime flow mirrors REST:Find or create an API
Call
list_apis to reuse an existing one, or create_api to compile a new API from a URL. Pass wait_for_completion: true if you want the build to block until terminal state.Inspect the contract
Call
get_api to read status, endpoints, auth_mode, and requires_session before running anything. Each endpoint includes endpoint_type, auth_requirement, runtime_policy, runtime_verification, schemas, and call examples.Handle paused builds
If
status is needs_input, send the requested object through respond_to_api_input. See API updates.call_endpoint is the generic runtime path. It works even for endpoints that are not exposed as separate MCP tools.
call_endpoint returns the same sanitized response envelope as REST :call: status, status_code, data, error, error_code, execution_time, and optional transport, session, and clipped raw_output fields. API identity and auth capability fields stay on get_api and export metadata rather than inside each runtime response.
Platform tools reference
Each platform tool is a one-to-one wrapper around a REST route. If you know the REST call you want, the table below shows the equivalent MCP tool, and vice versa.| MCP tool | REST route | OAuth scope |
|---|---|---|
list_apis | GET /v1/apis | mcp:read |
get_api | GET /v1/apis/{api_id} | mcp:read |
get_api_health | GET /v1/apis/{api_id}/health | mcp:read |
export_openapi | GET /v1/apis/{api_id}/exports/openapi | mcp:read |
export_mcp | GET /v1/apis/{api_id}/exports/mcp | mcp:read |
create_api | POST /v1/apis | mcp:write |
revise_api | POST /v1/apis/{api_id}/revise | mcp:write |
rebuild_api | POST /v1/apis/{api_id}/rebuild | mcp:write |
respond_to_api_input | POST /v1/apis/{api_id}/respond | mcp:write |
call_endpoint | POST /v1/apis/{api_id}/endpoints/{endpoint_name}:call | mcp:tools |
get_credits | GET /account/credits | mcp:read |
/v1/apis, :call, export, and credits surfaces rather than a separate runtime.
get_api_health returns the same build-stage failure diagnostics as GET /v1/apis/{api_id}/health, so MCP clients can inspect non-publishable builds without switching to REST.
Session-backed APIs
When an API requires a target-site session, the login endpoint returnssession_id and encryption_key. Pass both as top-level call_endpoint arguments alongside api_id and endpoint_name, not inside params. See Authenticated APIs for the full JSON-RPC envelope.
Related pages
- Authentication: host auth and target-site sessions
- Deterministic runtime: what the runtime contract is and is not
- API updates: revise, rebuild, and respond
- Errors: runtime error codes