MarzbanSDK
MCP Server

Tools

All 21 marzban-mcp tools, grouped by area, with their scope and what each one does.

Every tool is namespaced marzban_<area>_<action>. The Scope column determines which profile exposes it: read/write tools are in standard (the default), destructive tools need full.

Users

ToolScopeDescription
marzban_users_listreadList users, with search/status filters and pagination
marzban_users_getreadGet one user by username, with a computed summary (data left, days left, usage %)
marzban_users_createwriteCreate a user — optionally from a template, with any explicit field overriding the template's value
marzban_users_updatewritePartially update a user; only the fields you provide change
marzban_users_activatewriteSet status to active
marzban_users_deactivatewriteSet status to disabled, blocking access without deleting the account
marzban_users_holdwriteSet status to on_hold — inactive until first connection, then the hold timer starts
marzban_users_extendwriteRenew: extend expiry and/or add data, relative to the user's current values (not an absolute overwrite)
marzban_users_usagereadTraffic usage, with a per-node breakdown
marzban_users_deletedestructivePermanently delete a user and their subscription link
marzban_users_reset_trafficdestructiveReset used traffic to zero, for one user or every user at once (all: true)

marzban_users_activate/deactivate/hold exist as separate tools rather than one generic "set status" tool deliberately — they're the most common operations, and a model reaches for them correctly on the first try without needing to know the underlying status enum.

Config

ToolScopeDescription
marzban_config_getreadRead the core (Xray) config — a structural summary by default; one section or the full JSON on request
marzban_config_updatedestructiveReplace the entire core config (restarts the core). dryRun: true previews the diff with no write and no confirmation needed
marzban_core_restartdestructiveRestart the Xray core without changing its config
marzban_hosts_getreadList proxy hosts, flagging any field that references an unknown {VARIABLE} template token
marzban_hosts_updatedestructiveReplace the entire proxy host configuration

See Security for the backup/dry-run guarantees on the two destructive config tools.

System & nodes

ToolScopeDescription
marzban_system_statsreadPanel-wide CPU/memory/user-count/bandwidth stats, plus core version and running state
marzban_system_inboundsreadList configured inbound proxies, grouped by protocol
marzban_nodes_listreadList nodes with status, Xray version, and bandwidth usage over a period

Subscription

ToolScopeDescription
marzban_subscription_inforeadLook up subscription status/usage by the token from a subscription URL — no username needed
marzban_users_revoke_subscriptiondestructiveIssue a new subscription link for a user, invalidating the old one

What's not here

adminToken and admin account management (createAdmin/modifyAdmin/removeAdmin) are never registered, in any profile — see Security. User-template management (create/list/delete templates) isn't included either; marzban_users_create's templateId argument references a template created through Marzban's own web panel.

On this page