AI
MCP Server
/v2/mcpModel Context Protocol (MCP) server for AI agents. Connect any MCP client (Claude, ChatGPT, Cursor, VS Code, Windsurf or your own agent) to one URL, https://api.bavest.co/v2/mcp, and use the Bavest v2 data routes as tools.
Quick start
{
"mcpServers": {
"bavest": {
"url": "https://api.bavest.co/v2/mcp",
"headers": { "x-api-key": "YOUR_API_KEY" }
}
}
}
Tools
Each tool wraps one REST route and is named after the route's operationId in snake case: equities.profile is equities_profile, etfs.topHoldings is etfs_top_holdings. initialize and tools/list work without a key and return the exact names and input schemas. A tool call counts against your plan like the REST call it wraps; a route outside your plan answers with an error.
Authentication
Send your API key in the x-api-key header, as on every REST route. Connectors that can only take a URL (Claude custom connectors, ChatGPT developer mode) may pass the same key as the optional api_key query parameter instead. URLs end up in logs and settings exports, so prefer the header.
Free in every plan, including the trial.
Authentication
Send your API key in the x-api-key header on every request to https://api.bavest.co. The samples read it from the BAVEST_API_KEY environment variable. Get an API key · Authentication guide
Parameters
None besides the API key: send it in the x-api-key header (preferred). Connectors that cannot set headers may send it as the optional api_key query parameter instead; URLs end up in logs, so use that only where no header is possible.
Try it
POST /v2/mcp
Sent only to api.bavest.co for this request; not stored.
Request body
JSON-RPC 2.0 request following the MCP specification.
jsonrpcstringrequiredJSON-RPC protocol version
One of
2.0idstringRequest identifier (omit for notifications)
methodstringrequiredMCP method to invoke
One of
initializetools/listtools/callpingparamsobjectMethod parameters (varies by method)
Response 200
MCP server response. The response format follows the Model Context Protocol specification and varies based on the MCP method invoked by the client. · application/json
jsonrpcstringJSON-RPC version
Example
2.0idstringRequest identifier
resultobjectMCP response payload (varies by method)
metaResponseMetaResponse envelope metadata. Always present on a 200:
timeis set bycore/response.pyon every successful response. Errors carry the same block, built by the same code, so a client parses one meta shape whether the call succeeded or failed.timeintegerServer-side processing time in milliseconds
Example
17parametersobjectEcho of the request parameters the endpoint resolved
Errors
- 401Missing or invalid API key.
- 429Rate limit exceeded. Retry after the `Retry-After` header interval.
- 500An unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value.
- defaultAn unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value.

