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

# Connect a Client

> Point Claude, Cursor, ChatGPT, or another MCP client at EKB

## Prerequisites

* MCP client that accepts an HTTP MCP URL (Claude, Cursor, ChatGPT, Claude Code, custom clients, and similar)
* Browser available for the first OAuth consent (unless you use API keys)
* Project id if you want to pin Runtime to one project

Exact hostnames depend on your deployment. Production-style examples below use `https://mcp.getodin.ai`. On-premises or private deployments use your environment’s MCP host instead.

## Add EKB to your MCP client

Most clients only need the URL and will run OAuth themselves.

```json theme={null}
{
  "mcpServers": {
    "ekb-builder": { "url": "https://mcp.getodin.ai/builder/mcp" },
    "ekb": { "url": "https://mcp.getodin.ai/runtime/mcp" }
  }
}
```

Use only the endpoint(s) you need. Many teams start with **Runtime** alone so day-to-day assistants cannot change configuration.

| Endpoint        | Server      | Purpose                                                      |
| --------------- | ----------- | ------------------------------------------------------------ |
| `…/builder/mcp` | EKB Builder | Create and change agents, workflows, tables, interfaces, KBs |
| `…/runtime/mcp` | EKB Runtime | Ask agents, run published tools, search KB, query tables     |

See [Builder](/ekb-as-mcp/builder) and [Runtime](/ekb-as-mcp/runtime) for tool surfaces.

### Client tips

| Client pattern                               | Tip                                                        |
| -------------------------------------------- | ---------------------------------------------------------- |
| Cursor / Claude Code style `mcpServers` JSON | Paste the URL block above into the client’s MCP config     |
| Clients with separate “remote MCP” UI        | Paste the full `…/builder/mcp` or `…/runtime/mcp` URL      |
| Clients that support custom headers          | Add `x-project-id` for Runtime; add API key headers for CI |

## Sign in when prompted

On first use, the client receives an authorization challenge and opens a browser consent flow:

1. Sign in to EKB if needed
2. Review the client name and the permission (**Build in your workspace** or **Use your agents and tools**)
3. Approve or deny

After consent, the client calls EKB **as you**. It can only do what your user account can do in that project — normal EKB permissions still apply.

Consent links expire or become single-use. If you see an expired-request message, start the connection again from the MCP client.

Details: [Authentication](/ekb-as-mcp/authentication).

## Pin a project (Runtime)

If your client supports custom headers, send:

```text theme={null}
x-project-id: <your-project-id>
```

| Mode                    | Behavior                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| **With `x-project-id`** | Tools are scoped to that project; names stay shorter (for example `ask_support_bot`)                          |
| **Without pin**         | Runtime may aggregate across projects you can access; agent/tool names may be qualified with the project name |

Builder does not pin by header — the model passes the project id on each create/update call (`target_project_id` or `project_id`, per tool schema). Use Runtime’s `list_odin_projects` (or a known id) when you need to discover project ids.

## Headless access (CI and automation)

Interactive OAuth needs a browser. For CI, evals, or scripts, pass a **user-level** API key and secret as headers:

```json theme={null}
{
  "mcpServers": {
    "ekb": {
      "url": "https://mcp.getodin.ai/runtime/mcp",
      "headers": {
        "X-API-KEY": "...",
        "X-API-SECRET": "...",
        "x-project-id": "optional-project-id"
      }
    }
  }
}
```

Prefer a **user-level** key over a project-scoped key so listing projects and multi-project Runtime still work. See [Authentication](/ekb-as-mcp/authentication).

## Troubleshooting

| Symptom                                              | What to check                                                                           |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Consent page says the request expired                | Restart the connection from the client; pending requests are short-lived                |
| Client connected but tools are empty / wrong project | Confirm Runtime URL vs Builder URL; set `x-project-id` if you intended a single project |
| `run_*` tool missing                                 | Publish the workflow / custom tool in EKB first — drafts are not exposed                |
| `ask_*` missing for an agent                         | Confirm you can reach that agent in the product with the same account                   |
| Builder creates in the wrong project                 | Ensure the model passes `target_project_id` / `project_id` on write tools               |
| API key works for one project only                   | Switch to a user-level key if you need `list_odin_projects` across projects             |
