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

# Connect to MCP

> Connect your coding agent to the Judt MCP server with an API key or OAuth.

The Judt MCP server exposes the Judt API as native tools, so your agent can discover and call operations directly without parsing the OpenAPI specification. Use MCP whenever your agent or editor supports the Model Context Protocol.

## Get an API key

Create an API key in the Judt dashboard to authenticate your MCP client:

**1. Open the API keys page**

In the [Judt dashboard](https://judt.ai/apps), go to [API keys](https://judt.ai/api-keys) and click **Create key**.

**2. Set the name and expiration**

Set the following fields:

* **Name**: the client or agent name, such as `Cursor` or `Claude Code`.
* **Expires**: select a short expiration window such as `1 day` or `7 days` (recommended), or a longer window if needed.

Click **Create key** and copy the key (`judt_...`). The dashboard shows the key only once.

**3. Store the key in an environment variable**

If your client reads credentials from your shell environment, export the key without saving it to your shell history:

```bash theme={null}
read -rs JUDT_API_KEY && export JUDT_API_KEY
```

### Recommended: Use an App token

A key from the dashboard reaches all Apps in the organization. Unless your agent needs to create new Apps, use this key to create an App token with `POST /api/tokens`, and give the App token to the agent:

* The agent can read and modify only that App (`GET /api/apps` returns only that App, and requests to any other App return `404 not_found`).
* The agent cannot create new Apps (`403 app_scoped_token`).
* The token expires after the time you set, up to 24 hours. For more details, see [Give an agent access to a single App](https://docs.judt.ai/manage/guides/agent-access.md).

If you're using MCP in an agent your users/customers use, it's recommended to use the create [token API](https://docs.judt.ai/api-reference/tokens/create-an-app-token.md) dynamically to generate a token you embed into the MCP config for the agent. This way the agent does not have access to all Apps -- only the one the user should have access to.

## Configure your MCP client

The Judt MCP server uses the **Streamable HTTP** transport at:

```text theme={null}
https://api.judt.ai/mcp
```

Pass your API key in the `Authorization` header as a bearer token (`Authorization: Bearer JUDT_API_KEY`). Select your client below for the exact configuration:

> [tab] JSON config (Cursor / Claude)
>
> Add the `judt` server to `~/.cursor/mcp.json` (or your client's `mcpServers` JSON configuration):
>
> ```json mcp.json theme={null}
> {
>   "mcpServers": {
>     "judt": {
>       "url": "https://api.judt.ai/mcp",
>       "headers": {
>         "Authorization": "Bearer JUDT_API_KEY"
>       }
>     }
>   }
> }
> ```
>
> Replace `JUDT_API_KEY` with your `judt_...` key. Keep this file in your home directory so you do not commit the key to a repository.

> [tab] VS Code
>
> Add the `judt` server to `.vscode/mcp.json`:
>
> ```json .vscode/mcp.json theme={null}
> {
>   "inputs": [
>     {
>       "type": "promptString",
>       "id": "judt-api-key",
>       "description": "Judt API key",
>       "password": true
>     }
>   ],
>   "servers": {
>     "judt": {
>       "type": "http",
>       "url": "https://api.judt.ai/mcp",
>       "headers": {
>         "Authorization": "Bearer ${input:judt-api-key}"
>       }
>     }
>   }
> }
> ```
>
> VS Code prompts you for the key on first connection and stores it in secret storage.

> [tab] Claude Code
>
> Run this command in your terminal:
>
> ```bash theme={null}
> claude mcp add --transport http judt https://api.judt.ai/mcp \
>   --header "Authorization: Bearer $JUDT_API_KEY"
> ```
>
> Start Claude Code and run `/mcp` to confirm that `judt` is **connected**.

> [tab] Codex
>
> Add these lines to `~/.codex/config.toml`:
>
> ```toml ~/.codex/config.toml theme={null}
> [mcp_servers.judt]
> url = "https://api.judt.ai/mcp"
> bearer_token_env_var = "JUDT_API_KEY"
> ```
>
> Start Codex from a shell where `JUDT_API_KEY` is exported.

> [tab] OAuth (no token)
>
> If your MCP client supports OAuth 2.1 (such as Claude Code, Cursor, VS Code, claude.ai, or ChatGPT) and you want organization-wide access instead of an App-scoped token, add `https://api.judt.ai/mcp` without an `Authorization` header. Your browser opens automatically so you can sign in to Judt and approve access. See [Authentication](https://docs.judt.ai/manage/authentication.md).

## How your agent edits Apps

Your agent writes the code itself. It reads and changes files (`list_files`, `read_file`, `edit_file`, `write_file`, `delete_file`), runs shell commands (`run_command`), tests on the dev server (`create_preview`), commits (`create_commit`), and publishes (`deploy`). For how the code in an App works, see [Build Apps](https://docs.judt.ai/build/introduction.md).

The MCP server has no tools for the in-product Judt agent. To give work to the Judt agent, use the [dashboard](https://judt.ai/apps) or [the API](https://docs.judt.ai/platform-integrations.md#build-a-workflow-around-the-judt-agent).

## Available MCP tools

The server has tools for your account, Apps, files, the sandbox, deployments, Secrets, and logs. For each tool, the API operation that it sends, its annotations, and how authentication and errors work, see the [MCP server reference](https://docs.judt.ai/manage/reference/mcp.md).

> [!NOTE]
>
> No MCP tool takes a Secret value, so a value never goes through your model provider's context window. `request_secrets` gives the user a link to the App's Secrets page in the Judt dashboard, where the user types the values. See [Secrets](https://docs.judt.ai/manage/secrets.md).


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