Model Context Protocol

The Ternary MCP server lets an AI assistant answer questions about your cloud costs using your live Ternary data. Instead of exporting CSVs and pasting them into a chat, you connect the assistant to Ternary once — after that it can list your tenants, discover your cost dimensions, run cost queries, and read your saved reports on its own.

It is built on the Model Context Protocol (MCP), an open standard supported by Claude, ChatGPT, and a growing list of AI tools. Any MCP client that supports remote servers with OAuth can connect.

Server URLs

Use the URL for the region where your Ternary tenant is hosted:

RegionServer URL
US (my.ternary.app)https://core-api.ternary.app/mcp
EU (my.eu.ternary.app)https://core-api.eu.ternary.app/mcp

Authentication

The server uses OAuth 2.1. When you add the connector, your AI client opens a Ternary sign-in page; you log in with your normal Ternary credentials and grant access. No API keys are involved.

Every tool call runs as you, with exactly the permissions your Ternary user has. The assistant can never see a tenant, report, or cost figure that you could not see yourself in the Ternary UI.

📘

You need an existing Ternary account

The connection does not create accounts. If your email is not already a Ternary user, sign-in fails.

Available tools

All tools are read-only.

ToolWhat it does
ternary_list_tenantsLists the tenants (organizations) you can access. Other tools take a tenantID from this list.
ternary_list_dimensionsLists the dimensions and measures available for a tenant, so queries use real field names instead of guesses. Supports search and paging.
ternary_get_dimension_valuesSamples the distinct values a field can take (for example, real service names), so filters use real values.
ternary_run_cost_queryRuns a cost/usage query: date range, grouping dimensions, measures, filters, and time precision. Returns the top groups largest-first plus a server-computed summary (exact total for the range, and how much of it the returned rows cover).
ternary_list_reportsLists a tenant's saved cost reports, searchable by name.
ternary_get_report_dataFetches a saved report's rows, one page at a time.
searchFinds your tenants and saved reports by name. Exists for clients that require the MCP search/fetch contract (ChatGPT deep research).
fetchRetrieves a search result by ID: a tenant summary or a report's data rows.

A typical conversation flows through them in order: pick a tenant → discover fields → sample values → run the query. The assistant does this on its own; you just ask the question ("what did we spend on BigQuery last quarter, by project?").

Current limitations

  • Read-only. The assistant can query costs and read reports. It cannot create or edit anything in Ternary — no budgets, labels, rules, or reports.
  • FOCUS billing data only. Queries run against the FOCUS-normalized billing dataset (FOCUS_BILLING). Other data sources (Kubernetes, carbon footprint, custom datasets) are not exposed yet.
  • Cost queries only. Anomalies, budgets, recommendations, forecasts, and commitment data are not available through MCP yet.
  • Tenant list requires an explicit role. ternary_list_tenants returns only tenants where your user has a direct role. Users who rely on global access without per-tenant roles see an empty list.
  • Responses are bounded. To fit an AI model's context window, every response caps its row count and size. Large results are paged; cost queries return the top groups plus a summary rather than every row. This is by design — the summary total is exact even when the rows shown are not exhaustive.
  • Value sampling covers recent data. ternary_get_dimension_values searches recent data. A value that stopped appearing (a decommissioned account, an ended provider feed) may return no match even though historical rows carry it.
  • ChatGPT deep research sees two tools. In ChatGPT's deep research mode, connectors expose only search and fetch. The full tool set requires ChatGPT developer mode. See Connect ChatGPT (web).

Data protection

  • Transport is HTTPS only, authenticated with short-lived OAuth tokens scoped specifically to the MCP endpoint.
  • Every tool call is permission-checked through the same authorization layer as the Ternary web app and logged for audit.
  • Ternary never sends your data anywhere on its own — data moves only when your AI client calls a tool during your conversation. What the AI provider then does with conversation content is governed by your agreement with that provider (Anthropic, OpenAI, etc.).

Did this page help you?