Packages / MCP server / @opvs-ai/mcp-admin

v0.1.0MCP server

@opvs-ai/mcp-admin

OPVS super-admin MCP server: 4 tools (tool_search, tool_help, tool_call, whoami) over the main API's super_admin routes that accept X-Admin-Key. The key is read only from a root-owned mode-600 file. For the platform operator only.

npm install -g @opvs-ai/mcp-admin

The platform super-admin MCP server. It is for the platform operator on LLM14 only, and is never installed for a brand or an agent.

It has four tools over stdio:

ToolWhat it does
tool_searchfinds admin API operations by words in their path, summary and capability
tool_helpshows one operation's path and query parameters and its JSON body schema
tool_callcalls one operation with the admin key; parameters pass to the route unchanged
whoamishows the API it calls, the key file's path (never the key) and the operation counts

Which operations it can reach

It reads the main API's full schema (GET /api/v1/openapi.json) and keeps an operation only when all three are true:

  1. the API stamped it x-opvs.access_group: super_admin;
  2. its security names the apiKey scheme for the X-Admin-Key header (the gates require_admin_or_session, require_admin, and the content and employees admin gates);
  3. it is not in src/session-only.json.

require_super_admin routes need a dashboard session cookie, so the key can never pass them and they are left out. require_platform_admin routes read the header by hand, so the schema does not show that they take the key, and they are left out too. session-only.json lists the operations that show the key scheme but also depend on require_super_admin. tests/api/services/test_mcp_admin_tool_set_sp18.py rebuilds that list from the app's dependencies and fails when the file disagrees.

tool_call refuses any operation outside this set before it sends a request.

Inputs

VariableMeaning
OPVS_ADMIN_KEY_FILERequired. Path to the file holding the admin key: a regular file (not a symlink), owned by root, mode 0600.
OPVS_ADMIN_API_URLMain API base URL. Default http://localhost:3000. Plain http is accepted only for a loopback host.

The server refuses to start if the key file is missing, is a symlink, is not owned by root, or can be read by group or world. The key is read only from that file. It is never taken from an argument, .mcp.json, an environment value or a token, and it is never logged or returned. mcp-admin uses its own fetch client, which sends only X-Admin-Key. It never follows a redirect, and it removes the key from any reply text before the agent sees it.

.mcp.json entry (LLM14)

{
  "mcpServers": {
    "opvs-admin": {
      "command": "opvs-mcp-admin",
      "env": {
        "OPVS_ADMIN_KEY_FILE": "/root/.opvs/admin.key",
        "OPVS_ADMIN_API_URL": "http://localhost:3000"
      }
    }
  }
}

The path above is an example. Use the root-owned 0600 file that holds the key.

Publishing

The package is private and published to Verdaccio (https://npm.opvs.ai/) by hand, like @opvs-ai/mcp-internal. publish.yml refuses any package whose publishConfig.registry is not npmjs.

cd packages/mcp-admin && npm run build && npm publish