LabscoMCP early access ↗
CodesWhatMCP SERVER

Portkey Admin

The Portkey Admin API as tools: prompts, configs, keys, guardrails, limits, logs and analytics.

by CodesWhat ↗Model Routing, Multi-Model Consultation & Cost ControlCommunity

LABSCO SUMMARY

Admin work on an LLM gateway, without opening the dashboard.

This is the whole Portkey control plane rendered as tools, which makes it strong at the things that are tedious in a UI: rotating keys, diffing a config across versions, publishing a prompt version and promoting it, or reading cost and latency by model. The size is the trade — scope it to the domains you need and the context cost falls with it.

What it is

A control-plane server for a Portkey account — 171 tools covering the Admin API, from prompt versioning and gateway configs to virtual keys, guardrails, usage limits, log exports and audit access. Published as portkey-admin-mcp, version 0.10.1, with a stdio binary and an experimental HTTP one.

What you get

  • Prompt management as a lifecycle, not a blob — create_prompt, list_prompt_versions, render_prompt, publish_prompt, promote_prompt, migrate_prompt, run_prompt_completion
  • Gateway behaviour under version control: list_configs, create_config, update_config, list_config_versions for routing, caching, retry and load balancing
  • Credential operations — create_api_key, rotate_api_key, delete_api_key, plus create_virtual_key and update_virtual_key for provider access
  • Governance surfaces: guardrails, usage limits and rate limits, collections for grouping prompts, and provider and integration management
  • Twenty analytics tools including get_cost_analytics, get_latency_analytics, get_error_rate_analytics, get_cache_hit_rate and get_token_analytics
  • Logs and audit — retrieval, ingestion, field restrictions, the eight export tools, and list_audit_logs
  • User and workspace administration, including invites, workspace members and SCIM group mappings such as list_scim_workspace_mappings
  • A narrowing switch: PORTKEY_TOOL_DOMAINS exposes only the domains you name, for example prompts and analytics

Requirements

Node 24, and a Portkey API key from your dashboard — PORTKEY_API_KEY is the one required environment variable. PORTKEY_BASE_URL defaults to the Portkey Admin API and PORTKEY_TOOL_DOMAINS is the optional allowlist; the HTTP binary adds its own host, port and auth variables. Launch it over stdio with npx and the published package. Most tools work with a workspace-scoped service key that has Select All permissions; 40 of them need an organisation-level scope that exists only on Portkey Enterprise plans and answer 403 elsewhere, which their descriptions state upfront. Context budget is worth planning: the complete catalog is roughly 387 KB, about 99K tokens, once a client pages through every page of tools/list — narrowing the domains cuts that roughly in proportion.

Setup effort

One command plus a key — PORTKEY_API_KEY=<YOUR_PORTKEY_API_KEY> npx -y portkey-admin-mcp