Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
marzban-mcpclaude mcp add marzban-mcp -e 'MARZBAN_BASE_URL=<MARZBAN_BASE_URL>' -e 'MARZBAN_USERNAME=<MARZBAN_USERNAME>' -e 'MARZBAN_PASSWORD=<your marzban_password>' -- npx -y marzban-mcp@0.4.0
{
"mcpServers": {
"marzban-mcp": {
"command": "npx",
"args": [
"-y",
"marzban-mcp@0.4.0"
],
"env": {
"MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
"MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
"MARZBAN_PASSWORD": "<your marzban_password>"
}
}
}
}
Environment variables
MARZBAN_BASE_URLrequired URL of the Marzban panel.MARZBAN_USERNAMErequired Marzban administrator username.MARZBAN_PASSWORDrequired secret Marzban administrator password.
docker.io/ilmar7786/marzban-mcp:0.4.0claude mcp add marzban-mcp -e 'MARZBAN_BASE_URL=<MARZBAN_BASE_URL>' -e 'MARZBAN_USERNAME=<MARZBAN_USERNAME>' -e 'MARZBAN_PASSWORD=<your marzban_password>' -- docker run -i --rm docker.io/ilmar7786/marzban-mcp:0.4.0
{
"mcpServers": {
"marzban-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/ilmar7786/marzban-mcp:0.4.0"
],
"env": {
"MARZBAN_BASE_URL": "<MARZBAN_BASE_URL>",
"MARZBAN_USERNAME": "<MARZBAN_USERNAME>",
"MARZBAN_PASSWORD": "<your marzban_password>"
}
}
}
}
Environment variables
MARZBAN_BASE_URLrequired URL of the Marzban panel.MARZBAN_USERNAMErequired Marzban administrator username.MARZBAN_PASSWORDrequired secret Marzban administrator password.
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
MarzbanSDK
A TypeScript toolkit for the Marzban API.
**Documentation** · **SDK** · **MCP Server**
One TypeScript SDK for Marzban, and everything built on top of it. Fix a bug or add an endpoint in the SDK, and the MCP server, the CLI, and every app built on it get it for free.
How it fits together
flowchart LR
Panel(["Marzban Panel"])
SDK["marzban-sdk"]
MCP["marzban-mcp<br/>MCP server"]
CLI["marzban-cli<br/>CLI · WIP"]
App["Your app<br/>Node · Bun · Deno · Browser"]
Agents(["Claude · Cursor · any MCP client"])
Panel <--> SDK
SDK --> MCP --> Agents
SDK --> CLI
SDK --> App
The SDK talks to your Marzban panel. The MCP server and CLI are just clients of that same SDK — same auth, same retries, same typed errors — so they never drift from each other or from your own code.
Packages
| Package | npm | Docker | What it is |
|---|---|---|---|
packages/sdk | marzban-sdk | — | The TypeScript SDK — auth, retries, resilient WebSocket reconnects, webhooks, lifecycle |
packages/mcp | marzban-mcp | ilmar7786/marzban-mcp | An MCP server exposing Marzban operations as tools for AI agents |
packages/cli | — | — | A CLI on top of the SDK — WIP, unpublished |
apps/docs | — | — | The documentation site |
Each publishable package has its own version, README.md, changelog and
release tags (sdk-v*, mcp-v*, cli-v*).
Documentation
Full guides, configuration reference and the complete typed API live at ilmar7786.github.io/marzban-sdk.
For how the repository itself is built — architecture, conventions, testing,
CI and releases — see docs/.
Contributing
Contributions are welcome — see CONTRIBUTING.md for how to submit a patch. Found a bug or have an idea? Open an issue.
License
If this project saves you time, consider giving it a ⭐ on GitHub.
Frequently asked questions
What is Marzban MCP?
Manage Marzban panels through the Model Context Protocol.
How do I install Marzban MCP?
It runs on your machine. In Claude Code: claude mcp add marzban-mcp -e 'MARZBAN_BASE_URL=<MARZBAN_BASE_URL>' -e 'MARZBAN_USERNAME=<MARZBAN_USERNAME>' -e 'MARZBAN_PASSWORD=<your marzban_password>' -- npx -y marzban-mcp@0.4.0. For other clients, paste the JSON configuration from this page into their MCP settings.
Does Marzban MCP need an API key?
Yes. It expects MARZBAN_BASE_URL, MARZBAN_USERNAME, MARZBAN_PASSWORD, which you set in its configuration.
Is Marzban MCP open source?
Yes. Its code is on GitHub under the MIT license.
Who maintains Marzban MCP?
It is published by Ilmar7786. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.