About Marzban MCP
Marzban MCP is a TypeScript-based MCP server for managing Marzban panels, aimed at AI agents and MCP clients. It shares the MarzbanSDK with related tools, keeping authentication and API behavior consistent.
Key features
- 01Manage Marzban panel operations
- 02Built on the Marzban TypeScript SDK
- 03Shared authentication and retry behavior
Use cases
- 01Manage a Marzban panel from an AI agent
- 02Use Marzban operations through an MCP client
MCP support
It exposes Marzban operations as tools for AI agents and other MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y marzban-mcpMARZBAN_BASE_URLURL of the Marzban panel.MARZBAN_USERNAMEMarzban administrator username.MARZBAN_PASSWORDSecretMarzban administrator password.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
15Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| section | string | No | Return this one top-level key's raw JSON instead of the summary (e.g. "inbounds", "routing"). Use "raw" for the entire config. Omit for a structural summary — prefer that over "raw" unless you specifically need the full JSON. |
Details
From the project READMEOne 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.