MCP
Connect an agent to Bonds API
Seven tools for sovereign yields, spreads, and curves. The server is
https://mcp.bonds-api.com/mcp.
Without a credential, initialize and tools/list answer 401 so the client knows auth is required.
That is not a browser login.
Tools
-
latestMost recent sovereign yields for one or more countries and maturities. Maps to GET /api/v1/latest.
-
historicalYield for one country, maturity, and past date. Maps to GET /api/v1/historical.
-
timeseriesYield series for one country and maturity between two dates. Maps to GET /api/v1/timeseries.
-
spreadYield spread of a country against a benchmark (Bund, Treasury). Maps to GET /api/v1/spread.
-
curveFull sovereign curve for one country. Maps to GET /api/v1/curve.
-
intradayIntraday snapshots for one country, maturity, and day. Professional plan. Maps to GET /api/v1/intraday.
-
fluctuationChange, min, and max over a period for one or more countries. Maps to GET /api/v1/fluctuation.
Authentication
Two credentials work. There is no browser login and no public client ID to paste.
- API key. Create one after register, on API keys. Send it as
X-API-Key: YOUR_API_KEY. A raw key inAuthorization: Beareris rejected. - OAuth client credentials.
POST https://bonds-api.com/oauth/tokenwithgrant_type=client_credentials.client_idis shown next to the key;client_secretis the key. The response is a one-hour access token. Send that token, and only that token, asAuthorization: Bearer.
?apikey= on the MCP URL is accepted and forwarded as X-API-Key, but Claude Desktop and claude.ai strip query credentials from the saved connector URL. Do not use npx or mcp-remote.
Claude
- Settings → Connectors → Add custom connector.
- Name:
Bonds API. Remote server URL:https://mcp.bonds-api.com/mcp. No key in the URL. - Claude will notice the 401 and may offer to connect. There is no Bonds login screen behind that button, and no client ID to fill in. Use Claude Code (or Cursor) to send
X-API-Key.
claude mcp add --transport http bonds-api https://mcp.bonds-api.com/mcp --header "X-API-Key: YOUR_API_KEY"
Cursor
Cursor Settings → MCP, or ~/.cursor/mcp.json. Header, not query string.
{
"mcpServers": {
"bonds-api": {
"url": "https://mcp.bonds-api.com/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
ChatGPT
Settings → Connectors → custom MCP connector, remote URL https://mcp.bonds-api.com/mcp.
Do not proxy this endpoint through the OpenAI API.
A connector that only knows browser OAuth cannot attach an X-API-Key header; use Cursor or Claude Code for keyed calls.
FAQ
Why does initialize return 401? So clients know a credential is required before listing tools. tools/call does not 401: a missing key comes back as a tool error.
Does a call count against my quota? Yes. Each tool call is one REST request.
Discovery: /.well-known/mcp.json. Token details: /auth.md.