# Connect a client

> Add vukem-tools mcp to Claude Code, Claude Desktop or Cursor, or reach it over local HTTP.

Source: https://tools.vukem.dev/docs/mcp/connect/

Every client starts the same program: the command `vukem-tools` with the argument `mcp`, and two environment variables. There is no URL to paste and no port to open.

Before you connect, [install the command-line program](/docs/installation#the-command-line-program), start a server, and [create an API key](/docs/api/overview#read-or-create-the-credential). If `vukem-tools` is not on your `PATH`, use its full path as the command in the snippets below.

## Claude Code

```bash
claude mcp add --env VUKEM_TOOLS_URL=http://localhost:3000 \
  --env VUKEM_TOOLS_API_KEY=vk_... \
  --transport stdio vukem-tools -- vukem-tools mcp
```

The `--` separates Claude Code's options from the command. Check it with `claude mcp list`. To share the setup with a project, put the same entry in `.mcp.json`:

```json
{
  "mcpServers": {
    "vukem-tools": {
      "command": "vukem-tools",
      "args": ["mcp"],
      "env": {
        "VUKEM_TOOLS_URL": "http://localhost:3000",
        "VUKEM_TOOLS_API_KEY": "vk_..."
      }
    }
  }
}
```

Do not commit a real key. See the [Claude Code documentation](https://code.claude.com/docs/en/mcp) for scopes and the `${VAR}` form.

## Claude Desktop

Open **Settings**, then **Developer**, then **Edit Config**. The file is `claude_desktop_config.json`:

| System | Path |
| --- | --- |
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
| Linux | `~/.config/Claude/claude_desktop_config.json` |

Add the server, then quit Claude Desktop completely and open it again:

```json
{
  "mcpServers": {
    "vukem-tools": {
      "command": "vukem-tools",
      "args": ["mcp"],
      "env": {
        "VUKEM_TOOLS_URL": "http://localhost:3000",
        "VUKEM_TOOLS_API_KEY": "vk_..."
      }
    }
  }
}
```

On Windows, give the full path of the program in `command` and escape the backslashes, for example `C:\\Tools\\vukem-tools.exe`. See [Connect to local MCP servers](https://modelcontextprotocol.io/docs/develop/connect-local-servers) for the logs and for troubleshooting.

## Cursor

Cursor reads `.cursor/mcp.json` in a project, or `~/.cursor/mcp.json` for every project. The entry has the same shape:

```json
{
  "mcpServers": {
    "vukem-tools": {
      "command": "vukem-tools",
      "args": ["mcp"],
      "env": {
        "VUKEM_TOOLS_URL": "http://localhost:3000",
        "VUKEM_TOOLS_API_KEY": "vk_..."
      }
    }
  }
}
```

See the [Cursor documentation](https://cursor.com/docs/context/mcp).

## Any other client

A client that asks for a command and arguments takes the command `vukem-tools`, the argument `mcp`, and the two variables.

### Local HTTP

A program that cannot spawn a process can use `vukem-tools serve`, which offers the same server over HTTP. It listens on `127.0.0.1:8787` unless you pass `--addr host:port`.

| Route | What it does |
| --- | --- |
| `GET /tools` | The same list as `tools/list`, as `{"tools": [...]}`. |
| `POST /mcp` | One JSON-RPC message in, one out. A notification gets `202`. |

```bash
vukem-tools serve --addr 127.0.0.1:8787
curl -sS http://127.0.0.1:8787/tools
```

It exists to be used from the same machine, and it enforces that. It refuses to listen on any address that is not loopback (`127.0.0.1`, `::1` or `localhost`), answers only requests whose `Host` is loopback, refuses any request with an `Origin` header so a web page cannot use it, and wants `Content-Type: application/json` on `POST /mcp`. It is a different surface from the web app, which listens on port 3000.

## Check the connection

Run the server by hand and ask for the tools. This needs no server and no key, because listing is local:

```bash
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | vukem-tools mcp
```

You should get one line of JSON with 54 tools. To see that the key and the server work too, ask your agent to run a tool on a small file, or call the API with the same variables:

```bash
curl -sS "$VUKEM_TOOLS_URL/api/v1/me" -H "Authorization: Bearer $VUKEM_TOOLS_API_KEY"
```

## When it does not connect

| What you see | What to do |
| --- | --- |
| The client says the command was not found | Use the full path of `vukem-tools` as the command. |
| A call fails with `missing_key` | `VUKEM_TOOLS_API_KEY` is not in the `env` of the entry. |
| A call fails with `unauthorized` | The key is wrong, revoked or expired. Create another. |
| A call fails with `missing_ability` | The key lacks the tool's ability. See [Abilities](/docs/api/overview#abilities). |
| A call fails with `network_error` | No server answers at `VUKEM_TOOLS_URL`. Start it. |

Every error carries a stable code. The full list is in [What a result looks like](/docs/mcp/overview#what-a-result-looks-like).

## Next steps

- [The MCP tools](/docs/mcp/tools): every tool and its arguments.
- [MCP overview](/docs/mcp/overview): the methods, the results and what keeps an agent safe.
