
# Coding agents and IDEs

Every client here speaks Streamable HTTP, so each one connects straight to the URL. Most sign in
with OAuth on first use; the key alternative is for headless runs and CI. Keep a key in an
environment variable, never in a file you commit.

The check is the same everywhere: ask "What's my Weir usage?" The agent should call `get_usage`,
which is free.

## Claude Code

```bash
claude mcp add --transport http weir https://api.weirapp.io/mcp
```

Then run `/mcp` inside Claude Code and choose Weir to sign in. A browser opens; approve the
connection.

**With a key**, for CI, `claude -p`, and anything without a browser:

```bash
claude mcp add --transport http weir https://api.weirapp.io/mcp --header "Authorization: Bearer $WEIR_API_KEY"
```

Your shell expands `$WEIR_API_KEY` before Claude Code sees it, so the key itself is saved in Claude
Code's settings. To keep it out of every file, use a project `.mcp.json` instead. Claude Code
expands `${WEIR_API_KEY}` when it connects:

```json
{
  "mcpServers": {
    "weir": {
      "type": "http",
      "url": "https://api.weirapp.io/mcp",
      "headers": {
        "Authorization": "Bearer ${WEIR_API_KEY}"
      }
    }
  }
}
```

The Claude Agent SDK cannot open a browser either, so it takes the same header. Pass these options
to `query()`:

```ts
const options = {
  mcpServers: {
    weir: {
      type: "http",
      url: "https://api.weirapp.io/mcp",
      headers: { Authorization: `Bearer ${process.env.WEIR_API_KEY}` },
    },
  },
  allowedTools: ["mcp__weir__*"],
};
```

**Check:** `claude mcp list` shows `weir` as connected. Then ask "What's my Weir usage?"

[Claude Code MCP docs](https://code.claude.com/docs/en/mcp)

## Codex

One config serves the Codex CLI, the IDE extension, and the ChatGPT desktop app. In
`~/.codex/config.toml`:

```toml
[mcp_servers.weir]
url = "https://api.weirapp.io/mcp"
```

Then sign in once:

```bash
codex mcp login weir
```

**With a key**, name the environment variable that holds it instead:

```toml
[mcp_servers.weir]
url = "https://api.weirapp.io/mcp"
bearer_token_env_var = "WEIR_API_KEY"
```

**Check:** `codex mcp list` shows `weir`. Then ask "What's my Weir usage?"

[Codex MCP docs](https://learn.chatgpt.com/docs/extend/mcp)

## Cursor

In `~/.cursor/mcp.json`, or `.cursor/mcp.json` for one project:

```json
{
  "mcpServers": {
    "weir": {
      "url": "https://api.weirapp.io/mcp"
    }
  }
}
```

Or [add it to Cursor](https://cursor.com/en/install-mcp?name=weir&config=eyJ1cmwiOiJodHRwczovL2FwaS53ZWlyYXBwLmlvL21jcCJ9)
in one click. Cursor asks you to sign in the first time it connects.

Cursor uses OAuth with Weir. It ignores an `Authorization` header in this file while the server
offers sign-in, so a key here does nothing.

**Check:** the server shows as connected in Cursor's MCP settings. Then ask "What's my Weir usage?"

[Cursor MCP docs](https://cursor.com/docs/mcp)

## VS Code

GitHub Copilot in VS Code. In `.vscode/mcp.json`, or your user `mcp.json`. The top-level key is
`servers`, and the transport has to be stated:

```json
{
  "servers": {
    "weir": {
      "type": "http",
      "url": "https://api.weirapp.io/mcp"
    }
  }
}
```

Or from a terminal:

```bash
code --add-mcp '{"name":"weir","type":"http","url":"https://api.weirapp.io/mcp"}'
```

Start the server and sign in when VS Code asks.

**With a key**, let VS Code prompt for it so it never sits in the file:

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "weir-api-key",
      "description": "Weir API key",
      "password": true
    }
  ],
  "servers": {
    "weir": {
      "type": "http",
      "url": "https://api.weirapp.io/mcp",
      "headers": {
        "Authorization": "Bearer ${input:weir-api-key}"
      }
    }
  }
}
```

**Check:** ask Copilot in agent mode "What's my Weir usage?"

[VS Code MCP configuration](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)

## Devin Desktop

Windsurf is now Devin Desktop, and its MCP config moved. In `~/.config/devin/mcp_config.json`, or
`%APPDATA%\devin\mcp_config.json` on Windows:

```json
{
  "mcpServers": {
    "weir": {
      "serverUrl": "https://api.weirapp.io/mcp"
    }
  }
}
```

Devin Desktop signs in on first use. **With a key**, add a header that reads the environment:

```json
{
  "mcpServers": {
    "weir": {
      "serverUrl": "https://api.weirapp.io/mcp",
      "headers": {
        "Authorization": "Bearer ${env:WEIR_API_KEY}"
      }
    }
  }
}
```

Cascade allows 100 tools in total across all servers.

**Check:** ask Cascade "What's my Weir usage?"

[Devin Desktop MCP docs](https://docs.devin.ai/desktop/cascade/mcp)

## Gemini CLI

```bash
gemini mcp add --transport http -s user weir https://api.weirapp.io/mcp
```

Gemini CLI signs in when the server first asks for it. Run `/mcp auth weir` to sign in again.

**With a key:**

```bash
gemini mcp add --transport http -s user --header "Authorization: Bearer $WEIR_API_KEY" weir https://api.weirapp.io/mcp
```

Gemini CLI names the tools `mcp_weir_<tool>`.

**Check:** ask "What's my Weir usage?"

[Gemini CLI MCP docs](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)

## Zed

In Zed's `settings.json`:

```json
{
  "context_servers": {
    "weir": {
      "url": "https://api.weirapp.io/mcp"
    }
  }
}
```

Zed signs in with OAuth. To use a key instead, add
`"headers": { "Authorization": "Bearer weir_live_..." }` to the entry. Zed then skips sign-in, and
the key sits in the file as written.

**Check:** ask the agent panel "What's my Weir usage?"

[Zed MCP docs](https://zed.dev/docs/ai/mcp)

## Cline

In Cline's MCP settings file, `cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "weir": {
      "type": "streamableHttp",
      "url": "https://api.weirapp.io/mcp"
    }
  }
}
```

The `type` line matters. Without it Cline uses the older SSE transport and cannot connect. Cline
signs in on first use.

**With a key**, from the Cline CLI:

```bash
cline mcp add weir https://api.weirapp.io/mcp --transport http --header "Authorization: Bearer $WEIR_API_KEY" --yes
```

**Check:** ask "What's my Weir usage?"

[Cline MCP docs](https://docs.cline.bot/mcp/mcp-overview)

## Goose

In `~/.config/goose/config.yaml`:

```yaml
extensions:
  weir:
    name: Weir
    type: streamable_http
    uri: https://api.weirapp.io/mcp
    enabled: true
    timeout: 300
```

Or [add it to Goose](goose://extension?url=https%3A%2F%2Fapi.weirapp.io%2Fmcp&type=streamable_http&id=weir&name=Weir&description=Public+Reddit+and+X+data&timeout=300)
in one click. Goose signs in on first use.

**With a key**, add a header and let Goose read the variable:

```yaml
extensions:
  weir:
    name: Weir
    type: streamable_http
    uri: https://api.weirapp.io/mcp
    headers:
      Authorization: "Bearer ${WEIR_API_KEY}"
    env_keys: [WEIR_API_KEY]
    enabled: true
    timeout: 300
```

**Check:** ask "What's my Weir usage?"

[Goose](https://github.com/aaif-goose/goose)

## Continue

Continue's IDE extensions sign in with OAuth only over SSE, so with Weir they use a key. In
`config.yaml`:

```yaml
mcpServers:
  - name: Weir
    type: streamable-http
    url: https://api.weirapp.io/mcp
    apiKey: ${{ secrets.WEIR_API_KEY }}
```

Continue sends `apiKey` as `Authorization: Bearer <key>`. It reads secrets from its `.env` files,
not from your shell, so put `WEIR_API_KEY` there.

**Check:** ask "What's my Weir usage?"

[Continue](https://github.com/continuedev/continue)

## Anything else

A client that can only start local stdio servers can reach Weir through
[`mcp-remote`](https://www.npmjs.com/package/mcp-remote), a third-party bridge that runs the sign-in
itself:

```json
{
  "mcpServers": {
    "weir": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.weirapp.io/mcp"]
    }
  }
}
```

Every client above connects directly, so none of them needs it.
