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

# Installation

> Configure the Coval MCP server for your AI assistant

## Config File Locations

<Tabs>
  <Tab title="macOS">
    **Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json`

    **Cursor:** `.cursor/mcp.json` in your project root

    **Claude Code:** `~/.claude/settings.json` or `.mcp.json` in your project root
  </Tab>

  <Tab title="Windows">
    **Claude Desktop:** `%APPDATA%\Claude\claude_desktop_config.json`

    **Cursor:** `.cursor\mcp.json` in your project root

    **Claude Code:** `%USERPROFILE%\.claude\settings.json` or `.mcp.json` in your project root
  </Tab>

  <Tab title="Linux">
    **Claude Desktop:** `~/.config/Claude/claude_desktop_config.json`

    **Cursor:** `.cursor/mcp.json` in your project root

    **Claude Code:** `~/.claude/settings.json` or `.mcp.json` in your project root
  </Tab>
</Tabs>

## Hosted Server (Recommended)

Connects to Coval's managed MCP endpoint via `mcp-remote`. No local server to maintain — always up to date.

<Tabs>
  <Tab title="Claude Desktop">
    Add to your Claude Desktop config file:

    ```json theme={null}
    {
      "mcpServers": {
        "coval": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.coval.dev/mcp",
            "--header",
            "X-API-Key: ${COVAL_API_KEY}"
          ],
          "env": {
            "COVAL_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json` in your project:

    ```json theme={null}
    {
      "mcpServers": {
        "coval": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.coval.dev/mcp",
            "--header",
            "X-API-Key: ${COVAL_API_KEY}"
          ],
          "env": {
            "COVAL_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code">
    Run in your terminal:

    ```bash theme={null}
    claude mcp add coval -- npx -y mcp-remote https://mcp.coval.dev/mcp --header "X-API-Key: YOUR_API_KEY_HERE"
    ```

    Or add to your `.mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "coval": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.coval.dev/mcp",
            "--header",
            "X-API-Key: ${COVAL_API_KEY}"
          ],
          "env": {
            "COVAL_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

<Warning>
  Restart your MCP client after modifying the config file. For Claude Desktop, fully quit from the menu bar — don't just close the window.
</Warning>

## Local Server (NPX)

Runs the Coval MCP server locally on your machine via npm. Useful if you need a custom API endpoint or want to develop against the server.

```bash theme={null}
npx @covalai/mcp-server
```

<Tabs>
  <Tab title="Claude Desktop">
    ```json theme={null}
    {
      "mcpServers": {
        "coval": {
          "command": "npx",
          "args": ["-y", "@covalai/mcp-server"],
          "env": {
            "COVAL_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json` in your project:

    ```json theme={null}
    {
      "mcpServers": {
        "coval": {
          "command": "npx",
          "args": ["-y", "@covalai/mcp-server"],
          "env": {
            "COVAL_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Environment Variables

| Variable             | Required | Default                    | Description                                                         |
| -------------------- | -------- | -------------------------- | ------------------------------------------------------------------- |
| `COVAL_API_KEY`      | **Yes**  | -                          | Your API key from [dashboard](https://app.coval.dev/settings)       |
| `COVAL_API_BASE_URL` | No       | `https://api.coval.dev/v1` | Custom API endpoint (local server only)                             |
| `LOG_LEVEL`          | No       | `info`                     | Logging level: `debug`, `info`, `warn`, `error` (local server only) |

## Local Development

Clone and run from source:

```bash theme={null}
git clone https://github.com/coval-ai/mcp-server
cd coval-mcp-server
npm install
npm run build

# Set your API key
export COVAL_API_KEY=your_api_key_here

# Run the server
npm start
```

### Testing with MCP Inspector

```bash theme={null}
npm run inspector
```

This launches a web UI for testing tool calls interactively.
