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

# Self-Hosting

> Deploy MCP Inspector to your own infrastructure

<Card title="Live Preview">
  You can preview the inspector at inspector.mcp-use.com

  [  <img src="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/UseLiveSmall.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=1e958317e42d5aa66125696e7777542e" alt="See Live Inspector" width="183" height="41" data-path="images/UseLiveSmall.svg" />](https://inspector.mcp-use.com)
</Card>

# Self-Hosting MCP Inspector

Deploy the MCP Inspector to your own infrastructure with a single Docker container. Perfect for enterprise environments, air-gapped networks, or when you need full control over your debugging environment.

<Card title="Docker Image" icon="docker">
  The MCP Inspector provides an official Docker image via Docker Hub that can be used for deployments on any system that is running Docker. Here's a one-liner that will start a container running the Inspector.

  ```bash theme={null}
  docker run -d -p 8080:8080 --name mcp-inspector mcpuse/inspector:latest
  ```

  [  <img src="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/dockerbutton.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=72a2c2db79aa77ac6a98fc7ac71126a0" alt="Docker Hub" width="183" height="40" data-path="images/dockerbutton.svg" />](https://hub.docker.com/r/mcpuse/inspector)
</Card>

## Quick Deploy

<Card title="Railway" icon="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/railway.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=49c6c1c8eddf6ef8ffc9696c7d131f15" width="1024" height="1024" data-path="images/railway.svg">
  Deploy instantly to Railway with automatic HTTPS and custom domains.

  [  <img src="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/railway-button.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=a50446d280626d31fc68adea18777c69" alt="Deploy on Railway" width="183" height="40" data-path="images/railway-button.svg" />](https://railway.com/deploy/nl4ZMa?referralCode=71PxSL\&utm_medium=integration\&utm_source=template\&utm_campaign=generic)
</Card>

## CLI Usage

You can also run the inspector using the CLI. See the [CLI Usage](/inspector/cli) guide for command-line options and examples.

## Docker Deployment

### Using Docker Run

Deploy locally or on any Docker-compatible infrastructure:

```bash theme={null}
docker run -d \
  --name mcp-inspector \
  -p 8080:8080 \
  -e NODE_ENV=production \
  mcpuse/inspector:latest
```

### Using Docker Compose

For more complex deployments with environment variables:

```yaml theme={null}
version: '3.8'
services:
  mcp-inspector:
    image: mcpuse/inspector:latest
    ports:
      - "8080:8080"
    environment:
      - NODE_ENV=production
      - PORT=8080
      # Optional: Allow embedding from specific origins
      - MCP_INSPECTOR_FRAME_ANCESTORS=https://app.example.com https://dev.example.com
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080"]
      interval: 30s
      timeout: 10s
      retries: 3
```

### Environment Variables

<Note>
  All configuration is optional. The inspector works out of the box with sensible defaults.
</Note>

| Variable                        | Default                            | Description                                                                                                                                                             |
| ------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NODE_ENV`                      | `production`                       | Node.js environment                                                                                                                                                     |
| `PORT`                          | `8080`                             | Port to run the inspector on                                                                                                                                            |
| `HOST`                          | `0.0.0.0`                          | Host to bind to                                                                                                                                                         |
| `MCP_INSPECTOR_FRAME_ANCESTORS` | `'self'` in production, `*` in dev | Configure which origins can embed inspector widgets in iframes. Use space-separated origins (e.g., `"https://app.example.com https://dev.example.com"`) or `*` for all. |

## Support

For self-hosting support:

* [GitHub Issues](https://github.com/mcp-use/mcp-use/issues)
* [Discord Community](https://discord.gg/XkNkSkMz3V)

Visit [inspector.mcp-use.com](https://inspector.mcp-use.com) to try the hosted version first!
