> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: AGNT5 MCP
description: Connect Claude Code, Codex, Cursor, VS Code, and other MCP clients to AGNT5 to debug runs, check deployments, and read eval and prompt results.
last_verified: 2026-10-02
---

The **AGNT5 MCP server** is a hosted [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that gives your coding agent access to your AGNT5 projects. From Claude Code, Codex, Cursor, VS Code, or any other MCP client, your agent can debug runs, check deployments and their workers, read eval and experiment results, and run prompts and experiments, using the permissions of your AGNT5 account.

```text
https://mcp.agnt5.com/mcp
```

The server is remote and uses Streamable HTTP, so there is nothing to install or run. Sign in with your AGNT5 account through OAuth, or, where a browser sign-in isn't possible, send a personal API key in the `X-API-KEY` header (see [Use an API key](#use-an-api-key)).


> **MCP, CLI, or skills?** Use the [CLI](/docs/install-cli.md) and [AGNT5 skills](/docs/build-with-ai.md) to create, run, and deploy code from your repo. Use the AGNT5 MCP server when your agent needs to see what happened in AGNT5, such as a failed run, a deployment's workers, or an experiment's scores, and act on it. Most setups use both.


## Connect your client



**Claude Code:**

Add the server from a terminal:

```bash
claude mcp add --transport http agnt5 https://mcp.agnt5.com/mcp
```

Add `--scope project` to save it in the repo's `.mcp.json` so everyone on the project gets it. Then start Claude Code, run `/mcp`, select **agnt5**, and choose **Authenticate** to sign in to AGNT5 in your browser.

**Codex:**

Add the server with the Codex CLI. The configuration is shared by the CLI and the IDE extension.

```bash
codex mcp add agnt5 --url https://mcp.agnt5.com/mcp
codex mcp login agnt5
```

`codex mcp login` opens your browser to sign in to AGNT5. To configure it by hand instead, add this to `~/.codex/config.toml`:

```toml
[mcp_servers.agnt5]
url = "https://mcp.agnt5.com/mcp"
```

**Cursor:**

Add the server to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "agnt5": {
      "url": "https://mcp.agnt5.com/mcp"
    }
  }
}
```

Then open **Cursor Settings > Tools & MCP**, find **agnt5**, and select **Connect** to sign in to AGNT5.

**VS Code:**

Add the server to `.vscode/mcp.json` in your workspace, or run **MCP: Add Server** from the Command Palette:

```json
{
  "servers": {
    "agnt5": {
      "type": "http",
      "url": "https://mcp.agnt5.com/mcp"
    }
  }
}
```

Select **Start** above the server entry. VS Code opens your browser to sign in to AGNT5, and the tools appear in Copilot Chat's agent mode.

**Claude:**

In Claude on the web or desktop, add AGNT5 as a custom connector: open **Customize → Connectors**, select **+ → Add custom connector**, and enter `https://mcp.agnt5.com/mcp`. On a Team or Enterprise plan, an organization owner adds the URL first.

[Use AGNT5 in Claude](/docs/integrations/claude-connector.md) has the full steps, including organization setup.

**Other clients:**

Any MCP client that supports Streamable HTTP and OAuth can connect with the server URL. Add a server named `agnt5` with this URL, then follow your client's sign-in prompt:

```text
https://mcp.agnt5.com/mcp
```

For a client that only runs local (stdio) servers, bridge to the remote server with [`mcp-remote`](https://www.npmjs.com/package/mcp-remote):

```json
{
  "mcpServers": {
    "agnt5": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.agnt5.com/mcp"]
    }
  }
}
```



To check the connection, ask your agent: "Which AGNT5 account am I signed in as, and which projects can I see?" It should call `whoami` and `list_projects`.

## Use an API key

For CI, a headless machine, or a client without OAuth support, send a personal API key in the `X-API-KEY` header instead of signing in. Create one in Studio on your account's **API Keys** page, [app.agnt5.com/settings/profile/api-keys](https://app.agnt5.com/settings/profile/api-keys), then set it in your environment exactly as Studio shows it:

```bash
export AGNT5_PERSONAL_API_KEY=<your personal API key>
```

A personal API key acts with your account's access, like an OAuth sign-in. A service key, which starts with `agnt5_sk_`, doesn't work here: it belongs to a project, and the MCP server's tools act as you. The examples below read the key from `AGNT5_PERSONAL_API_KEY`, so it never lands in a config file you commit and doesn't replace a service key your app reads from `AGNT5_API_KEY`.



**Claude Code:**

Add the server with the header from your shell:

```bash
claude mcp add --transport http agnt5 https://mcp.agnt5.com/mcp \
  --header "X-API-KEY: $AGNT5_PERSONAL_API_KEY"
```

This saves the key's value in your local Claude Code settings. To share the server in the repo's `.mcp.json` without the key, reference the variable instead; Claude Code expands it when it starts:

```json
{
  "mcpServers": {
    "agnt5": {
      "type": "http",
      "url": "https://mcp.agnt5.com/mcp",
      "headers": { "X-API-KEY": "${AGNT5_PERSONAL_API_KEY}" }
    }
  }
}
```

**Codex:**

In `~/.codex/config.toml`, have Codex read the header from `AGNT5_PERSONAL_API_KEY`:

```toml
[mcp_servers.agnt5]
url = "https://mcp.agnt5.com/mcp"
env_http_headers = { "X-API-KEY" = "AGNT5_PERSONAL_API_KEY" }
```

No `codex mcp login` is needed.

**Cursor:**

In `.cursor/mcp.json` or `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "agnt5": {
      "url": "https://mcp.agnt5.com/mcp",
      "headers": { "X-API-KEY": "${env:AGNT5_PERSONAL_API_KEY}" }
    }
  }
}
```

**VS Code:**

In `.vscode/mcp.json`, VS Code prompts for the key the first time the server starts and stores it securely:

```json
{
  "inputs": [
    { "type": "promptString", "id": "agnt5-api-key", "description": "AGNT5 personal API key", "password": true }
  ],
  "servers": {
    "agnt5": {
      "type": "http",
      "url": "https://mcp.agnt5.com/mcp",
      "headers": { "X-API-KEY": "${input:agnt5-api-key}" }
    }
  }
}
```

**Other clients:**

Send `X-API-KEY: <your personal API key>` on every request to `https://mcp.agnt5.com/mcp`. For a client that only runs local (stdio) servers, pass the header through `mcp-remote`:

```json
{
  "mcpServers": {
    "agnt5": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.agnt5.com/mcp", "--header", "X-API-KEY:${AGNT5_PERSONAL_API_KEY}"],
      "env": { "AGNT5_PERSONAL_API_KEY": "<your personal API key>" }
    }
  }
}
```



Treat the key like a password: keep it in your environment or a secret store, and revoke it in your account settings if it leaks.

## What your agent can do

Your agent chains tools within one request. Suppose a support agent in production starts failing on refunds. In one conversation, your agent can find the failed runs, read the latest one's steps and logs, check whether production started serving a new deployment, and compare the next experiment run with the last one. You review each write before it's made.

### Debug a run

Find runs by status, component, or time window, then read a run step by step. `get_run_summary` returns the run's status, timing, retries, and LLM calls and cost; `get_run_events` lists its steps, LLM calls, and tool calls in order, with each one's error, duration, and attempt number. Logs, inputs, and outputs fill in the rest.

- "Show the failed runs in the payments project from the last hour. For the latest one, find the failing step and summarize the relevant logs."
- "For the latest run of the onboarding workflow, list its steps in order with their durations and tell me which one took longest."
- "Compare the input and output of the last failed refund run with the last one that completed."

Tools: `list_runs`, `get_run_summary`, `get_run_events`, `get_run_logs`, `get_run_input_output`.

For a run's span tree, open the run in Studio or run `agnt5 inspect trace -r <run-id>` (see [Traces](/docs/run/deploying.md#traces)). Error trends, latency over time, and LLM usage are on Studio's **Analytics** page.

### Check a deployment

See which deployment each environment serves, how its workers and resources are doing, and when the environment last changed. If a deployment was stopped, your agent can start it again.

- "Show the current deployment and its workers for my staging project. Don't change anything."
- "Is the production deployment for the payments project saturated? Show its queue depth and slot use."
- "Production errors went up after the last release. Show the promotion history for production, then the events and logs of the deployment it serves now."

Tools: `list_environments`, `list_deployments`, `get_deployment`, `get_deployment_events`, `get_deployment_logs`, `get_deployment_metrics`, `list_deployment_components`, `list_workers`, `list_promotion_history`, `start_deployment`.

To promote a deployment, run `agnt5 deployment promote`. To roll back, use **Rollback** in Studio (see [Roll back](/docs/run/environments.md#roll-back)). Scale or stop a deployment in Studio (see [Scale, stop, and resume](/docs/run/environments.md#scale-stop-and-resume)).

### Check quality with evals

Read datasets and experiment results, drill into failures with the scores and evidence behind them, and start or cancel an experiment run.

- "Compare the two latest experiment runs for my support agent and explain any regression. Don't start a new experiment."
- "List the failures in the latest refund experiment run and show the score evidence for the worst one."
- "Start a run of the refund experiment, then compare it with the previous run when it finishes."

Tools: `list_eval_datasets`, `list_experiments`, `list_experiment_runs`, `get_experiment_run_summary`, `compare_experiment_runs`, `list_experiment_failures`, `get_score_evidence`, `run_experiment`, `cancel_experiment_run`.

To add a run to a dataset, run `agnt5 datasets add-run <dataset-id> <run-id>`. Create datasets and experiments in Studio or with `agnt5 datasets` and `agnt5 experiments create`. Scorers are managed in Studio.

### Iterate on prompts

Read prompts and their versions, and run a saved prompt to see its completion, token counts, latency, and cost. `run_prompt` asks for a model integration ID, which Studio shows under the project's integrations.

- "Show the versions of the refund prompt and what changed in the latest one."
- "Run the latest version of the refund prompt with the customer message from the last failed refund run, and compare its completion and cost with the active version's."

Tools: `list_prompts`, `get_prompt`, `list_prompt_versions`, `get_prompt_version`, `run_prompt`.

Creating a prompt version and choosing which version is active happen in Studio; the CLI has no prompt commands.

## Permissions and safety

Every tool acts as your AGNT5 account, with your account's access. Read tools can only see the projects you can see. Five tools change something:

- `create_project` registers a new, empty project in a workspace. It adds no code: scaffold one with `agnt5 create --template <template> --local <project-name>`, then run `agnt5 link <project-id>` inside it. Without `--local`, `agnt5 create` registers a second project.
- `start_deployment` starts a stopped or terminated deployment so its workers run again. It needs the developer role or above.
- `run_experiment` starts an experiment run, which runs the experiment's target against every item in its dataset and scores the outputs. The model provider bills any model calls the target makes.
- `cancel_experiment_run` cancels a pending or running experiment run.
- `run_prompt` runs a saved prompt through one of your project's model integrations and returns the completion. It changes no AGNT5 data, but the model provider bills the call.

Each tool declares whether it's read-only, so a client that reads MCP tool annotations can ask for approval only on these five. Set your client to ask before it calls a write tool, and read each proposed call before you approve it. When a tool needs a project or workspace ID, your agent can usually find it with `list_projects`.

## Tools

Every OAuth and API-key caller sees the same tools; your AGNT5 account decides what each call can read or change. Tools in the **Write** column change data or deployments.

| Area | Read | Write |
| --- | --- | --- |
| Account and projects | `whoami`, `list_workspaces`, `list_projects`, `get_project` | `create_project` |
| Runs | `list_runs`, `get_run_summary`, `get_run_events`, `get_run_logs`, `get_run_input_output` | |
| Deployments | `list_environments`, `list_deployments`, `get_deployment`, `get_deployment_events`, `get_deployment_logs`, `get_deployment_metrics`, `list_deployment_components`, `list_workers`, `list_promotion_history` | `start_deployment` |
| Datasets | `list_eval_datasets`, `get_eval_dataset`, `get_dataset_item_payload` | |
| Experiments | `list_experiments`, `get_experiment`, `list_experiment_runs`, `get_experiment_run_summary`, `get_experiment_run_item`, `list_experiment_failures`, `compare_experiment_runs` | `run_experiment`, `cancel_experiment_run` |
| Scores | `list_scores`, `list_run_scorers`, `get_score_evidence`, `get_online_eval_result` | |
| Prompts | `list_prompts`, `get_prompt`, `list_prompt_versions`, `get_prompt_version` | `run_prompt` |

Traces, analytics, other deployment changes such as promoting, rolling back, and scaling, and authoring datasets, experiments, scorers, and prompts stay in Studio and the CLI.

## Give your agent the docs

The MCP server reads your AGNT5 data; it doesn't serve the documentation. For the docs, point your agent at [agnt5.com/llms.txt](https://agnt5.com/llms.txt), which lists every docs page, cookbook, and API reference page. Each page is also available as Markdown at its URL plus `.md`, such as `https://agnt5.com/docs/integrations/tools/mcp.md`, so your agent can fetch only the pages it needs.

Don't point your agent at `/llms-full.txt`. It holds every page in one file of about 840 KB, more than many agents can fit in their context window.

## Troubleshooting

- **The client can't connect:** Use the full URL, `https://mcp.agnt5.com/mcp`, including `/mcp`. Check that your client supports Streamable HTTP; if it only runs local servers, use `mcp-remote` as shown under **Other clients**.
- **Sign-in fails or expires:** Remove the server's saved authorization in your client and sign in again. In Claude Code, run `/mcp` and choose **Authenticate**; in Codex, run `codex mcp login agnt5`.
- **The API key is rejected (`401`):** Check that the header name is exactly `X-API-KEY`, that `AGNT5_PERSONAL_API_KEY` is set in the environment your client starts from, that the key is exactly as Studio showed it, and that it hasn't been revoked. A service key (`agnt5_sk_…`) doesn't work; create a personal API key instead. Send only one credential: don't combine an API key with an OAuth sign-in for the same server.
- **The tools don't appear:** Restart the client or start a new conversation after you sign in. Some clients load tools only at startup.
- **Your agent asks for a tool that isn't listed:** The server offers only the tools in the [Tools](#tools) table. For traces, analytics, promotion, rollback, and authoring, use Studio or the CLI as described under [What your agent can do](#what-your-agent-can-do). If your client lists a tool that isn't in the table, restart it so it reloads the tool list.
- **A tool returns no data:** Check that your account can access the project, and that your agent used the right project or workspace ID. Ask it to call `list_projects` first.
- **A write tool is denied:** Check your AGNT5 role. `start_deployment` needs the developer role or above.

For help or to report a security issue, email [support@agnt5.com](mailto:support@agnt5.com).
