Portkey MCP Server
Portkey MCP 服务器
将您的 AI 助手打造成 Portkey 平台专家!这款 MCP 服务器将 Claude 连接到 Portkey 的 API,从而实现对 AI 配置、工作区、分析和用户访问的全面管理。
安装
来自源
克隆此存储库
安装依赖项:
npm install复制示例环境文件:
cp .env.example .env将您的 Portkey API 密钥添加到
.env文件:
PORTKEY_API_KEY=your_portkey_api_key_here然后更新你的 Claude 配置文件:
{
"mcpServers": {
"portkey-server": {
"command": "node",
"args": [
"/path/to/portkey-server/build/index.js"
],
"env": {
"PORTKEY_API_KEY": "your_portkey_api_key_here"
}
}
}
}请确保:
将
/path/to/portkey-server替换为安装的实际路径在
env部分添加您的 Portkey API 密钥
更新配置后,重新启动 Claude Desktop 以使更改生效。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Portkey MCP 服务器:
npx -y @smithery/cli install @r-huijts/portkey-admin-mcp-server --client claudeRelated MCP server: jotae-mcp
真实用例
“我当前在不同模型中的 API 使用情况统计数据是什么?”
“向我展示我的 AI 部署的性能指标”
“为我的团队项目创建一个新的工作区”
“我当前的 API 密钥使用情况和剩余信用额度是多少?”
“生成上个月 API 调用的分析报告”
“为我的开发环境设置速率限制”
“为我的生产端点配置回退行为”
“将团队成员添加到我的 Portkey 工作区”
“显示我的 API 调用的延迟统计数据”
“为我的 API 请求设置自定义标头”
🔑 环境变量
多变的 | 描述 |
端口密钥 | 您的 Portkey API 密钥(必需) |
🌟 功能
该 MCP 服务器通过以下功能提供对 Portkey 平台的全面访问:
用户和访问管理
用户管理:列出并管理 Portkey 组织中的所有用户
用户邀请:邀请具有可自定义角色和权限的新用户
工作区访问:配置不同工作区的用户访问级别
基于角色的控制:在组织和工作区级别分配管理员、经理或成员角色
分析与报告
使用情况分析:跟踪详细的用户活动和请求模式
成本分析:监控和分析不同时间段的成本
请求指标:查看请求计数、令牌使用情况和响应时间
过滤报告:根据状态代码、虚拟键和时间范围等自定义条件生成报告
工作区管理
工作区概览:列出并查看所有工作区的详细信息
配置管理:访问和审查工作区配置
虚拟密钥管理:使用限制和速率限制来监控和管理 API 密钥
工作区设置:查看和跟踪工作区元数据和用户关联
配置和 API 设置
配置列表:查看组织中所有可用的配置
详细配置信息:访问缓存设置、重试策略和路由策略
虚拟密钥详细信息:监控密钥状态、使用限制和速率限制
API 集成:跟踪 API 端点及其配置
执照
该项目已获得 ISC 许可 - 详情请参阅 LICENSE 文件
Available Tools
9 toolsget_configC
Retrieve detailed information about a specific configuration, including cache settings, retry policies, and routing strategy
Inputs: slug (required).
get_cost_analyticsC
Retrieve detailed cost analytics data over time, including total costs and averages per request
Inputs: time_of_generation_min (required), time_of_generation_max (required), total_units_min, total_units_max, +17 more.
get_user_statsC
Retrieve detailed analytics data about user activity within a specified time range, including request counts and costs
Inputs: time_of_generation_min (required), time_of_generation_max (required), total_units_min, total_units_max, +5 more.
get_workspaceA
Retrieve detailed information about a specific workspace, including its configuration, metadata, and user access details
Inputs: workspace_id (required).
invite_userB
Invite a new user to your Portkey organization with specific workspace access and API key permissions
Inputs: email (required), role (required), workspaces (required), first_name, +2 more.
list_all_usersB
List all users in your Portkey organization, including their roles and account details
Inputs: no named parameters.
list_configsB
Retrieve all configurations in your Portkey organization, including their status and workspace associations
Inputs: no named parameters.
list_virtual_keysB
Retrieve all virtual keys in your Portkey organization, including their usage limits, rate limits, and status
Inputs: no named parameters.
list_workspacesA
Retrieve all workspaces in your Portkey organization, including their configurations and metadata
Inputs: page_size, current_page.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Every tool has a clearly distinct purpose targeting different resources and actions, with no overlap in functionality. For example, get_config retrieves a specific configuration, list_configs lists all configurations, and invite_user handles user invitations, making misselection unlikely.
All tool names follow a consistent verb_noun pattern using snake_case, such as get_config, list_configs, and invite_user. This predictability makes it easy for agents to understand and use the tools without confusion.
With 9 tools, the server is well-scoped for managing a Portkey organization, covering configurations, users, workspaces, analytics, and keys. Each tool earns its place by addressing specific needs without being excessive or insufficient.
The toolset provides strong coverage for retrieval, listing, and user management, but lacks update or delete operations for resources like configurations or workspaces. Agents can work around this by using existing tools, but it's a minor gap in lifecycle coverage.
Related MCP Connectors
Connect Claude to your store, your WhatsApp and your ads.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
- platform7nDeprecatedtech.p7n
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude, Cursor, or any MCP client to your FlowContent account
Related MCP Servers
- AlicenseBqualityDmaintenanceConnects Claude to WordPress sites through the REST API, enabling AI-assisted content creation, publishing, media management, user administration, and site maintenance tasks through natural language.4723MIT
- AlicenseBqualityDmaintenanceConnects Claude to Jotae for creating events, configuring WhatsApp and email automations, and reading metrics through natural language.21MIT
- AlicenseAqualityDmaintenanceConnects Claude to Open WebUI, enabling chat management, RAG knowledge bases, files, functions, and prompts directly from Claude.2692 npm2MIT
- AlicenseNot gradedqualityCmaintenanceConnects Claude to the WhatConverts API, enabling management of leads, accounts, profiles, tracking numbers, and recordings through natural language.1MIT