1. Conduid
  2. Healthcare
  3. io.github.s-b-e-n-s-o-n/portkey-admin-mcp
MCP server · Healthcare

io.github.s-b-e-n-s-o-n/portkey-admin-mcp

Full Portkey Admin API MCP server with 116 tools for prompts, analytics, governance, and more

Unclaimed healthcare
37Low

Scored 6 months ago · breakdown

About io.github.s-b-e-n-s-o-n/portkey-admin-mcp

io.github.s-b-e-n-s-o-n/portkey-admin-mcp is an MCP server in the Healthcare category: full Portkey Admin API MCP server with 116 tools for prompts, analytics, governance, and more.

Install

Claude Code
claude mcp add io-github-s-b-e-n-s-o-n-portkey-admin-mcp -- npx -y portkey-admin-mcp
npx
npx -y portkey-admin-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about io.github.s-b-e-n-s-o-n/portkey-admin-mcp

Powered by Claude · Grounded in docs

I know everything about io.github.s-b-e-n-s-o-n/portkey-admin-mcp. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Portkey Admin MCP Server

MCP server for the Portkey Admin API. Manage prompts, configs, analytics, API keys, and more from any MCP client.


Quick Start

You need a Portkey API key with appropriate scopes. Get one from your Portkey dashboard under API Keys.

Claude Code

claude mcp add -e PORTKEY_API_KEY=your_key portkey-admin -- npx -y portkey-admin-mcp

Cursor / Windsurf / VS Code

Add to your MCP config (.cursor/mcp.json, .windsurf/mcp.json, or .vscode/mcp.json):

{
  "mcpServers": {
    "portkey-admin": {
      "command": "npx",
      "args": ["-y", "portkey-admin-mcp"],
      "env": {
        "PORTKEY_API_KEY": "your_api_key"
      }
    }
  }
}

Run directly

PORTKEY_API_KEY=your_key npx -y portkey-admin-mcp

To expose only a focused subset of tools in stdio clients, set PORTKEY_TOOL_DOMAINS:

PORTKEY_API_KEY=your_key \
PORTKEY_TOOL_DOMAINS=prompts,analytics \
npx -y portkey-admin-mcp
git clone https://github.com/s-b-e-n-s-o-n/portkey-admin-mcp.git
cd portkey-admin-mcp
npm install && npm run build

Then use this config:

{
  "mcpServers": {
    "portkey-admin": {
      "command": "node",
      "args": ["/path/to/portkey-admin-mcp/build/index.js"],
      "env": {
        "PORTKEY_API_KEY": "your_api_key"
      }
    }
  }
}

What You Can Do

Category Tools Examples
Prompts 14 Create, version, render, execute, migrate, promote prompts
Prompt Partials 7 Reusable prompt fragments with versioning
Prompt Labels 5 Organize prompt versions (production, staging, dev)
Configs 6 Gateway routing, caching, retry, loadbalancing
API Keys 5 Create and manage scoped API keys
Virtual Keys 5 Manage provider access keys
Collections 5 Group prompts by app or project
Providers 5 Manage AI provider configurations
Integrations 10 Provider integrations, models, workspace access
MCP Integrations 10 External MCP tool integrations
MCP Servers 10 MCP server registry and capabilities
Guardrails 5 Content safety policies
Usage Limits 7 Cost and token consumption limits
Rate Limits 5 Request frequency controls
Analytics 20 Cost, latency, errors, tokens, cache, feedback
Logging 8 Log ingestion and export
Tracing 2 Feedback creation and updates on traces
Users & Workspaces 20 User management, invites, workspace members
Audit 1 Audit log access

150 tools total. See ENDPOINTS.md for the full list with descriptions.


API Key Scopes

Most tools work with a workspace-scoped service key that has Select All permissions enabled. That covers prompts, configs, virtual/API keys, providers, guardrails, workspace integrations, MCP servers, rate/usage limits, logs, prompt completions, and workspace user management.

Enterprise-gated tools (28)

The following tools require an organisation-level scope that is only available on Portkey Enterprise plans. They return 403 You do not have enough permissions to execute this request on workspace plans. Their descriptions include an Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. suffix so MCP clients know upfront.

Area Tools Required scope
Analytics (20) get_cost_analytics, get_request_analytics, get_token_analytics, get_latency_analytics, get_error_analytics, get_error_rate_analytics, get_cache_hit_latency, get_cache_hit_rate, get_users_analytics, get_error_stacks_analytics, get_error_status_codes_analytics, get_user_requests_analytics, get_rescued_requests_analytics, get_feedback_analytics, get_feedback_models_analytics, get_feedback_scores_analytics, get_feedback_weighted_analytics, get_analytics_group_users, get_analytics_group_models, get_analytics_group_metadata org-level analytics.view
Audit list_audit_logs audit_logs.list
Org-level integrations get_integration, list_integration_models, list_integration_workspaces organisation_integrations.read
Org-level users list_all_users, get_user, get_user_stats, list_user_invites organisation_users.list / organisation_users.read

Other scope requirements

Feature Required
Prompt completions (run_prompt_completion) completions.write scope + billing metadata (app, env)
Org-level service API key creation via create_api_key organisation_service_api_keys.create (Enterprise)

If a tool returns a 403 with Portkey error AB03, it means missing scopes — not a broken endpoint.


HTTP Server (Experimental)

Status: The HTTP transport works but hosted deployment is not fully validated for production. Use stdio (npx) for reliable operation.

The server supports Streamable HTTP for remote access:

PORTKEY_API_KEY=your_key \
MCP_HOST=127.0.0.1 \
MCP_PORT=3000 \
MCP_PUBLIC_BASE_URL=https://mcp.example.com \
MCP_AUTH_MODE=bearer \
MCP_AUTH_TOKEN=your_secret \
node build/server.js

Or via npx (the portkey-admin-mcp package includes the HTTP binary):

PORTKEY_API_KEY=your_key MCP_AUTH_MODE=bearer MCP_AUTH_TOKEN=your_secret \
  npx -y -p portkey-admin-mcp portkey-admin-mcp-http

For local-only HTTP use, leave MCP_HOST at its default 127.0.0.1. Set MCP_HOST=0.0.0.0 only when you intentionally need to accept connections from outside the local machine, such as Docker or a reverse proxy on another interface.

Configuration

Variable Default Description
PORTKEY_API_KEY (required) Your Portkey API key
PORTKEY_TOOL_DOMAINS — Optional comma-separated stdio/HTTP default tool subset, e.g. prompts,analytics
MCP_HOST 127.0.0.1 Bind address
MCP_PORT 3000 Port
MCP_PUBLIC_BASE_URL — Public absolute base URL to advertise from /auth/info and the status page; recommended for hosted deployments
MCP_AUTH_MODE none none, bearer, or clerk (none is blocked for HTTP unless explicitly overridden)
MCP_AUTH_TOKEN — Secret for bearer auth
MCP_ALLOW_UNAUTHENTICATED_HTTP — Set to true only for intentional local unauthenticated HTTP debugging
MCP_SESSION_MODE stateful stateful or stateless
MCP_MAX_SESSIONS 100 Maximum concurrent stateful MCP sessions before new initialize requests are rejected
MCP_EVENT_STORE off off, memory, or redis
MCP_REDIS_URL — Redis URL for shared event store
MCP_TLS_KEY_PATH — TLS key for native HTTPS
MCP_TLS_CERT_PATH — TLS cert for native HTTPS
ALLOWED_ORIGINS — CORS allow-list
MCP_TRUST_PROXY false Trust proxy headers (for reverse proxies)
RATE_LIMIT_MAX_BUCKETS 10000 Maximum distinct in-memory rate-limit buckets before new clients share an overflow bucket

Experimental Vercel support is included. See docs/VERCEL_DEPLOYMENT.md for setup instructions.

Key points:

  • Uses stateless mode with Redis event store
  • Requires Clerk or bearer auth
  • Leave MCP_TLS_* unset (Vercel terminates HTTPS)
  • Set MCP_PUBLIC_BASE_URL to your deployment URL so advertised MCP endpoints never depend on request headers
  • Vercel does not support WebSockets — Streamable HTTP/SSE only
docker build -t portkey-admin-mcp .
docker run \
  -e PORTKEY_API_KEY=your_key \
  -e MCP_HOST=0.0.0.0 \
  -e MCP_PORT=3000 \
  -e MCP_AUTH_MODE=bearer \
  -e MCP_AUTH_TOKEN=your_secret \
  -p 3000:3000 \
  portkey-admin-mcp

Health Endpoints

Path Purpose
GET /health Server liveness
GET /ready Readiness (includes optional Portkey connectivity check)
GET /auth/info Auth configuration metadata

Development

npm run dev           # stdio with hot reload
npm run dev:http      # HTTP with hot reload
npm test              # unit + contract tests
npm run test:e2e      # MCP protocol tests
npm run test:http     # HTTP endpoint smoke test
npm run ci            # full pipeline (lint + typecheck + test + build + e2e + verify)

npm run dev:http now requires MCP_AUTH_MODE=bearer or MCP_AUTH_MODE=clerk by default. For deliberate local-only unauthenticated testing, set MCP_ALLOW_UNAUTHENTICATED_HTTP=true.


MIT License · Inspired by r-huijts/portkey-admin-mcp-server

↑ Back to top

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About io.github.s-b-e-n-s-o-n/portkey-admin-mcp

How do I install io.github.s-b-e-n-s-o-n/portkey-admin-mcp?

Run claude mcp add io-github-s-b-e-n-s-o-n-portkey-admin-mcp -- npx -y portkey-admin-mcp, then add the server to your MCP client's configuration.

Is io.github.s-b-e-n-s-o-n/portkey-admin-mcp safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is io.github.s-b-e-n-s-o-n/portkey-admin-mcp still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.