Marzban MCP

Manage Marzban panels through the Model Context Protocol.

AI & MLTypeScriptv0.3.0
MarzbanSDK

MarzbanSDK

A TypeScript toolkit for the Marzban API.

CI license

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

PackagenpmDockerWhat it is
packages/sdkmarzban-sdk—The TypeScript SDK — auth, retries, resilient WebSocket reconnects, webhooks, lifecycle
packages/mcpmarzban-mcpilmar7786/marzban-mcpAn 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

MIT © ilmar7786

If this project saves you time, consider giving it a ⭐ on GitHub.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y marzban-mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-ilmar7786-marzban-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "marzban-mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

marzban-mcpnpm

Compatible MCP Clients

Marzban MCP works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More