Skip to main content

Admin MCP server

@severalnines/ccx-admin-mcp is an MCP (Model Context Protocol) server for the CCX admin API. It lets operators and SREs use an AI assistant (Claude Code, Claude Desktop, Cursor, ...) to look across all users and datastores of a CCX installation, for example:

  • "Which datastores are degraded or have a failed last job?"
  • "Show the nodes and the audit log of datastore 936a84de-... for the last 24 hours"
  • "Who owns the datastore called fancy-breeze?"
  • "How many users do we have, and which are suspended?"
  • "Total instance hours per customer for September"

It covers the same endpoints as the admin panel and the billing report API. For the end-user API (a customer's own datastores) use the user MCP server instead.

Credentials​

The admin API accepts two kinds of credentials. Both live in Kubernetes secrets in the CCX namespace, the same ones used for the admin panel and the admin API:

SecretKeysEnvironment variablesCovers
admin-usersADMIN_USERS = email:passwordCCX_ADMIN_USERNAME, CCX_ADMIN_PASSWORDdatastores, nodes, audit log, users, billing, cmon version
admin-basic-authADMIN_AUTH_USERNAME, ADMIN_AUTH_PASSWORDCCX_ADMIN_BASIC_USERNAME, CCX_ADMIN_BASIC_PASSWORDhealth check, datastore/user counters, VPC listing, billing

The admin user login is the one you need. Basic auth is optional for everything except ccx_admin_list_vpcs, which has no fallback: the counter tools count the full lists instead, and billing accepts either credential set.

kubectl -n <ccx-namespace> get secret admin-users -o jsonpath='{.data.ADMIN_USERS}' | base64 -d
kubectl -n <ccx-namespace> get secret admin-basic-auth -o jsonpath='{.data.ADMIN_AUTH_USERNAME}' | base64 -d
kubectl -n <ccx-namespace> get secret admin-basic-auth -o jsonpath='{.data.ADMIN_AUTH_PASSWORD}' | base64 -d

Installation​

Node.js 18 or newer is required.

Claude Code​

claude mcp add ccx-admin \
-e CCX_BASE_URL=https://ccx.example.com \
-e CCX_ADMIN_USERNAME=admin@example.com \
-e CCX_ADMIN_PASSWORD='...' \
-- npx -y @severalnines/ccx-admin-mcp@latest

The -e flags store the values as environment variables of the registered server, so the password is not part of the server's command line every time it starts. It is still visible in the argument list of this one claude mcp add invocation and in your shell history; on a shared machine prefer the JSON configuration below or a .env file.

Other MCP clients​

{
"mcpServers": {
"ccx-admin": {
"command": "npx",
"args": ["-y", "@severalnines/ccx-admin-mcp@latest"],
"env": {
"CCX_BASE_URL": "https://ccx.example.com",
"CCX_ADMIN_USERNAME": "admin@example.com",
"CCX_ADMIN_PASSWORD": "..."
}
}
}
}

From source with a .env file​

git clone https://github.com/severalnines/ccx-admin-mcp.git
cd ccx-admin-mcp
npm install # also builds
cp .env.example .env # fill in CCX_BASE_URL and the credentials
claude mcp add ccx-admin -- node "$PWD/build/index.js"

Only the .env next to package.json (or one given with --dotenv) is read, never one in the working directory, and only CCX_* keys are imported from it.

Protection mode​

Destructive tools are blocked until you opt out with --protect false or CCX_PROTECT=false:

  • ccx_admin_delete_datastore (force-deletes any user's datastore)
  • ccx_admin_delete_user
  • ccx_admin_suspend_user

The delete tools additionally require confirm: true in the tool call. That is a signal for the assistant to check with you before proceeding, not a technical guarantee: protection mode is the only hard guard.

Available tools​

ToolDescription
ccx_admin_checkVerify connectivity and whichever credential sets are configured; shows the admin identity when a session is used
ccx_admin_cmon_versionVersion of the ClusterControl controller (cmon)
ccx_admin_list_datastoresAll datastores across all users with owner, status and latest job; filter by status, cloud, type, owner, name or job status
ccx_admin_get_datastoreOne datastore with its latest job and database nodes
ccx_admin_list_nodesDatabase and load-balancer nodes: hostname, IP, role, cmon host status, instance type, availability zone
ccx_admin_get_datastore_auditAudit log of a datastore (jobs, resource changes) with time bounds and type filter
ccx_admin_delete_datastoreForce-delete a datastore (protected)
ccx_admin_count_datastoresTotal number of datastores
ccx_admin_list_usersAll users with suspended/deleted flags; filter by login, name, suspended, deleted
ccx_admin_count_usersCustomer count plus an internal/external/suspended/deleted breakdown
ccx_admin_suspend_user / ccx_admin_unsuspend_userSuspend a user with a reason, or lift the suspension
ccx_admin_delete_userDelete a user (protected)
ccx_admin_billing_usagePer-datastore usage for a date range: instance hours, volume GiB-hours, egress, backups (see Billing)
ccx_admin_list_vpcsVPC ids known to CCX for an AWS region. The only tool that requires the basic-auth credentials (CCX_ADMIN_BASIC_USERNAME and CCX_ADMIN_BASIC_PASSWORD); the backend does not query the cloud, so an empty result means "unknown" rather than "none"

Security notes​

  • The server runs on the operator's machine and connects directly to the CCX API over HTTPS. CCX_BASE_URL must be https:// (plain http:// is only accepted for localhost) and redirects are never followed, so the admin password and session cookie cannot be replayed to another host.
  • Credentials are never written to logs or returned in tool output.
  • Everything the assistant sees comes from the admin API responses; treat the assistant session with the same care as the admin panel.

See the project README for the full reference.