MCP server
Connect Claude Code, Cursor, VS Code, the Claude API or any MCP client to the Ostra MCP server — URL, transport, authentication, protocol versions, tools, errors and long-running calls.
The Ostra MCP server gives AI agents the Ostra models as tools. It's the same models, prices, limits and keys as the REST API.
| URL | https://ostra.testrelic.ai/mcp |
| Transport | Streamable HTTP (POST only; stateless, no session id) |
| Auth | Authorization: Bearer <key> header with an Ostra API key. No OAuth. |
| Protocol versions | 2025-06-18 (default) and 2025-03-26 |
| Server | ostra ("Ostra") |
Connect a client
Use a Full access key: read-only keys can list the tools but not call them.
claude mcp add --transport http ostra https://ostra.testrelic.ai/mcp --header "Authorization: Bearer $OSTRA_API_KEY"claude mcp add --transport http ostra https://ostra.testrelic.ai/mcp --header "Authorization: Bearer $env:OSTRA_API_KEY"Keep it on one line. Check it with claude mcp list: ostra should show ✓ Connected.
If Claude Code reports Dynamic Client Registration or needs authentication, the header didn't reach it (usually a line break in the command). Run claude mcp remove ostra and add it again.
A connected client shows up in the Console under MCP servers → Clients within a minute. The Test connection button there checks the server without calling a tool or charging anything.
Empty replies or dropped connections?
Antivirus HTTPS scanning (for example a "web shield") can break streamed MCP responses. Exclude ostra.testrelic.ai from HTTPS scanning and reconnect.
Tools
| Tool | Does | Cost |
|---|---|---|
ostra_triage_failure | Classifies a failing test. | $0.50 / 1M failures |
ostra_select_impacted_tests | Picks the tests a change affects. | $2.00 / 1M requests |
ostra_check_selector | Predicts which locators break next release. | $0.25 / 1M locators |
ostra_pro_chat | Asks Ostra Pro. | Per token |
ostra_list_models | Lists the models. | Free |
The three Ostra Decision tools take the task input directly as arguments (no model/task wrapper) and return the same object as /predict. Owners, admins and developers can turn any tool off for the workspace under MCP servers → Tools; a turned-off tool disappears from tools/list and calls to it fail with permission_error (REST is unaffected).
The server has no resources or prompts.
Talking to it directly
You rarely need to, but the server is plain JSON-RPC over HTTP, handy for testing:
curl https://ostra.testrelic.ai/mcp \
-H "Authorization: Bearer $OSTRA_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'- Methods:
initialize,ping,tools/list,tools/call. JSON-RPC batches of up to 100 messages are accepted; a request with only notifications answers202. - Send
MCP-Protocol-Version: 2025-06-18(or2025-03-26) after initializing; any other value is refused with-32600. The response echoes the version. GETandDELETEanswer405(the server keeps no sessions).- Body limit: 2 MB.
Results and errors
A successful call returns the answer twice: as text in content[0].text and as JSON in structuredContent (for ostra_pro_chat the text is the answer itself; for the other tools it's the JSON). Tool problems come back as a result with isError: true, the error as JSON in both places:
{
"content": [{ "type": "text", "text": "{\"error\":{\"type\":\"rate_limit_exceeded\",\"message\":\"Rate limit of 600 requests per minute reached. Retry after 18s.\",\"retry_after_ms\":18000}}" }],
"structuredContent": { "error": { "type": "rate_limit_exceeded", "message": "Rate limit of 600 requests per minute reached. Retry after 18s.", "retry_after_ms": 18000 } },
"isError": true
}The type values are the same as the REST errors. Authentication and IP-allowlist failures are HTTP 401/403 before any JSON-RPC. Protocol errors use JSON-RPC codes -32700, -32600, -32601, -32602 and -32603.
Long-running calls
ostra_pro_chat can take a while (a cold start, a long answer). If your client sends Accept: text/event-stream, the server answers that call as a stream: event: message frames, a : keep-alive comment every 15 seconds, and, when the request carries _meta.progressToken, notifications/progress messages (starting, then writing (about N tokens so far)). Clients that only accept JSON get the JSON answer, with whitespace sent ahead of it to keep the connection open.
Billing and limits
MCP calls are billed and rate limited exactly like REST: the same prices, the same per-workspace requests-per-minute counter (one per billable tools/call), and the same balance and spend limits. initialize, tools/list and ostra_list_models are free and not counted. MCP responses carry no rate-limit headers.