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

# Local stdio MCP

> Install The Hog's local stdio MCP server with npx for Claude Desktop, Claude Code, Cursor, Codex, VS Code, Windsurf, and other local MCP clients.

Use local stdio MCP when your client runs MCP servers on your machine with a command like `npx`.

## Requirements

* Node.js 20 or newer
* A The Hog API key and API secret from the Credentials page
* An MCP client that supports local stdio servers

Most MCP clients run the package for you with `npx`:

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx -y @thehog/mcp@latest
```

Pass both credential values through environment variables in your MCP client config:

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
THEHOG_ACCESS_KEY=YOUR_THEHOG_ACCESS_KEY THEHOG_SECRET_KEY=YOUR_THEHOG_SECRET_KEY npx -y @thehog/mcp@latest
```

In the dashboard UI, the public API key is the MCP `THEHOG_ACCESS_KEY`. The API secret is the MCP `THEHOG_SECRET_KEY`. Both are required for dashboard-created credentials.

Package and source:

* npm: [@thehog/mcp](https://www.npmjs.com/package/@thehog/mcp)
* GitHub: [The-Hog/the-hog-mcp](https://github.com/The-Hog/the-hog-mcp)

## Claude Desktop

For local stdio MCP, use the Claude Desktop app. The claude.ai web app cannot launch a local stdio command like `npx`; use [hosted remote MCP](/guides/use-mcp) for Claude in the web app or other hosted clients.

Claude Desktop config locations:

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

Add The Hog:

```json theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "thehog": {
      "command": "npx",
      "args": ["-y", "@thehog/mcp@latest"],
      "env": {
        "THEHOG_ACCESS_KEY": "YOUR_API_KEY",
        "THEHOG_SECRET_KEY": "YOUR_API_SECRET"
      }
    }
  }
}
```

Restart Claude Desktop after saving the file. If Claude cannot find `npx`, use the absolute path from `which npx`.

## Claude Code

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp add thehog \
  -e THEHOG_ACCESS_KEY=YOUR_API_KEY \
  -e THEHOG_SECRET_KEY=YOUR_API_SECRET \
  -- npx -y @thehog/mcp@latest
```

Check that the server is connected:

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp list
```

## Cursor

Create or update `.cursor/mcp.json` in a project, or `~/.cursor/mcp.json` globally:

```json theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "thehog": {
      "command": "npx",
      "args": ["-y", "@thehog/mcp@latest"],
      "env": {
        "THEHOG_ACCESS_KEY": "${env:THEHOG_ACCESS_KEY}",
        "THEHOG_SECRET_KEY": "${env:THEHOG_SECRET_KEY}"
      }
    }
  }
}
```

Restart Cursor after changing the config. If Cursor cannot read shell env values, replace the `${env:...}` entries with literal strings like the Claude Desktop example.

## Codex

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
codex mcp add thehog \
  --env THEHOG_ACCESS_KEY=YOUR_API_KEY \
  --env THEHOG_SECRET_KEY=YOUR_API_SECRET \
  -- npx -y @thehog/mcp@latest
```

Check that the server is registered:

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
codex mcp list
```

You can also edit `~/.codex/config.toml` directly:

```toml theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
[mcp_servers.thehog]
command = "npx"
args = ["-y", "@thehog/mcp@latest"]
enabled = true

[mcp_servers.thehog.env]
THEHOG_ACCESS_KEY = "YOUR_API_KEY"
THEHOG_SECRET_KEY = "YOUR_API_SECRET"
```

## VS Code / GitHub Copilot

VS Code uses `servers` instead of `mcpServers`. Add this to workspace `.vscode/mcp.json` or to your user MCP configuration:

```json theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "servers": {
    "thehog": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@thehog/mcp@latest"],
      "env": {
        "THEHOG_ACCESS_KEY": "${input:thehog-api-key}",
        "THEHOG_SECRET_KEY": "${input:thehog-api-secret}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "thehog-api-key",
      "description": "The Hog API key",
      "password": true
    },
    {
      "type": "promptString",
      "id": "thehog-api-secret",
      "description": "The Hog API secret",
      "password": true
    }
  ]
}
```

Use the Command Palette commands `MCP: Open User Configuration`, `MCP: Open Workspace Folder MCP Configuration`, and `MCP: List Servers` to edit and verify the server.

## Windsurf

Add this to `~/.codeium/windsurf/mcp_config.json`:

```json theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "thehog": {
      "command": "npx",
      "args": ["-y", "@thehog/mcp@latest"],
      "env": {
        "THEHOG_ACCESS_KEY": "${env:THEHOG_ACCESS_KEY}",
        "THEHOG_SECRET_KEY": "${env:THEHOG_SECRET_KEY}"
      }
    }
  }
}
```

Refresh MCP servers from Cascade after saving. If Windsurf cannot read shell env values, replace the `${env:...}` entries with literal strings like the Claude Desktop example.

## Other clients

Most local MCP clients accept the same `mcpServers` shape:

```json theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "thehog": {
      "command": "npx",
      "args": ["-y", "@thehog/mcp@latest"],
      "env": {
        "THEHOG_ACCESS_KEY": "YOUR_API_KEY",
        "THEHOG_SECRET_KEY": "YOUR_API_SECRET"
      }
    }
  }
}
```

Use your client's MCP settings page or config file location for that JSON.

## Authentication and safety

The server runs locally over stdio. It does not host a public endpoint, does not require OAuth, and does not require a dashboard login. Your MCP client starts the local process, passes credentials through environment variables, and the server calls:

```text theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
https://developer.thehog.ai/api
```

Follow these practices:

* Store API keys and secrets in your MCP client's local config, shell profile, or secret manager.
* Do not commit MCP configs that contain real API keys.
* Review tool calls before approving actions that spend credits, create monitors, or fetch large datasets.
* Use scoped credentials when your organization supports key scoping.

## Versioning

The MCP package is in the `0.x` release line while the tool surface stabilizes. Patch versions contain compatible fixes. Minor versions may add tools or adjust tool schemas before `1.0.0`.
