portkey-admin-mcp

portkey-admin-mcp

MCP server for Portkey Admin API - 116 tools for prompts, configs, analytics & more.

Category
Visit Server

README

<div align="center">

Portkey Admin MCP Server

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=FFFFFF&center=true&vCenter=true&width=500&lines=116+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server"> <source media="(prefers-color-scheme: light)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000&center=true&vCenter=true&width=500&lines=116+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server"> <img src="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000&center=true&vCenter=true&width=500&lines=116+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server" alt="Typing SVG"> </picture>

MCP server for Portkey Admin API. 116 tools for prompts, configs, analytics & more.

</div>

<p align="center"> <a href="https://www.npmjs.com/package/portkey-admin-mcp"><img src="https://img.shields.io/npm/v/portkey-admin-mcp.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/portkey-admin-mcp"><img src="https://img.shields.io/npm/dm/portkey-admin-mcp" alt="npm downloads"></a> <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="Node.js"></a> <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.9-blue.svg" alt="TypeScript"></a> <a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-1.0-purple.svg" alt="MCP"></a> </p>

<p align="center"> <a href="https://github.com/s-b-e-n-s-o-n/portkey-admin-mcp/stargazers"><img src="https://img.shields.io/github/stars/s-b-e-n-s-o-n/portkey-admin-mcp" alt="GitHub stars"></a> <a href="https://github.com/s-b-e-n-s-o-n/portkey-admin-mcp/issues"><img src="https://img.shields.io/github/issues/s-b-e-n-s-o-n/portkey-admin-mcp" alt="GitHub issues"></a> <a href="https://github.com/s-b-e-n-s-o-n/portkey-admin-mcp/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a> <a href="https://github.com/s-b-e-n-s-o-n/portkey-admin-mcp/commits"><img src="https://img.shields.io/github/last-commit/s-b-e-n-s-o-n/portkey-admin-mcp" alt="Last Commit"></a> </p>

<p align="center"> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="./ENDPOINTS.md"><img src="https://img.shields.io/badge/docs-ENDPOINTS.md-blue" alt="Docs"></a> <a href="https://github.com/sponsors/s-b-e-n-s-o-n"><img src="https://img.shields.io/badge/sponsor-GitHub_Sponsors-ea4aaa?logo=githubsponsors&logoColor=fff" alt="Sponsor"></a> </p>

<p align="center"> <a href="https://registry.modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP_Registry-io.github.s--b--e--n--s--o--n%2Fportkey--admin--mcp-blue?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=" alt="MCP Registry"></a> <a href="https://smithery.ai/server/@s-b-e-n-s-o-n/portkey-admin-mcp"><img src="https://smithery.ai/badge/@s-b-e-n-s-o-n/portkey-admin-mcp" alt="Smithery"></a> </p>

<p align="center"> <a href="https://glama.ai/mcp/servers/@s-b-e-n-s-o-n/portkey-admin-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@s-b-e-n-s-o-n/portkey-admin-mcp/badge" alt="Portkey Admin MCP server" /> </a> </p>


๐Ÿ“‘ Contents


๐Ÿš€ Quick Start

Installation Methods

Method Type Setup
Smithery Hosted One-click install, no local setup
Glama Hosted One-click install via Glama
npm Local npx -y portkey-admin-mcp
Docker Self-hosted docker pull or build from source

<details> <summary><strong>๐Ÿ“ฆ npx / Claude Desktop Config</strong></summary>

Add to ~/.claude/claude_desktop_config.json:

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

Restart Claude Desktop.

</details>

<details> <summary><strong>๐Ÿ”จ Build from source</strong></summary>

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": {
      "command": "node",
      "args": ["/path/to/portkey-admin-mcp/build/index.js"],
      "env": {
        "PORTKEY_API_KEY": "your_api_key"
      }
    }
  }
}

</details>


โœจ Features

<table> <tr> <td align="center" width="33%"> <h3>๐Ÿ“ Prompt Management</h3> Create, version, render & execute prompts </td> <td align="center" width="33%"> <h3>โšก Gateway Configs</h3> Loadbalancing, fallbacks, caching </td> <td align="center" width="33%"> <h3>๐Ÿ“Š Analytics</h3> Cost, latency, errors, feedback </td> </tr> <tr> <td align="center"> <h3>๐Ÿ›ก๏ธ Governance</h3> Rate limits, usage limits, guardrails </td> <td align="center"> <h3>๐Ÿ” Observability</h3> Logs, traces, audit trails </td> <td align="center"> <h3>๐Ÿ” Access Control</h3> Users, workspaces, API keys </td> </tr> </table>


๐Ÿ”ง Tools (116)

<details> <summary><strong>๐Ÿ‘ฅ User & Access</strong> (10 tools)</summary>

Tool Description
list_all_users List all users in organization
get_user Get user details
update_user Update user
delete_user Remove user
invite_user Invite a new user
list_user_invites List pending invites
get_user_invite Get invite details
delete_user_invite Cancel invite
resend_user_invite Resend invite email
get_user_stats Get user statistics

</details>

<details> <summary><strong>๐Ÿข Workspaces</strong> (10 tools)</summary>

Tool Description
list_workspaces List all workspaces
get_workspace Get workspace details
create_workspace Create workspace
update_workspace Update workspace
delete_workspace Delete workspace
add_workspace_member Add member to workspace
list_workspace_members List workspace members
get_workspace_member Get member details
update_workspace_member Update member role
remove_workspace_member Remove member

</details>

<details> <summary><strong>โš™๏ธ Configs</strong> (6 tools)</summary>

Tool Description
list_configs List gateway configs
get_config Get config details
create_config Create config
update_config Update config
delete_config Delete config
list_config_versions List config version history

</details>

<details> <summary><strong>๐Ÿ”‘ API & Virtual Keys</strong> (10 tools)</summary>

Tool Description
list_api_keys List API keys
create_api_key Create API key
get_api_key Get API key details
update_api_key Update API key
delete_api_key Delete API key
list_virtual_keys List virtual keys
create_virtual_key Create virtual key
get_virtual_key Get virtual key details
update_virtual_key Update virtual key
delete_virtual_key Delete virtual key

</details>

<details> <summary><strong>๐Ÿ“ Collections</strong> (5 tools)</summary>

Tool Description
list_collections List prompt collections
create_collection Create a collection
get_collection Get collection details
update_collection Update collection
delete_collection Delete collection

</details>

<details> <summary><strong>๐Ÿ“ Prompts</strong> (12 tools)</summary>

Tool Description
list_prompts List prompts
create_prompt Create a prompt template
get_prompt Get prompt details
update_prompt Update a prompt
delete_prompt Delete prompt
publish_prompt Publish prompt version
list_prompt_versions List version history
render_prompt Render prompt with variables
run_prompt_completion Execute prompt completion
migrate_prompt Create-or-update prompt
promote_prompt Promote prompt between environments
validate_completion_metadata Validate billing metadata

</details>

<details> <summary><strong>๐Ÿงฉ Prompt Partials</strong> (6 tools)</summary>

Tool Description
create_prompt_partial Create reusable partial
list_prompt_partials List partials
get_prompt_partial Get partial details
update_prompt_partial Update partial
delete_prompt_partial Delete partial
list_partial_versions List partial versions
publish_partial Publish partial version

</details>

<details> <summary><strong>๐Ÿท๏ธ Prompt Labels</strong> (5 tools)</summary>

Tool Description
create_prompt_label Create label
list_prompt_labels List labels
get_prompt_label Get label details
update_prompt_label Update label
delete_prompt_label Delete label

</details>

<details> <summary><strong>๐Ÿ›ก๏ธ Guardrails</strong> (5 tools)</summary>

Tool Description
list_guardrails List guardrails
create_guardrail Create guardrail
get_guardrail Get guardrail details
update_guardrail Update guardrail
delete_guardrail Delete guardrail

</details>

<details> <summary><strong>๐Ÿ“ Usage Limits</strong> (5 tools)</summary>

Tool Description
list_usage_limits List usage limits
create_usage_limit Create usage limit
get_usage_limit Get limit details
update_usage_limit Update limit
delete_usage_limit Delete limit

</details>

<details> <summary><strong>โฑ๏ธ Rate Limits</strong> (5 tools)</summary>

Tool Description
list_rate_limits List rate limits
create_rate_limit Create rate limit
get_rate_limit Get rate limit details
update_rate_limit Update rate limit
delete_rate_limit Delete rate limit

</details>

<details> <summary><strong>๐Ÿ“œ Audit</strong> (1 tool)</summary>

Tool Description
list_audit_logs List audit log entries

</details>

<details> <summary><strong>๐Ÿ“Š Analytics</strong> (20 tools)</summary>

Tool Description
get_cost_analytics Get cost analytics data
get_analytics_summary Get analytics summary
get_analytics_by_models Analytics by model
get_analytics_by_metadata Analytics by metadata
get_request_analytics Request analytics
get_token_analytics Token usage analytics
get_latency_analytics Latency analytics
get_error_analytics Error analytics
get_error_rate_analytics Error rate analytics
get_status_code_analytics Status code distribution
get_cache_analytics Cache analytics
get_feedback_analytics Feedback analytics
get_user_analytics Per-user analytics
get_cache_hit_latency Cache hit latency
get_cache_hit_rate Cache hit rate
get_feedback_per_model Feedback per model
get_feedback_score_distribution Score distribution
get_requests_per_user Requests per user
get_rescued_requests Rescued requests
get_weighted_feedback Weighted feedback

</details>

<details> <summary><strong>๐Ÿ“‹ Logging</strong> (8 tools)</summary>

Tool Description
insert_log Insert log entry
create_log_export Create log export
list_log_exports List exports
get_log_export Get export details
update_log_export Update export
start_log_export Start export job
cancel_log_export Cancel export
download_log_export Download export

</details>

<details> <summary><strong>๐Ÿ” Tracing</strong> (4 tools)</summary>

Tool Description
create_feedback Create feedback
update_feedback Update feedback
list_traces List traces
get_trace Get trace details

</details>

<details> <summary><strong>๐Ÿ”Œ Providers</strong> (5 tools)</summary>

Tool Description
list_providers List providers
create_provider Create provider
get_provider Get provider details
update_provider Update provider
delete_provider Delete provider

</details>

<details> <summary><strong>๐Ÿ”— Integrations</strong> (10 tools)</summary>

Tool Description
list_integrations List integrations
create_integration Create integration
get_integration Get integration details
update_integration Update integration
delete_integration Delete integration
list_integration_models List custom models
update_integration_models Update custom models
delete_integration_model Delete custom model
list_integration_workspaces List workspace access
update_integration_workspaces Update workspace access

</details>


๐Ÿ—๏ธ Architecture

sequenceDiagram
    participant Client as Client (Claude)
    participant Transport as MCP Transport<br/>(Stdio or HTTP)
    participant Server as MCP Server
    participant Facade as PortkeyService
    participant Domain as Domain Service<br/>(e.g., UsersService)
    participant API as Portkey API

    Client->>Transport: Tool invocation request
    Transport->>Server: Forward request
    Server->>Server: Parse tool name & params
    Server->>Facade: Call delegated method
    Facade->>Domain: Delegate to domain service
    Domain->>API: HTTP GET /users
    API-->>Domain: JSON response
    Domain-->>Facade: Return typed data
    Facade-->>Server: Return data
    Server-->>Transport: Tool result
    Transport-->>Client: Display result

๐Ÿšข Deployment

Transports

Transport Use Case Default
stdio Local CLI tools (Claude Code, Cursor) Yes
Streamable HTTP Remote clients, web, production -

Set via MCP_TRANSPORT=stdio|http environment variable.

HTTP Mode

MCP_TRANSPORT=http MCP_PORT=3000 node build/index.js

Exposes a single /mcp endpoint with session management via Mcp-Session-Id header.

Docker

docker build -t portkey-admin-mcp .
docker run -e PORTKEY_API_KEY=your_key -p 3000:3000 portkey-admin-mcp

Health Endpoints

  • GET /health - Server status
  • GET /ready - Portkey API connectivity check

โš ๏ธ Limitations

Enterprise Features

The following require a Portkey Enterprise plan with Admin API keys:

  • Analytics (cost, request, token, latency, error, cache, feedback)
  • Log exports
  • Audit logs
  • User management (list users, invites)
  • Provider creation

Known Issues

Some endpoints are pending Portkey API clarification:

Tool Status Issue
render_prompt 500 Server error - investigating
create_prompt_label 400 Request format unclear
create_usage_limit 400 Request format unclear
create_rate_limit 400 Request format unclear
list_traces 405 Endpoint path unclear

<div align="center">

Built With

TypeScript Node.js Zod


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

<a href="#portkey-admin-mcp-server">โ†‘ Back to top</a>

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.visitorbadge.io/api/visitors?path=s-b-e-n-s-o-n%2Fportkey-admin-mcp&label=Visitors&countColor=%23FFFFFF"> <source media="(prefers-color-scheme: light)" srcset="https://api.visitorbadge.io/api/visitors?path=s-b-e-n-s-o-n%2Fportkey-admin-mcp&label=Visitors&countColor=%23000000"> <img src="https://api.visitorbadge.io/api/visitors?path=s-b-e-n-s-o-n%2Fportkey-admin-mcp&label=Visitors&countColor=%23000000" alt="Visitors"> </picture>

</div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured