Skip to main content

MCP server and CLI for the OpenViking control plane (topapi) collection management

Project description

OpenViking Control Plane — MCP Server + CLI

MCP server and CLI for the OpenViking control plane (topapi) — manage OV libraries (Collection). Both front-ends share one core (client.py), so a tool added once is available from MCP and the CLI alike.

Covers the 6 core control-plane Actions:

Action MCP tool CLI command
ListOpenVikingCollections list_collections ov-cp list
CreateOpenVikingCollection create_collection ⚠️ ov-cp create
GetOpenVikingCollection get_collection ov-cp get <rid>
DeleteOpenVikingCollection delete_collection ⚠️ ov-cp delete <rid>
GetOpenVikingUsage get_usage ov-cp usage <rid>
GetOpenVikingCollectionUserAccess get_collection_api_key ov-cp api-key <rid>

Endpoint

The control-plane TopAPI is compiled into the OpenViking data-plane cluster; each Action is served by the data-plane gateway at:

{endpoint}/api/openviking/{Action}
# default endpoint: https://api.vikingdb.cn-beijing.volces.com/openviking
# full URL e.g.: https://api.vikingdb.cn-beijing.volces.com/openviking/api/openviking/ListOpenVikingCollections

The Action lives in the path (no ?Action=&Version= query). The request body is the Action's params (e.g. {"ResourceID": "..."}).

The default endpoint points at the reserved public data-plane gateway (not open to traffic yet). For local testing set --endpoint / VIKING_ENDPOINT to a kubectl port-forward, e.g. http://localhost:18080.

Authentication

The only method: an Ark AgentPlan ApiKey, sent as an Authorization: Bearer <key> header on every request (the backend's authorizeControlPlaneByArk reads the key only from this header — it does not accept X-API-Key). Auth is pluggable (common/auth.pyBearerTokenAuth); an AK/SK signer can be swapped in later without touching the rest.

⚠️ Write actions like create require the account to have AgentPlan deduction activated, otherwise they return ProductUnordered. Read-only actions (list/get/usage/delete) are not gated.

Configuration

Setting Env var CLI flag Default
Control-plane endpoint (base URL) VIKING_ENDPOINT --endpoint / -e https://api.vikingdb.cn-beijing.volces.com/openviking
AgentPlan ApiKey AGENTPLAN_API_KEY --api-key / -k — (required)
Default project OPENVIKING_PROJECT --project default

CLI usage

uv sync                      # or: pip install -e .

# set the key once via env, then drop the per-command flag
export AGENTPLAN_API_KEY=ark-xxxxxxxx

# read-only
uv run ov-cp list
uv run ov-cp get   <ResourceID>
uv run ov-cp usage <ResourceID>
uv run ov-cp api-key <ResourceID>

# create (consumes paid quota; with source=agentplan only --name is needed —
#         model names default, and the model ApiKey falls back to the configured key)
uv run ov-cp create --name my_kb

# delete (irreversible)
uv run ov-cp delete <ResourceID> --yes

Flags override env. The endpoint defaults to the public gateway; override it only for testing (e.g. against a port-forward) with -e / VIKING_ENDPOINTuv run ov-cp -e http://localhost:18080 list. ov-cp --help works without any config.

MCP usage (stdio / uvx)

The server defaults to stdio transport, so it can be launched as a subprocess by any MCP client. Add to .mcp.json:

{
  "mcpServers": {
    "openviking-controlplane": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_openviking_controlplane",
        "mcp-server-openviking-controlplane"
      ],
      "env": {
        "AGENTPLAN_API_KEY": "ark-xxxxxxxx"
      }
    }
  }
}

For local development point it at your checkout instead:

{
  "mcpServers": {
    "openviking-controlplane": {
      "command": "uv",
      "args": ["run", "--directory", "/abs/path/server/mcp_server_openviking_controlplane",
               "mcp-server-openviking-controlplane"],
      "env": {
        "AGENTPLAN_API_KEY": "ark-xxxxxxxx"
      }
    }
  }
}

Run with SSE instead via mcp-server-openviking-controlplane --transport sse.

Agent skill

A Claude Code / agent skill that documents the ov-cp workflow lives at skills/openviking-controlplane/SKILL.md. Symlink or copy it into your agent's skills directory (e.g. ~/.claude/skills/) to let an agent drive the control plane.

⚠️ create_collection / delete_collection create/destroy billable resources and are exposed as MCP tools; their descriptions instruct the model to confirm with you first. Rely on your client's tool-permission prompt as the final gate.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_openviking_controlplane-0.1.0.tar.gz (82.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mcp_server_openviking_controlplane-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcp_server_openviking_controlplane-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d3239fc90ba52646c5339ce9022520030a85c743cf02f6e79813b2454e6f988
MD5 439620d1c3f5871d8502edf2da1cd47d
BLAKE2b-256 a72040d02bf91125c20bb67254a52df3cd00c8d6a52b0e8c5466352cfaf9e17d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_openviking_controlplane-0.1.0.tar.gz:

Publisher: controlplane-mcp-release.yml on volcengine/OpenViking

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_server_openviking_controlplane-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_openviking_controlplane-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6d32d0bde3b08853d5bc53752735044c81109dded3f2c9c350067479a0f1d17
MD5 8731f94c756bd190be4988bd457f72d1
BLAKE2b-256 37c9e176ba70eadc8715f98dabf6f750d76e60162e745dda98678cdf1bcde36f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_openviking_controlplane-0.1.0-py3-none-any.whl:

Publisher: controlplane-mcp-release.yml on volcengine/OpenViking

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page