# LayerHop MCP server

> Enables AI agents to fetch cross-chain swap quotes, list tokens, and generate prefilled swap links across 70 EVM and Solana chains.

- Repository: https://github.com/layerhop/layerhop-js
- Page: https://hostedmcp.org/servers/layerhop/mcp
- Transport: stdio, remote
- Stars: 0
- License: MIT
- Latest version: 0.5.0

## Install

### Claude Code

```sh
claude mcp add --env 'LAYERHOP_API_KEY=<YOUR_LAYERHOP_API_KEY>' mcp -- npx -y @layerhop/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@layerhop/mcp"
      ],
      "env": {
        "LAYERHOP_API_KEY": "<YOUR_LAYERHOP_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@layerhop/mcp"
      ],
      "env": {
        "LAYERHOP_API_KEY": "<YOUR_LAYERHOP_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@layerhop/mcp"],"env":{"LAYERHOP_API_KEY":"<YOUR_LAYERHOP_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@layerhop/mcp"
      ],
      "env": {
        "LAYERHOP_API_KEY": "<YOUR_LAYERHOP_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'LAYERHOP_API_KEY=<YOUR_LAYERHOP_API_KEY>' -- npx -y @layerhop/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "@layerhop/mcp"]

[mcp_servers.mcp.env]
LAYERHOP_API_KEY = "<YOUR_LAYERHOP_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'LAYERHOP_API_KEY=<YOUR_LAYERHOP_API_KEY>' mcp npx -- -y @layerhop/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@layerhop/mcp"
      ],
      "env": {
        "LAYERHOP_API_KEY": "<YOUR_LAYERHOP_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `LAYERHOP_API_KEY` | no | yes | Optional LayerHop API key from dashboard.layerhop.com, for higher rate limits |
| `LAYERHOP_INTEGRATOR` | no | no | Optional partner ID, so swaps made through your agent earn your partner fee |

## FAQ

### Does this server handle my private keys?

No, the server is non-custodial and does not hold keys or sign transactions.
