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

# Install and configure MCP server

Agent Platform exposes its features through a Model Context Protocol (MCP) server. Your AI assistant can connect to the platform and perform platform operations to let you build, evaluate, optimize, debug, and analyze agents. Use MCP server, to perform these tasks from within your IDE, command-line, or terminal, without context-switching.

To use the MCP server, you install `@koreai/arch-mcp-tools` and configure your AI assistant.

## Prerequisites

* **Node.js 18 or later** — We recommend LTS version. The server starts using `npx` command.
* Acess to [Agent Platform account](/agent-platform/getting-started#region-specific-urls-and-allowlist-of-ips). When you connect for the first time, you must [authenticate](#authenticate).
* MCP-compatible client.

## Install and configure

The server (`@koreai/arch-mcp-tools`) is a standard stdio MCP server. The clients launch it using the command: `npx -y @koreai/arch-mcp-tools`. In your client's config, you add it as a server named: `arch-agent-platform`.

Provide the environment URL in one of the following ways:

* In the configuration file, add as value of `AGENTS_URL` parameter in the `env`. For environment, see the list of [region-specific platform URLs](/agent-platform/getting-started#region-specific-urls-and-allowlist-of-ips) or ask your platform administrator.

* Pass `serverUrl` to `platform_connect`.

* On the first use, the tool asks you for the environment.

<AccordionGroup>
  <Accordion title="Claude Code">
    ```bash theme={null}
    claude mcp add arch-agent-platform -- npx -y @koreai/arch-mcp-tools
    ```

    Or add it to `.mcp.json` (project) or `~/.claude.json` (global):

    ```json theme={null}
    {
      "mcpServers": 
        {
          "arch-agent-platform": 
            {
              "command": "npx",
              "args": ["-y", "@koreai/arch-mcp-tools"]
            },
          "env": 
            {
              "AGENTS_URL": "https://example.com"
            }
        }
    }
    ```
  </Accordion>

  <Accordion title="Codex CLI">
    ```bash theme={null}
    codex mcp add arch-agent-platform -- npx -y @koreai/arch-mcp-tools --env AGENTS_URL="https://example.com"
    ```

    Or add to TOML file named `~/.codex/config.toml`.

    ```toml theme={null}
    [mcp_servers.arch-agent-platform]
    command = "npx"
    args = ["-y", "@koreai/arch-mcp-tools"]
    [mcp_servers.arch-agent-platform.env]
    AGENTS_URL = "https://example.com"
    ```
  </Accordion>

  <Accordion title="Cursor">
    Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

    ```json theme={null}
    {
      "mcpServers": 
      {
        "arch-agent-platform":
          {
            "command": "npx",
            "args": ["-y", "@koreai/arch-mcp-tools"]
          },
        "env": 
          {
            "AGENTS_URL": "https://example.com"
          }
      }
    }
    ```
  </Accordion>

  <Accordion title="VS Code (GitHub Copilot)">
    Add to `.vscode/mcp.json`. Note that the top-level key is `servers`, not `mcpServers`:

    ```json theme={null}
    {
      "servers": 
      {
        "arch-agent-platform": 
          {
            "command": "npx",
            "args": [ "-y", "@koreai/arch-mcp-tools" ]
          }
        "env":
          {
            "AGENTS_URL": "https://example.com"
          }
      }
    }
    ```
  </Accordion>

  <Accordion title="Any other MCP client">
    Configure a stdio server with command `npx` and args `["-y", "@koreai/arch-mcp-tools"]`. Optionally, set an `AGENTS_URL` variable to pin an environment. Alternatively, use a version of the following prompt in your AI coding tool's chat for it to do the configuration.

    ```text theme={null}
    Add an MCP server named `arch-agent-platform` that runs `npx -y @koreai/arch-mcp-tools`, and put it in this project's MCP config.
    Config location by tool — Claude Code: `.mcp.json` (`mcpServers`) · Cursor: `.cursor/mcp.json` (`mcpServers`) · VS Code: `.vscode/mcp.json` (`servers`) · Codex: `~/.codex/config.toml` (`[mcp_servers.arch-agent-platform]`).
    Optionally set `AGENTS_URL` to my environment.
    ```
  </Accordion>
</AccordionGroup>

## Authenticate

Authentication is automatic when you call `platform_connect` — it tries the following methods in the order:

1. **Explicit token** — pass an `authToken` parameter.
2. **Stored credentials** — reads the same encrypted credential store used by `kore-platform-cli login`.
3. **Device authorization** — opens your browser and polls until approval completes in the same `platform_connect` call.

Credentials are stored securely and reused in future sessions.
