
Portkey Admin Mcp
io.github.CodesWhat由 GitHub 账号 CodesWhat 发布v0.16.5更新于 Nov 19, 2026
Portkey Admin API control-plane MCP server with Prisma AIRS interoperability guidance.
概览
把 Portkey Admin API 封装为 194 个工具,让助手管理提示词、网关配置、密钥、护栏、分析与工作区。
- 可以做什么
- 创建、版本化、渲染、执行和晋升提示词、片段、标签与集合
- 管理网关配置、提供商、虚拟密钥、API 密钥与密钥引用
- 管理 MCP 服务器、MCP 集成、护栏、访问策略与出站白名单
- 设置用量与速率限制,读取成本、延迟、令牌、错误与反馈分析
- 检索与导出日志,管理用户、工作区与 SCIM 映射,并读取审计日志
- 适用场景
- 当你负责管理 Portkey AI 网关,希望助手在对话中直接查看或修改提示词、路由配置、凭据、护栏或用量数据时使用。若只需少数领域,可收窄暴露的工具域。
- 运行要求
- 通过 npx(Node.js)或源码在本地以 stdio 运行。需要具备相应权限范围的 Portkey API 密钥,放在 PORTKEY_API_KEY;多数工具需要启用 Select All 权限的工作区级服务密钥。可选 PORTKEY_BASE_URL 与 PORTKEY_TOOL_DOMAINS。需能访问 Portkey API 网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Portkey Admin Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Portkey Admin MCP Server
The Portkey Admin API as an MCP server — 194 tools across prompts, configs, keys, analytics, governance, deployments, and more.
[npm version] [Node.js] [License: MIT]
[CI] [OpenSSF Scorecard] [OpenSSF Best Practices] [Maintainability] [Code Coverage]
[npm downloads] [Mentioned in Awesome MCP Servers] [MCP Registry] [Sponsor]
[!IMPORTANT] Active compatibility development. Palo Alto Networks completed its Portkey acquisition on 2026‑05‑29 and now presents Portkey as the core of Prisma AIRS AI Gateway. The Portkey Admin API remains live, and its official OpenAPI and product changelog continued adding control-plane surfaces through October 2026; this project has therefore resumed API-coverage work. It targets the Portkey-compatible API (
x-portkey-api-key), not Prisma AIRS/Strata Cloud Manager directly. Palo Alto now publishes a Prisma AIRS management specification, but it uses different authentication, multiple management bases, and a smaller domain set, so it is not aPORTKEY_BASE_URLswap. See the short Prisma AIRS interoperability guide for the supported side-by-side model and adapter criteria.
Contents
- Documentation
- Quick Start
- What You Can Do
- API Key Scopes
- HTTP Server (Experimental)
- Architecture
- Distribution and directories
- Prisma AIRS interoperability
- Verify a release
- Development
- Roadmap
- Community
- Star History
- Built With
- Contributing
- Governance
- Security assurance
- Full tool list — ENDPOINTS.md
Documentation
Quick Start
You need a Portkey API key with appropriate scopes. Get one from your Portkey dashboard under API Keys.
Version 0.15.0 uses MCP SDK v2 and serves protocol revision 2026-07-28 and
older clients on the same endpoint. It retires HTTP sessions and replay;
obsolete settings warn and are ignored. See
compatibility and deprecations before upgrading from 0.14.x.
Claude Code
Cursor / Windsurf
Add to your MCP config (Cursor: .cursor/mcp.json or ~/.cursor/mcp.json; Windsurf: ~/.codeium/windsurf/mcp_config.json):
VS Code
VS Code's .vscode/mcp.json uses a top-level servers key and needs a type:
VS Code caps a single chat request at 128 enabled tools, and this server exposes 194.
Set PORTKEY_TOOL_DOMAINS in the server's env (for example "PORTKEY_TOOL_DOMAINS": "prompts,analytics") to narrow the set below that limit.
Run directly
To expose only a focused subset of tools in stdio clients, set PORTKEY_TOOL_DOMAINS:
Scoping domains is also the biggest lever on context cost, not just access. tools/list
returns every tool in a single response with no nextCursor, and the complete
194-tool catalog is roughly 500 KB of JSON. Narrowing to the domains a client
actually needs cuts that roughly proportionally.
Build from source
Then use this config:
What You Can Do
194 tools total across 22 tool domains. See ENDPOINTS.md for the full list with descriptions.
Portkey's newer product language increasingly presents provider credentials as
Providers, while the current Admin API still exposes both /virtual-keys and
/providers. This server keeps both domains: Virtual Keys manage provider access
credentials, and Providers manage workspace provider configurations.
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.
If a tool returns a 403 with Portkey error AB03, it means missing scopes — not a broken endpoint.
Enterprise-gated tools and other scope requirements
Enterprise-gated tools (56)
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.
Other scope requirements
HTTP Server (Experimental)
Status: The HTTP transport works locally and is covered by the integration test suite, but it is a proof of concept — there is no hosted version of this server, and hosted deployment is not currently a goal. Use stdio (npx) as the supported transport.
The server supports Streamable HTTP for remote access:
HTTP authentication controls access to the server, but it does not impersonate
separate Portkey tenants. All authenticated principals use the same configured
PORTKEY_API_KEY and can invoke any enabled tool and scope that credential
grants. Run separate instances or deployments with separately scoped Portkey
credentials and PORTKEY_TOOL_DOMAINS allowlists for different trust levels.
Or via npx (the portkey-admin-mcp package includes the HTTP binary):
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.
Full environment variable reference
Production containers must choose their rate-limit topology explicitly: set
RATE_LIMIT_STORE=redis for multi-instance deployments, or set
RATE_LIMIT_SINGLE_PROCESS=true only for a single long-lived process.
Vercel deployment
Vercel support is kept as a reference proof of concept — we do not run a hosted deployment. See docs/VERCEL_DEPLOYMENT.md if you want to self-deploy.
Key points:
- Uses stateless request handling and a shared atomic Redis rate limiter (SDK v2); GET replay is retired
- Requires Clerk or bearer auth
- Leave
MCP_TLS_*unset (Vercel terminates HTTPS) - Set
MCP_PUBLIC_BASE_URLto your deployment URL so advertised MCP endpoints never depend on request headers - Vercel does not support WebSockets — Streamable HTTP/SSE only
Docker
This example runs one long-lived container with in-memory rate limiting. Use
RATE_LIMIT_STORE=redis and a TLS Redis URL for multiple instances.
Health Endpoints
Development
The live smoke suite reports expected credential-scope denials and the explicitly tracked hosted control-plane route gaps as skips. Unexpected HTTP responses, network errors, and response-contract failures still fail the run.
list_audit_logs is Enterprise-only, so the smoke suite skips its check unless
PORTKEY_ORGANISATION_ID is set. Set it to your organisation ID to exercise that route.
The required CI and release gates measure every TypeScript source file and fail below 80% line coverage. The CI and Coverage workflow reports show the current line, branch, and function coverage.
The CI workflow
also runs the standalone Qlty CLI and publishes quality-reports artifacts for
each analyzed commit, including lint/security results, duplication, complexity,
and metrics. The Qlty maintainability badge remains Cloud-generated; local
analysis does not update it. Coverage is reported through Codecov, not Qlty,
and the Coverage workflow uploads it on every PR and on pushes to main and codex/**.
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.
Contributions use pull requests and the checks documented in
CONTRIBUTING.md. Project decisions and maintainer roles are
documented in GOVERNANCE.md. Report vulnerabilities through
SECURITY.md, and see SECURITY-ASSURANCE.md
for the public threat model and assurance case.
Roadmap
Release 0.15.0 moves to MCP SDK v2 and the 2026-07-28 spec. The roadmap separates completed work from upstream contract and tenant-verification gates. The MCP v2 migration shipped in 0.15.0 and keeps older clients on the same endpoint while retiring session and replay storage. See compatibility and deprecations.
Community
Questions and bug reports belong in Issues; broader discussion, ideas, and help using the server belong in Discussions.
The maintained package, registry, marketplace, and directory records are listed in Distribution and directories. Treat the generated tool catalog in this repository as authoritative when a third-party index lags.
Star History
[Star History chart for CodesWhat/portkey-admin-mcp]Built With
[TypeScript] [MCP SDK] [Zod 4] [Biome] [Node 24 | 26] [Anthropic]
[SemVer] [Conventional Commits] [Keep a Changelog]
Marketplace listings on LobeHub and Glama:
[portkey-admin-mcp MCP server]
MIT License · Inspired by r-huijts/portkey-admin-mcp-server
[CodesWhat]CodesWhat: small, sharp tools from one developer and a lot of agents.
来源:README.md,提交 09f9d05
工具
0版本历史
10- v0.16.5最新Nov 19, 2026
- v0.16.4Nov 14, 2026
- v0.16.3Nov 3, 2026
- v0.16.0Oct 30, 2026
- v0.15.2Oct 29, 2026
- v0.15.0Oct 26, 2026
- v0.14.0Oct 16, 2026
- v0.13.0Oct 3, 2026
- v0.12.1Oct 2, 2026
- v0.12.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分