> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peak.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Give coding agents read access to your runs, runners, and setup.

> [!NOTE]
>
> Ask Peak to turn on the MCP server for your workspace.

## Before you start

Create a token with these scopes through [API access](https://docs.peak.inc/api-access.md#create-a-token).

```text theme={null}
workspace:read
runs:read
```

Store it in this environment variable.

```text theme={null}
PEAK_TOKEN
```

## Connect your agent

**Claude Code**

```bash theme={null}
claude mcp add --transport http peak https://app.peak.inc/api/mcp \
  --header "Authorization: Bearer $PEAK_TOKEN"
```

Add this flag to use it in every project.

```text theme={null}
--scope user
```

**Cursor**

```json ~/.cursor/mcp.json theme={null}
{
  "mcpServers": {
    "peak": {
      "url": "https://app.peak.inc/api/mcp",
      "headers": { "Authorization": "Bearer ${env:PEAK_TOKEN}" }
    }
  }
}
```

**Other agents**

Use this Streamable HTTP endpoint.

```text theme={null}
https://app.peak.inc/api/mcp
```

Send the token in this header.

```text theme={null}
Authorization: Bearer PEAK_TOKEN
```

Copy the same setup from Settings → API access → Connect an agent.

## Ask your agent

```text theme={null}
Why did the last CI run on main fail? Which step is slowest in ci.yml this week?
```

## Use the tools

Every tool reads data.
No tool changes your workspace.

| Tool | Use it to |
| - | - |
| get\_workspace | Read the workspace name and ID. |
| list\_runs | List jobs that ran on Peak, newest first. |
| get\_run | Read one job's runner, timing, and GitHub link. |
| list\_workflow\_runs | List a repository's workflow runs. |
| get\_workflow\_run | Read each job's queue time, run time, result, and failed steps. |
| get\_workflow\_timings | Read p50, p90, and max time per job and step. |
| list\_runners | List runner pools and their repositories. |
| get\_runner\_status | Check capacity for each runner size. |
| list\_runner\_profiles | Read a repository's profiles. |
| list\_runner\_types | List released runner labels. |
| find\_repository | Find a repository's GitHub ID by owner/name. |
| get\_onboarding | Check setup progress. |
| list\_audit\_events | Read workspace activity. Needs audit:read. |

Expect more tools when other beta features are on, such as job search, job logs, and test results.

## Check limits

Expect up to 120 requests per minute per token.
Expect larger results to fail with result\_too\_large.
Narrow the request and retry.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.