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

# Set up MCP

[Back to protocols](https://koreai.mintlify.site/agent-platform/channels.md#protocols)

Expose a deployed agent through a project-scoped Model Context Protocol (MCP) endpoint, so an MCP client such as a coding assistant or Copilot can chat with it. Each MCP connection gives the client exactly two tools, `chat.start` and `chat.execute`, bound to the agent in the connection's environment.

The setup requires:

1. [Create the connection in Artemis](#create-the-connection-in-artemis) and copy its resource and metadata URLs.
2. [Choose an authentication method](#choose-an-authentication-method): an API key or CIMD.
3. [Configure the MCP client](#configure-the-mcp-client) with the resource URL and the credential.
4. [Verify the connection](#verify-the-connection) with a complete conversation.

After setup, the client calls `chat.start` to open a session, keeps the returned `sessionId`, and passes it to `chat.execute` to continue the conversation with the agent.

**Important considerations**

* **The direction is inbound**: An MCP connection lets an external client call your agent. To let your agent call tools on an external MCP server, use [MCP tools](https://koreai.mintlify.site/agent-platform/tools/mcp.md) instead.
* **This isn't the Arch MCP server**: Arch MCP gives a coding assistant platform-building tools. An MCP connection gives a client only chat with one deployed agent.
* **The connection fixes the scope**: The connection ID is a lookup key. It doesn't let a client select another tenant, project, environment, or deployment.
* **A visible tool isn't permission**: Artemis checks the caller's permission on every tool call, not when the client lists the tools.
* **Calls have deadlines**: Each chat call must finish within a bounded request time. Long-running or human-approval work needs an asynchronous workflow pattern, not an open MCP request.

## Prerequisites

Confirm these before you start.

* Artemis project access with permission to open **Deployments** > **Channels** and **Deployments** > **API Keys**, and a deployed agent in the environment you intend to bind.
* An MCP client that can connect to a remote MCP server over HTTPS.
* For CIMD authentication, an MCP client that supports Client ID Metadata Documents, and MCP OAuth/OIDC enabled for your workspace by a workspace administrator.

***

## Create the connection in Artemis

Create the connection first. Artemis generates the resource URL when you create it.

1. Open Artemis and select the project.

2. Go to **Deployments** > **Channels** > **MCP**.

3. Select **Create MCP connection**. The **New MCP Connection** dialog opens.

4. Configure the fields:

   | Artemis field | What it controls |
   | - | - |
   | **Display Name** | The label operators see. Name it for the client and environment. |
   | **Environment** | The environment whose active deployment answers the client. Leave the working copy default only while you develop. |
   | **Initial Status** | **Active** accepts calls immediately. **Inactive** keeps the connection saved but disabled until you activate it. |

5. Select **Create**.

6. Open the connection's **Configuration** tab and copy the resource URL and the protected-resource metadata URL.

The URLs follow this pattern:

```text theme={null}
Resource URL:            https://<region-host>/mcp/<connectionId>
Protected-resource URL:  https://<region-host>/.well-known/oauth-protected-resource/mcp/<connectionId>
```

***

## Choose an authentication method

Select the method your MCP client supports.

> [tab] API Key
>
> Use a platform API key when the client can send a fixed request header.
>
> 1. Go to **Deployments** > **API Keys** > **Platform Keys** and create a key.
> 2. Grant the key **Chat Execute** and **MCP Tools** access for this project.
> 3. Store the key in your client's secret store. Don't paste it into prompts, scripts, or tickets.
>
> A project-scoped API key works only for MCP connections in that project. It doesn't give access to the global Arch MCP resource.

> [tab] CIMD
>
> Use Client ID Metadata Documents (CIMD) when the client signs users in with OAuth.
>
> 1. Confirm a workspace administrator has enabled MCP OAuth/OIDC for the workspace.
> 2. Host a client metadata document for your MCP client at an HTTPS URL.
> 3. Set the client's OAuth client ID to that HTTPS URL.
>
> Artemis doesn't support Dynamic Client Registration. The metadata document identifies your OAuth client. Workspace administrators can also create managed OAuth clients.

***

## Configure the MCP client

Point the client at the connection and give it the credential.

1. Add a remote MCP server in your client, and paste the connection's resource URL as the server endpoint.
2. Configure the credential:
   * **API Key**: Set the client to send the key in the `X-API-Key` request header.
   * **CIMD**: Let the client discover sign-in from the protected-resource metadata URL, then complete the OAuth sign-in.
3. List the server's tools. Confirm the list contains only `chat.start` and `chat.execute`. Their descriptions include the project and the entry agent.

***

## Verify the connection

Each check exercises a different part of the MCP path.

1. Call `chat.start` with a test message. Confirm the response contains the agent's reply and a `sessionId`.
2. Call `chat.execute` with the same `sessionId` and a follow-up message. Confirm the agent continues the same conversation.
3. Open **Sessions** in the project. Confirm the conversation appears in the environment you bound.
4. Call a tool with a key that lacks **Chat Execute** or **MCP Tools** access. Confirm Artemis rejects the call.
5. Deactivate the connection and call `chat.execute` again. Confirm Artemis rejects the call.

A successful tool list doesn't prove that calls work. Always complete a `chat.start` and `chat.execute` round trip.

### MCP behavior

Artemis applies these rules to every call.

| Area | Behavior |
| - | - |
| Tools | Exactly two: `chat.start` creates a Runtime session and returns a `sessionId`. `chat.execute` continues the session you pass to it. |
| Session | The client must keep the `sessionId`. Without it, the client can't continue the conversation. |
| Scope | One connection maps to one project and one environment binding. The connection ID can't select another scope. |
| Authorization | Artemis checks the caller's access to the bound project on every call. |
| Request time | Each call has a bounded deadline. Use asynchronous workflows for long-running or approval-based work. |

***

## Security and environment boundaries

The MCP endpoint accepts calls from outside Artemis, so protect it deliberately.

* **API keys**: Grant only **Chat Execute** and **MCP Tools** for the project, store keys in the client's secret store, and rotate a key immediately if someone exposes it.
* **OAuth clients**: Publish client metadata documents only at HTTPS URLs you control.
* **Revocation**: Deactivate the connection to stop all access through it. Delete or rotate the API key to stop a single client.
* **Examples and screenshots**: Use placeholders for hosts, connection IDs, and keys. Don't share real values.
* **Environments**: Use separate connections and API keys for development, staging, and production.

***

## Manage the channel connection

Open a connection from **Deployments** > **Channels** > **MCP** to manage it. Use the **Configuration** tab to copy the resource and metadata URLs, and the connection page to update the display name and environment binding, and to activate or deactivate the connection.

A connection on the working copy changes as you edit the agent. Bind it to a published environment before production.

***

## Troubleshoot connection issues

Most failures trace to the resource URL, the credential, or the connection state.

| Symptom | Likely cause | Recommended action |
| - | - | - |
| The client can't connect | Wrong resource URL | Copy the exact resource URL from the **Configuration** tab, including the connection ID. |
| Calls fail with an authorization error | The API key lacks access, or it belongs to another project | Confirm the key has **Chat Execute** and **MCP Tools** access for this project, and that the client sends it in `X-API-Key`. |
| OAuth sign-in doesn't start | MCP OAuth/OIDC is off, or the client doesn't support CIMD | Ask a workspace administrator to enable MCP OAuth/OIDC, and confirm the client's OAuth client ID is the HTTPS URL of its metadata document. |
| The client tries to register itself and fails | The client expects Dynamic Client Registration | Use CIMD or a managed OAuth client from your workspace administrator. |
| Every call fails after it worked before | The connection is inactive, or its environment has no active deployment | Activate the connection and check its environment binding. |
| Each message starts a new conversation | The client doesn't pass the `sessionId` | Keep the `sessionId` from `chat.start` and pass it to every `chat.execute` call. |
| Long tasks time out | The call exceeds the request deadline | Move long-running or approval-based work into an asynchronous workflow. |

***

**Related articles:**

* [Channels](https://koreai.mintlify.site/agent-platform/channels.md)
* [MCP tools](https://koreai.mintlify.site/agent-platform/tools/mcp.md)
* [Build with Arch using MCP](https://koreai.mintlify.site/agent-platform/use-mcp-server.md)
* [Agent-to-Agent (A2A)](https://koreai.mintlify.site/agent-platform/channels/agent-to-agent)


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