# MCP

> Sign in once and Claude Code, Cursor, or any MCP client can query your telemetry; API keys are only for headless agents.

Fixter exposes its platform as MCP (Model Context Protocol) tools behind one endpoint.
Connect once and your agent can search logs, walk traces, run
[QuerySQL](/reference/querysql/), manage alert rules, and work investigations. The
[MCP tools reference](/reference/mcp-tools/#telemetry) lists everything it gets.

## For people: sign in with OAuth

If the agent runs on your machine (Claude Code, Cursor, an editor), you authenticate
as yourself. Add the server with no credentials and your client opens a browser
sign-in the first time it connects; you log in with your normal Fixter account and
the agent acts with your role.

<Tabs>
  <TabItem label="Claude Code">

```sh
claude mcp add fixter --transport http https://mcp.fixter.dev/mcp
```

That only registers the server. Inside Claude Code, run `/mcp` to sign in: it opens the
browser OAuth flow, and the Fixter tools are unavailable until you do.

```
/mcp
```

For a project-shared setup, commit a `.mcp.json` at the repo root:

```json
{
  "mcpServers": {
    "fixter": {
      "type": "http",
      "url": "https://mcp.fixter.dev/mcp"
    }
  }
}
```

  </TabItem>
  <TabItem label="Cursor">

Add Fixter to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` in one
project:

```json
{
  "mcpServers": {
    "fixter": {
      "url": "https://mcp.fixter.dev/mcp"
    }
  }
}
```

Enable it under **Cursor Settings > MCP**; the browser sign-in opens on first
connection.

  </TabItem>
  <TabItem label="Any other client">

Configure a remote MCP server with endpoint `https://mcp.fixter.dev/mcp` and
Streamable HTTP transport, leaving auth to the client: Fixter serves the standard MCP
OAuth discovery documents, so any client that supports remote-server sign-in walks
the browser flow on its own. Check your client's MCP documentation for where the
server entry goes.

  </TabItem>
</Tabs>

## For machines: API keys

Headless and remote agents (CI jobs, server-side automations, agents with no browser)
authenticate with a workspace API key instead, sent as a header on every request:

```
Authorization: Bearer fixter_sk_<your-key>
```

Keys are created at [Settings > API keys](https://app.fixter.dev/settings/api-keys)
in the app; the value is shown once, so copy it then. For Claude Code running headless,
the same add command takes the header:

```sh
claude mcp add fixter --transport http https://mcp.fixter.dev/mcp \
  --header "Authorization: Bearer fixter_sk_<your-key>"
```

Prefer OAuth whenever a person is present. Keys do not expire on their own, so they are
a standing credential you have to manage.

## Verify it works

Ask your agent to list its Fixter tools. You should see the telemetry tools (`logs`,
`spans`, `get_trace`, `run_sql`, and friends). Then ask it something real:

> "Using Fixter, what services logged errors in the last hour?"

If tools don't appear: re-check the endpoint URL, complete the browser sign-in if one
is pending, and for key-based setups confirm the key wasn't revoked
([Settings > API keys](https://app.fixter.dev/settings/api-keys) lists active keys by
prefix).

## Notes

- Your agent operates with your permissions (or the key's). Admin-gated tools
  politely refuse otherwise.
- Long results are truncated to stay agent-friendly; tools take filters and limits
  for precise paging.
- The docs are agent-readable too: point your agent at [/llms.txt](/llms.txt) for
  concepts while the MCP endpoint serves your live data.