marzban-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MARZBAN_BASE_URL | Yes | ||
| MARZBAN_PASSWORD | Yes | ||
| MARZBAN_USERNAME | Yes |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| marzban_config_getA | Reads the Xray core configuration. Defaults to a structural summary (inbound/outbound tags, ports, protocols, routing rule count) — the full config can be tens of KB and this is usually all that's needed. Pass |
| marzban_hosts_getA | Lists proxy host settings grouped by inbound tag. Flags host fields (remark/address/host/sni/path) that reference an unknown |
| marzban_nodes_listA | Lists all connected nodes with their status and Xray version, plus bandwidth usage (uplink/downlink) over the given period. |
| marzban_subscription_infoA | Reads subscription status/usage/expiry using the token from a subscription URL (the same public, unauthenticated endpoint client apps use) — for diagnosing a broken subscription link without needing the username. For an admin-side lookup by username, use marzban_users_get instead. |
| marzban_system_inboundsA | Lists configured inbound proxies grouped by protocol, with tag, network, TLS mode, and port for each. For the raw Xray inbound JSON (routing, stream settings, etc.) use marzban_config_get with section: "inbounds" instead. |
| marzban_system_statsA | Reports panel-wide stats: CPU/memory usage, user counts by status, and bandwidth totals/speeds, plus the Xray core version and whether it is currently running. |
| marzban_users_activateA | Sets a user's status to active. |
| marzban_users_createA | Creates a new user. |
| marzban_users_deactivateB | Sets a user's status to disabled, immediately blocking their access without deleting them. |
| marzban_users_extendA | Renews a user: adds addDuration to their current expiration (or to now, if they have none or it already passed) and/or addData on top of their current data limit. If the user was expired or limited, status is moved back to active. Use this instead of marzban_users_update for renewals — it reads the current expire/limit first so the increment is relative, not an absolute overwrite. |
| marzban_users_getA | Fetches one user by username, with a computed summary: data left, days left, usage percent, and whether they are effectively expired (covers the case where status has not caught up with an already-past expire yet). |
| marzban_users_holdA | Sets a user's status to on_hold — inactive until their first connection, at which point the on-hold timer starts. Useful for provisioning an account ahead of time without starting its clock. |
| marzban_users_listA | Lists users, optionally filtered by status or a search term (matches username/note). Paginated — default 25, max 100 per call; prefer |
| marzban_users_updateA | Partially updates a user — only fields you provide are changed, everything else is left as-is. For status changes prefer marzban_users_activate/deactivate/hold (clearer intent, no need to know the raw status enum). For renewing an expiring/expired user prefer marzban_users_extend. |
| marzban_users_usageA | Reports how much data a user has used: total, lifetime total, their current limit, and a breakdown by node. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| expiring_users_audit | Finds users whose subscription is expiring soon (or already expired/limited) and suggests next steps for each. |
| node_diagnostics | Investigates why a node might be unhealthy: connection status, Xray version, and recent bandwidth. |
| traffic_report | Summarizes bandwidth usage across the panel, nodes, and top users for a given period. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
Most tools have clearly distinct purposes, especially across user actions and system views. The descriptions explicitly disambiguate users_get vs users_list vs subscription_info and config_get vs hosts_get vs system_inbounds, though hosts_get and system_inbounds could still cause mild confusion.
The dominant pattern is marzban_<resource>_<verb>, e.g. users_create, users_get, hosts_get, nodes_list. A few tools break this pattern—subscription_info, system_inbounds, system_stats, users_usage—but the naming remains predictable and readable overall.
At 15 tools, the set is at the upper end of the well-scoped range but still feels justified for a panel administration server. Each tool covers a meaningful operation, and the many user-management tools map to distinct lifecycle actions.
The set covers user creation, retrieval, update, status changes, renewal, usage, subscription diagnosis, nodes, config, inbounds, and system stats. However, there is no delete-user tool, and no obvious way to generate or reset a subscription URL, leaving clear lifecycle gaps.