# Marzban MCP

> Marzban MCP is an open-source MCP server. Manage Marzban panels through the Model Context Protocol. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/ilmar7786/marzban-sdk
- **MCP Registry name:** io.github.Ilmar7786/marzban-mcp
- **Listing updated:** 2026-11-13

## About

Manage Marzban panels through the Model Context Protocol.

## Install

### Claude Code (Terminal)

```sh
claude mcp add marzban-mcp --env MARZBAN_BASE_URL='<MARZBAN_BASE_URL>' --env MARZBAN_USERNAME='<MARZBAN_USERNAME>' --env MARZBAN_PASSWORD='<MARZBAN_PASSWORD>' -- npx -y marzban-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "marzban-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ],
      "env": {
        "MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
        "MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
        "MARZBAN_PASSWORD": "<MARZBAN_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "marzban-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ],
      "env": {
        "MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
        "MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
        "MARZBAN_PASSWORD": "<MARZBAN_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "marzban-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ],
      "env": {
        "MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
        "MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
        "MARZBAN_PASSWORD": "<MARZBAN_PASSWORD>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "marzban-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ],
      "env": {
        "MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
        "MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
        "MARZBAN_PASSWORD": "<MARZBAN_PASSWORD>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "marzban-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ],
      "env": {
        "MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
        "MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
        "MARZBAN_PASSWORD": "<MARZBAN_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### Is Marzban MCP free?

Yes. Marzban MCP is open source, so you can use and self-host it for free.

### How do I add Marzban MCP to Claude Code?

Run this command in your terminal: claude mcp add marzban-mcp --env MARZBAN_BASE_URL='<MARZBAN_BASE_URL>' --env MARZBAN_USERNAME='<MARZBAN_USERNAME>' --env MARZBAN_PASSWORD='<MARZBAN_PASSWORD>' -- npx -y marzban-mcp

---
Source: https://ai-powered.com/mcp/marzban-mcp
