> For the complete documentation index, see [llms.txt](https://chaincontext.gitbook.io/help-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaincontext.gitbook.io/help-center/running/deploying-testing.md).

# Deploying & Testing

## Deploying your MCP server

When you deploy a project, ChainContext:

1. Builds a `ProjectConfig` from your tools, contracts, resources, and prompts
2. Writes the config to the edge cache (Redis)
3. Your MCP server becomes live at `https://{slug}.chaincontext.dev/mcp`

### How to deploy

* **Dashboard:** Project page → click **Deploy**
* **Onboarding:** The wizard includes a deploy step
* **Re-deploy:** Click Deploy again after making changes — updates happen with zero downtime

### Deploy status

| Status    | Meaning                                             |
| --------- | --------------------------------------------------- |
| Draft     | Not yet deployed                                    |
| Deploying | Config is being built (usually 2–5 seconds)         |
| Live      | Server is accessible                                |
| Error     | Deploy failed — check the error message in settings |

{% hint style="warning" %}
Once deployed, your project slug is permanently locked to prevent URL breakage. Choose your slug carefully before first deploy.
{% endhint %}

***

## Test mode vs Live mode

Every project has a mode toggle: **Test** or **Live**.

{% tabs %}
{% tab title="Test mode" %}
Only testnet networks are active: Sepolia, Base Sepolia, Arbitrum Sepolia, etc.

Use this while building and validating your tools — no real funds at risk.
{% endtab %}

{% tab title="Live mode" %}
Only mainnet networks are active: Ethereum, Base, Arbitrum, Polygon, etc.

Switch to Live mode when you're ready for production.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Switch modes in **Project Settings**. Re-deploy after switching for changes to take effect.
{% endhint %}

***

## Test panel

The built-in test panel lets you call your MCP tools directly from the dashboard without needing an AI client.

### Using the test panel

1. Go to your project → **Tools** tab
2. Click **Test** on any tool to open the inspector drawer
3. Fill in the input parameters
4. Click **Run** — the result appears below

{% hint style="success" %}
The test panel calls your MCP server through an internal proxy (`POST /api/tools/:id/test`) that bypasses API key auth for testing convenience. It hits your actual MCP runtime, so results match what an AI client would see.
{% endhint %}

<details>

<summary>What the test panel shows</summary>

* **Request:** the MCP `tools/call` payload sent
* **Response:** the full MCP result (content, isError flag)
* **Timing:** execution duration
* **Errors:** detailed error messages if a block fails

</details>

***

## Access modes

{% tabs %}
{% tab title="Public" %}
Anyone with your MCP endpoint URL can connect. No authentication required.

Good for open-source projects or public data tools.
{% endtab %}

{% tab title="Private" %}
Requires an API key. Generate keys in **Project Settings → API Keys**.

Clients include the key in the request:

```
Authorization: Bearer sk_your_api_key
```

{% hint style="danger" %}
API keys are hashed (SHA-256) before storage — the raw key is shown only once at creation time. Store it securely.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## Custom domains

{% hint style="info" %}
Available on **Builder** and **Studio** plans.
{% endhint %}

Map your own domain to your MCP server:

1. Go to **Project Settings → Custom Domain**
2. Enter your domain (e.g., `mcp.myproject.com`)
3. Add the CNAME record shown in your DNS provider
4. Click **Verify** — ChainContext checks the DNS record
5. Once verified, your server is accessible at both URLs

***

## Transports

ChainContext MCP servers support two transports:

| Transport           | Protocol                          | Best for                                    |
| ------------------- | --------------------------------- | ------------------------------------------- |
| **Streamable HTTP** | `POST /mcp`                       | Claude Desktop, Cursor, most modern clients |
| **SSE**             | `GET /sse` + `POST /sse/messages` | Older clients, browser-based integrations   |

Both are enabled by default. You can disable either in **Project Settings → Protocols**.
