# MCP

> Connect an assistant such as Claude Code or Codex to Werker, to start and follow work by asking.

Source: https://werker.cloud/docs/mcp (updated 2026-12-01)

An assistant that speaks MCP can start and follow work in your Werker,
at `/mcp` on its address. There is nothing to install.

## Connecting

Make a key in **Settings → API keys**
([API keys](users-and-access.md#api-keys)) and keep it in an
environment variable, such as `WERKER_API_KEY`.

Claude Code, in a project's `.mcp.json`:

```json
{
	"mcpServers": {
		"werker": {
			"type": "http",
			"url": "https://werker.example.com/mcp",
			"headers": { "Authorization": "Bearer ${WERKER_API_KEY}" }
		}
	}
}
```

Codex, in `~/.codex/config.toml`:

```toml
[mcp_servers.werker]
url = "https://werker.example.com/mcp"
bearer_token_env_var = "WERKER_API_KEY"
```

## What it can do

The assistant writes a short script instead of calling one tool at a
time.

| Tool    | What it does                                       |
| ------- | -------------------------------------------------- |
| `docs`  | Shows the functions a script can call              |
| `read`  | Runs a script that only reads                      |
| `write` | Runs a script that can start, change and stop work |

- `write` can spend money.

- A key that only reads is not offered `write`. Answering a run needs
  a key that may answer for you.
- What a script did before it failed stays done.
- A script has 30 seconds, so the assistant starts work and looks
  again later.

## What has been tested

On one machine: Claude Code listing runs and starting a saved agent,
and Codex counting runs. Cursor has not been tried. A client that only
signs in with OAuth, such as ChatGPT's connectors, cannot connect yet.
