Boundary
Analytics, not an autonomous agent.
Apirelio's MCP server adapts existing analytics services to Model Context Protocol. It does not call OpenAI or another language model, does not need a provider API key and cannot modify project data.
Read-only
Every tool is declared read-only and exposes bounded aggregate results, never raw telemetry events.
One project
Each token belongs to exactly one project and cannot request another tenant.
Bounded
Calls are rate limited, cached briefly and capped by list and response-size limits.
Connect
Create and configure a connection.
Open AI & MCP in project navigation. A workspace owner names the connection, chooses 30, 90, 180 or 365 days, then copies the project server URL and one-time bearer token into the MCP client.
POST /mcp/projects/YOUR_PROJECT_ID
Authorization: Bearer apr_mcp_••••••••
Content-Type: application/json
Accept: application/json, text/event-stream
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "Your client", "version": "1.0" }
}
}Apirelio stores only a SHA-256 hash. If the token is lost, revoke the connection and create another one.
Client setup
Connect Claude Code or OpenAI Codex.
Apirelio uses the standard Streamable HTTP transport. In any compatible MCP client, enter the project server URL and send the connection token as an Authorization: Bearer header. Do not select stdio or the deprecated SSE transport.
YOUR_PROJECT_ID is a placeholder, not a valid value. Replace it with your numeric Apirelio project ID. For example, if the AI & MCP page shows https://apirelio.com/mcp/projects/17, replace YOUR_PROJECT_ID with 17. The safest option is to copy the complete Server URL directly from that page.
Claude Code
Export the token as APIRELIO_MCP_TOKEN, save this as .mcp.json, then run claude mcp list or open /mcp. Keep the token out of the JSON file.
{
"mcpServers": {
"apirelio": {
"type": "http",
"url": "https://apirelio.com/mcp/projects/YOUR_PROJECT_ID",
"headers": {
"Authorization": "Bearer ${APIRELIO_MCP_TOKEN}"
}
}
}
}OpenAI Codex CLI, IDE and desktop
Export APIRELIO_MCP_TOKEN and add this table to ~/.codex/config.toml. Codex CLI, its IDE extension and the ChatGPT desktop app share this configuration. Verify it with codex mcp list or /mcp.
[mcp_servers.apirelio]
url = "https://apirelio.com/mcp/projects/YOUR_PROJECT_ID"
bearer_token_env_var = "APIRELIO_MCP_TOKEN"
startup_timeout_sec = 30
tool_timeout_sec = 60
enabled = trueCreate a separate connection in each project and add each one to your client under a descriptive name such as apirelio-orders or apirelio-billing. Each server entry uses that project's URL and token, so analytics and credentials remain isolated.
Example session
From prompt to evidence in seconds.
This anonymized OpenAI Codex session shows two typical workflows. Codex selects explicit Apirelio tools, receives bounded structured analytics and turns the returned metrics into an evidence-based answer.
Capabilities
Eight explicit analytics tools.
get_project
Safe project context and connection status.
get_attention_items
Prioritized critical and warning items.
search_customers
Resolve a customer name to a stable ID.
get_customer_health
Explain one customer health score and risks.
investigate_incident
Aggregate diagnosis for a stable error code.
compare_release
Compare a release with its baseline.
summarize_changes
Compare a period with the preceding period.
get_integration_journey
Integration funnel and stalled customers.
There is no general SQL, HTTP, URL-fetch or arbitrary analytics-query tool. Default periods cover the last seven days and cannot exceed 90 days.
Ask
Questions grounded in evidence.
- Which customers need attention this week, and why?
- Did release 2026.08.4 improve reliability?
- Investigate error code PAYMENT_TIMEOUT in production.
- Which integrations are stalled before regular usage?
Tool summaries are deterministic. Your MCP client decides how to combine the returned metrics into its answer.
Responsibility
Keep project credentials scoped.
Store the bearer token in your MCP client's secret storage, never source control or a URL. Revoke unused connections immediately and prefer the shortest practical expiration.
Analytics sent to an AI client are subject to that client's processing, privacy and retention rules. Review them before connecting production projects.
Recover
Authentication and limits.
UNAUTHENTICATED means the token is missing, invalid, expired, revoked, lacks analytics:read or belongs to another project. Create a replacement connection if the secret cannot be recovered.
A rate-limited response means the connection exceeded its per-minute allowance. Retry after the indicated window. For oversized or slow analytics, shorten the period or lower the requested list limit.