MCP
Connect Claude, Cursor, or any MCP client to OpsLyft so it can answer questions about your cost and inventory.
The OpsLyft MCP server lets an AI client, such as Claude Desktop, Claude Code, or Cursor, read your OpsLyft data while it answers you. Ask "What did we spend on EC2 last month, by account?" in your client and it calls OpsLyft's tools to find out.
MCP (Model Context Protocol) is an open standard for connecting AI clients to tools and data.
Two different MCP features
This page is about connecting your AI client to OpsLyft. To let FinOps Copilot call your own MCP servers, see MCP servers.
Before you begin
You need an access key. Give it the access you want the AI client to have: Viewer on All spend is a good start for asking questions.
Server details
| URL | https://v2.opslyft.com/api/mcp/sse |
| Transport | SSE (Server-Sent Events) |
| Auth header | X-Opslyft-Key: olt_… |
Use this URL
Older guides point to mcp.opslyft.com. That server doesn't accept keys from MCP & Access Keys, so use the URL above.
Connect your client
When you create a key, OpsLyft shows these configs with your key already filled in. Replace <your olt_ token> if you're copying from here.
Add the opslyft entry under mcpServers in claude_desktop_config.json, then restart Claude Desktop. In Claude Desktop, open Settings → Developer → Edit Config to find the file.
{
"mcpServers": {
"opslyft": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://v2.opslyft.com/api/mcp/sse",
"--transport",
"sse-only",
"--header",
"X-Opslyft-Key: <your olt_ token>"
]
}
}
}This uses mcp-remote, which needs Node.js 18 or later.
Claude.ai on the web
Connectors on claude.ai in the browser aren't supported yet. Use Claude Desktop or Claude Code.
Check it works
Ask your client something simple:
What cloud providers does OpsLyft see for us, and what currency are costs in?
The client should call get-customer-info and answer with your organisation's providers and currency. Then try a real question:
Show our cost by service for last month, top 10.
What the client can see
The client sees exactly what the key allows: the same roles, scopes, and modules. For example:
- A key scoped to one AWS account only returns cost for that account.
- A key without access to Atlas gets Missing permission from the Atlas tools.
- The allocation tools need a key with Admin on all spend.
Every tool except the allocation-editing ones only reads. See MCP tools for the full list.
Ask good questions
The tools work best with specific questions:
- Name the period: last month, Q3 2026, the last 30 days.
- Name the slice: by service, by account, by team tag.
- Name the cloud if you only care about one: AWS only.
- Ask to compare: compared with the month before.
Costs come from your bill, which usually runs a day behind. A question about "today" returns the last complete day. See Data freshness.
Privacy
OpsLyft logs each tool call, with its inputs and results, to improve answers and to troubleshoot. The client's other conversation isn't sent to OpsLyft unless the client includes it in a tool call. The server asks clients to call start-session with your question and end-session with the final answer, so a conversation can be followed end to end.
Troubleshooting
| Problem | What to do |
|---|---|
401 Unauthorized when connecting | The key is wrong, expired, or revoked, or its creator is no longer active. Create a new key. |
| The client connects but has no OpsLyft tools | Restart the client after editing its config. Check the URL ends in /api/mcp/sse. |
| A tool says Missing permission | The key's role doesn't include that module. Create a key with a broader role. |
| A tool says module is not enabled | Your organisation hasn't turned that module on. Ask an Owner or Admin. |
429 Rate limit exceeded | Wait the number of seconds in Retry-After. See Errors and limits. |
| The connection drops after a deploy | Reconnect or restart the client. Sessions don't survive an OpsLyft release. |