> For the complete documentation index, see [llms.txt](https://archer-bot.gitbook.io/archer.bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archer-bot.gitbook.io/archer.bot/build-with-archer/overview/client-setup.md).

# Client Setup

Connect your AI coding assistant to Archer's MCP server using one of the configurations below.

## Prerequisites

Before setting up any client, make sure you have:

1. **An Archer account**: sign up at [app.archerprotocol.com](https://app.archerprotocol.com)
2. **An API key**: create one in the Developer Portal at `/developer`
3. **Node.js 18+**: required for Claude Code and Claude Desktop (which use the `@archerprotocol/mcp-client` stdio bridge)

### Installing Node.js

If you don't have Node.js installed, follow the steps for your platform:

**macOS:**

```bash
# Option 1: Download the installer from https://nodejs.org (easiest)
# Option 2: Using Homebrew
brew install node
```

**Windows:**

```bash
# Download the installer from https://nodejs.org
# Run the .msi file and follow the prompts
# Make sure "Add to PATH" is checked during installation
```

**Linux:**

```bash
# Ubuntu/Debian
sudo apt update && sudo apt install nodejs npm

# Or use nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 20
```

**Verify your installation:**

```bash
node --version   # Should show v18.0.0 or higher
npx --version    # Should show a version number (npx comes with Node.js)
```

> **What is `npx`?** It's a tool that comes with Node.js. It downloads and runs packages without needing to install them globally. When you see `npx @archerprotocol/mcp-client@latest` in configs below, it means "download and run the latest Archer bridge automatically."

> **Why `@latest`?** Without the version specifier, `npx` caches the resolved version forever and never picks up new releases. The `@latest` suffix forces `npx` to check the npm registry on every invocation, so bug fixes and new features land as soon as you reconnect Claude Code's MCP server. See [Updating the Bridge](#updating-the-bridge) below for the manual upgrade flow.

***

## Connection Details

| Setting            | Value                                                            |
| ------------------ | ---------------------------------------------------------------- |
| **MCP URL**        | `https://api.archerprotocol.com/mcp`                             |
| **Transport**      | Streamable HTTP (modern) or SSE (legacy)                         |
| **Authentication** | API key via `x-api-key` header or `Authorization: Bearer` header |

> **Note:** Claude Code and Claude Desktop require the `@archerprotocol/mcp-client` npm package (stdio bridge) instead of direct HTTP. See their sections below. All other clients (Cursor, VS Code, Windsurf, etc.) connect directly via HTTP, no package install needed.

***

## Installing the Bridge Package (Optional)

Claude Code and Claude Desktop use `npx` to auto-download the bridge, so no install is needed. But if you prefer to install it explicitly:

```bash
# Install globally with npm
npm install -g @archerprotocol/mcp-client

# Or with yarn
yarn global add @archerprotocol/mcp-client
```

After global install, you can replace `"command": "npx"` with `"command": "archer-mcp"` and remove the `"args"` field in the configs below.

### Environment Variables

| Variable         | Required | Description                                                                 |
| ---------------- | :------: | --------------------------------------------------------------------------- |
| `ARCHER_API_KEY` |    Yes   | Your Archer API key (starts with `arch-`)                                   |
| `ARCHER_MCP_URL` |    No    | Override the MCP server URL (default: `https://api.archerprotocol.com/mcp`) |

***

## Updating the Bridge

`npx` aggressively caches resolved packages in `~/.npm/_npx/`. Once a version of `@archerprotocol/mcp-client` is cached, subsequent invocations reuse it indefinitely, even if a newer version is published to npm.

If your config uses `@archerprotocol/mcp-client@latest` (recommended in all examples below), `npx` checks the registry on each invocation and downloads any new version automatically the next time you reconnect.

If your config uses the bare `@archerprotocol/mcp-client` (no version specifier), or you want to force an update right now, clear the cache and reconnect:

**macOS / Linux:**

```bash
rm -rf ~/.npm/_npx
```

**Windows (PowerShell):**

```powershell
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx"
```

Then in your client (Claude Code: run `/mcp` and reconnect; Claude Desktop: quit and relaunch the app), the next invocation will fetch the latest bridge release.

> **Tip:** The bridge logs its version on startup to stderr. In Claude Code you can see it via `/mcp` connection logs. If you suspect you're on an older bridge, check the version against the [latest release on npm](https://www.npmjs.com/package/@archerprotocol/mcp-client).

***

## Claude Code

Claude Code requires a stdio bridge to properly authenticate with remote MCP servers.

Add to your project's `.mcp.json` (recommended) or `~/.claude.json` (global):

```json
{
  "mcpServers": {
    "archer": {
      "command": "npx",
      "args": ["@archerprotocol/mcp-client@latest"],
      "env": {
        "ARCHER_API_KEY": "arch-your_api_key_here"
      }
    }
  }
}
```

The `@archerprotocol/mcp-client` package runs locally, connects to Archer's remote server with your API key, and exposes all tools to Claude Code via stdio.

### Example Session

```
$ claude

> What's the price of ETH right now?
The current price of ETH is $2,142.50 USD.

> Check my balances on Arbitrum
Your Arbitrum balances:
- 0.045 ETH ($96.41)
- 152.30 USDC ($152.30)

> Swap 50 USDC to ETH on Arbitrum
I've prepared a swap of 50 USDC to ETH on Arbitrum.

A transaction approval has been created in your Archer webapp.
Please open app.archerprotocol.com to review and sign the transaction.

> What was the result?
The swap was approved and executed successfully!
Transaction: 0x7a3f...8b2c (Arbiscan link)
You received 0.0233 ETH for 50 USDC.
```

***

## Claude Desktop

Claude Desktop also uses the stdio bridge. Edit the config file:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "archer": {
      "command": "npx",
      "args": ["@archerprotocol/mcp-client@latest"],
      "env": {
        "ARCHER_API_KEY": "arch-your_api_key_here"
      }
    }
  }
}
```

***

## Cursor

Cursor connects directly to Archer's remote MCP server via HTTP.

### Via Settings UI

1. Open Cursor Settings
2. Navigate to the MCP section
3. Add a new server with:
   * **Name:** `archer-protocol`
   * **Transport:** SSE
   * **URL:** `https://api.archerprotocol.com/mcp`
   * **Headers:** `x-api-key: arch-your_api_key_here`

### Via Project Config

Create `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "archer-protocol": {
      "type": "sse",
      "url": "https://api.archerprotocol.com/mcp",
      "headers": {
        "x-api-key": "arch-your_api_key_here"
      }
    }
  }
}
```

***

## VS Code / GitHub Copilot

VS Code supports MCP servers at workspace and user scope.

### Workspace Config

Create `.vscode/mcp.json` in your workspace:

```json
{
  "servers": {
    "archer-protocol": {
      "type": "sse",
      "url": "https://api.archerprotocol.com/mcp",
      "headers": {
        "x-api-key": "arch-your_api_key_here"
      }
    }
  }
}
```

### Via Command Palette

1. Open Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`)
2. Run **"MCP: Add Server"**
3. Select **SSE** transport
4. Enter the URL and API key when prompted

***

## GitHub Copilot CLI

Use the interactive flow:

```bash
gh copilot mcp add
```

Or edit the config file directly following GitHub's MCP configuration format with the same connection details above.

***

## OpenClaw

OpenClaw supports MCP servers via its config system. You can connect directly over HTTP (no bridge needed).

### Via CLI

```bash
openclaw mcp set archer '{"url":"https://api.archerprotocol.com/mcp","headers":{"x-api-key":"arch-your_api_key_here"}}'
```

Verify it was added:

```bash
openclaw mcp list
openclaw mcp show archer
```

### Via Config File

Add to your OpenClaw configuration under `mcp.servers`:

```json
{
  "mcp": {
    "servers": {
      "archer": {
        "url": "https://api.archerprotocol.com/mcp",
        "headers": {
          "x-api-key": "arch-your_api_key_here"
        }
      }
    }
  }
}
```

### Using the Stdio Bridge (Alternative)

If you prefer to use the stdio bridge instead of a direct connection:

```bash
openclaw mcp set archer '{"command":"npx","args":["@archerprotocol/mcp-client@latest"],"env":{"ARCHER_API_KEY":"arch-your_api_key_here"}}'
```

> **Note:** Direct HTTP connection is recommended for OpenClaw since it supports remote MCP servers natively.

***

## Windsurf

Configure MCP in Windsurf/Cascade settings:

1. Open Windsurf Settings
2. Navigate to **Cascade MCP Integration**
3. Add a new MCP server, or manually edit `mcp_config.json`:

```json
{
  "archer-protocol": {
    "type": "sse",
    "url": "https://api.archerprotocol.com/mcp",
    "headers": {
      "x-api-key": "arch-your_api_key_here"
    }
  }
}
```

Note: Windsurf enforces a 100-tool limit across all enabled MCP servers.

***

## Cline

Add via Cline's server configuration flow:

1. Open Cline chat
2. Use the **"Adding & Configuring Servers"** workflow
3. Provide:
   * **Server URL:** `https://api.archerprotocol.com/mcp`
   * **Transport:** SSE
   * **API Key:** Your Archer API key

***

## Continue

Continue uses workspace-level YAML config. Create `.continue/mcpServers/archer.yaml`:

```yaml
name: archer-protocol
type: sse
url: https://api.archerprotocol.com/mcp
headers:
  x-api-key: arch-your_api_key_here
```

Continue can also import JSON MCP configs from Claude Desktop, Cursor, and Cline formats.

***

## Goose

Use the interactive extension flow:

```bash
goose configure extension
```

When prompted:

* **Command/URL:** `https://api.archerprotocol.com/mcp`
* **Transport:** SSE
* **Description:** Archer Protocol Web3 tools

***

## Generic MCP Client

Any MCP-compatible client can connect using the standard HTTP transport:

```json
{
  "type": "sse",
  "url": "https://api.archerprotocol.com/mcp",
  "headers": {
    "x-api-key": "arch-your_api_key_here"
  }
}
```

If your client supports Streamable HTTP (the newer MCP transport), you can use:

```json
{
  "type": "http",
  "url": "https://api.archerprotocol.com/mcp",
  "headers": {
    "x-api-key": "arch-your_api_key_here"
  }
}
```

Both transports are supported by Archer's MCP server. Streamable HTTP is preferred when available.

## Troubleshooting

### "npx: command not found"

You need to install Node.js. See the [Prerequisites](#prerequisites) section above.

### "ARCHER\_API\_KEY environment variable is required"

Your API key isn't being passed to the bridge. Make sure:

* The `"env"` block is inside the `"archer"` server config (not outside it)
* The key starts with `arch-`
* There are no extra spaces or quotes around the key value

### "Failed to connect" or timeout errors

* Check your internet connection
* Verify your API key is valid and not revoked in the Developer Portal
* If you're behind a corporate proxy, you may need to set `HTTP_PROXY` / `HTTPS_PROXY` environment variables

### Tools aren't showing up in my AI assistant

* Restart your AI assistant after adding the config
* For Claude Code: run `/mcp` to see connected servers and their status
* For Cursor: check the MCP section in Settings for connection status

## Security Notes

* Never commit API keys to version control. Use environment variables or secrets managers.
* API keys are scoped: create keys with only the permissions you need.
* Transaction operations always require human approval in the webapp.
* You can revoke API keys at any time from the Developer Portal.
