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

# Configure your MCP client

> Connect a Streamable HTTP MCP client through Bily sign-in or a store-scoped fallback key.

Use these values to connect a compatible client. Prefer Bily Connect so you do not place a long-lived key in client configuration.

## Copy the connection values

| Setting                    | Value                                |
| -------------------------- | ------------------------------------ |
| Server name                | `bily`                               |
| URL                        | `https://api-dispatcher.bily.ai/mcp` |
| OAuth resource             | `https://api-dispatcher.bily.ai/mcp` |
| Transport                  | Streamable HTTP with JSON responses  |
| OAuth scope                | `mcp_access`                         |
| Recommended approval mode  | Prompt before tool calls             |
| Recommended client timeout | 120 seconds                          |

## Connect Codex

Open **Settings > MCP** in Bily and use the no-key configuration:

```toml theme={null}
[mcp_servers.bily]
url = "https://api-dispatcher.bily.ai/mcp"
default_tools_approval_mode = "prompt"
tool_timeout_sec = 120
```

Codex discovers Bily Connect from the endpoint. It opens the sign-in flow when needed.

## Connect another OAuth-capable client

Set up a remote Streamable HTTP MCP server with this URL:

```text theme={null}
https://api-dispatcher.bily.ai/mcp
```

The client must support dynamic public-client registration. It must also support Authorization Code with PKCE using `S256`, the `mcp_access` scope, and refresh tokens.

Bily publishes discovery metadata at:

* `https://api-dispatcher.bily.ai/.well-known/oauth-authorization-server`
* `https://api-dispatcher.bily.ai/.well-known/openid-configuration`
* `https://api-dispatcher.bily.ai/.well-known/oauth-protected-resource`
* `https://api-dispatcher.bily.ai/.well-known/oauth-protected-resource/mcp`

Compatible clients should read these values from the unauthenticated challenge. Do not hard-code the authorization or token URLs.

## Use a fallback key when sign-in is unavailable

Use an access key only when the client cannot complete Bily Connect. Select the intended store, then create the key in **Settings > MCP**. Copy the one-time JSON configuration Bily shows you.

A typical client configuration looks like this:

```json theme={null}
{
  "mcpServers": {
    "bily": {
      "url": "https://api-dispatcher.bily.ai/mcp",
      "headers": {
        "x-api-key": "<key shown once by Bily>"
      }
    }
  }
}
```

Keep the full key only in the client's secret-aware configuration. Never commit it, add it to browser code, or include it in a prompt.

## Avoid common configuration mistakes

* Do not use `https://app.bily.ai/mcp`; it is not the MCP endpoint.
* Do not send both Bily Connect credentials and an access key.
* Do not configure separate tools for every operation. The server exposes only `search` and `execute`.
* Do not use `llms.txt` or `llms-full.txt` as an MCP URL. They contain documentation only.
