Catalog npm
Back to packageRELEASE DETAILS

0.1.2

npm

3xui-mcp

MCP server exposing 3x-ui panel read operations and inbound/client CRUD to LLM agents, built on 3xui-api-client

3x-ui3xuimcpmodel-context-protocolvpnxray
Published27 Aug 2026
Direct dependencies5
Transitive dependenciesNot calculated

README

Current package documentation

3xui-mcp — 3x-ui at your fingertips for AI agents

npm version npm downloads license node engine GitHub stars

3xui-mcp

MCP (Model Context Protocol) server for the 3x-ui panel, built on 3xui-api-client. Manage inbounds and clients on your VPN panel directly from Claude, Cursor, or any MCP-compatible client.

Scoped intentionally to keep tool context small: read operations plus full CRUD for inbounds and clients. Nodes, groups, geo files, backups, Xray config, and panel settings are out of scope — extend src/tools/ if you need them.

Tools

ToolTypeDescription
list_inboundsreadList all inbounds
get_inboundreadGet one inbound by ID
create_inboundwriteCreate an inbound
update_inboundwriteReplace an inbound's config
delete_inboundwriteDelete an inbound
list_clientsreadList all clients across inbounds
get_clientreadGet one client by email
get_client_trafficreadGet a client's traffic usage
list_online_clientsreadList currently connected clients
create_clientwriteAdd a client with auto-generated credentials
update_clientwriteUpdate a client's limits/expiry/state
delete_clientwriteDelete a client by email

Configuration

Set credentials via environment variables — pick one auth mode:

# Required
THREEXUI_BASE_URL=https://your-panel.example.com

# Cookie auth (admin username/password)
THREEXUI_USERNAME=admin
THREEXUI_PASSWORD=your-password

# OR API token auth (skips username/password)
THREEXUI_API_TOKEN=your-token

# Optional, default "auto"
THREEXUI_PANEL_TYPE=auto   # auto | modern | legacy

Use with an MCP client

Add to your client's MCP config (e.g. Claude Desktop claude_desktop_config.json). No install or path needed — npx fetches and runs the published package on demand:

{
  "mcpServers": {
    "3xui": {
      "command": "npx",
      "args": ["-y", "3xui-mcp"],
      "env": {
        "THREEXUI_BASE_URL": "https://your-panel.example.com",
        "THREEXUI_USERNAME": "admin",
        "THREEXUI_PASSWORD": "your-password"
      }
    }
  }
}

Running from source instead

If you're developing this server locally rather than using the published package:

npm install
npm run build

Then point your MCP config at the built file directly — replace the path below with wherever you actually cloned this repo:

{
  "mcpServers": {
    "3xui": {
      "command": "node",
      "args": ["/absolute/path/to/3xui-mcp/dist/index.js"],
      "env": {
        "THREEXUI_BASE_URL": "https://your-panel.example.com",
        "THREEXUI_USERNAME": "admin",
        "THREEXUI_PASSWORD": "your-password"
      }
    }
  }
}

Test locally

npm run inspector

Opens the MCP Inspector against this server.

Agent skill

skills/3xui-mcp/SKILL.md documents every tool's required/optional fields, units (GB vs bytes, ms timestamps), and common workflows for an AI agent driving this server — load it alongside the server so the agent doesn't have to guess input shapes from tool descriptions alone.

Release process

Versioning lives in GitHub Releases, not in manual package.json commits:

  1. Draft a new GitHub Release with tag vX.Y.Z (must match vX.Y.Z or vX.Y.Z-prerelease).
  2. Publishing the release triggers .github/workflows/release.yml, which builds, sets package.json's version to match the tag, and runs npm publish.
  3. If the release event doesn't fire the workflow (GitHub occasionally misses it), trigger it manually: Actions → Publish to npm → Run workflow, entering the same tag.

Requires a repo secret NPM_TOKEN — an npm access token with publish rights and 2FA bypass enabled for automation, added under Settings → Secrets and variables → Actions.

The version checked into package.json on main is a starting point only; the release tag is the source of truth for what actually gets published. Bump it locally too when convenient so the repo doesn't drift too far from the last published version, but the workflow doesn't depend on it matching.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
3xui-api-client
Environment
{
  "local_name": "3xui-api-client",
  "alias": false,
  "peer_metadata": null
}
^3.2.0runtime
@modelcontextprotocol/sdk
Environment
{
  "local_name": "@modelcontextprotocol/sdk",
  "alias": false,
  "peer_metadata": null
}
^1.30.0runtime
zod
Environment
{
  "local_name": "zod",
  "alias": false,
  "peer_metadata": null
}
^3.24.0runtime
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.7.0development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^22.10.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-fL+Xr9Tce5pRQBuOai9WQBPj99n/lt9Iugm1k1DR3EaFPTIW8+gbp3si+U1+0khXSZe4IvZenbGrmz7Byc1dzA==",
  "shasum": "adf75e34bad53cbd56c4ade8087c5a377645a2f2",
  "tarball": "https://registry.npmjs.org/3xui-mcp/-/3xui-mcp-0.1.2.tgz",
  "fileCount": 8,
  "unpackedSize": 31983,
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/3xui-mcp@0.1.2",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEUCIB4WlLlHs26d7ivRV5p+ZXCwVCmT3snbElBQ3FTD58jnAiEAuoouCeMxVWmp2dNlfAskbXPMZmz9DyHhVtCt8rpHLNw="
    }
  ]
}

Repository

PENDING
iamhelitha/3xui-mcp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:56 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ed43ce0134a6237ea15c8ab92b3e02b71f6cbe3ec6d4a97b4d8c5d639a37d42e

Other collected versions

0.1.127 Aug0.1.027 AugView all collected versions →