
Portkey Admin Mcp
io.github.s-b-e-n-s-o-n由 GitHub 账号 s-b-e-n-s-o-n 发布v0.3.4更新于 Oct 28, 2026
Full Portkey Admin API MCP server — configs, prompts, keys, analytics, and more.
概览
Portkey Admin API 的 MCP 服务器,提供 194 个工具,覆盖提示词、配置、API 密钥、护栏、分析与工作区管理。
- 可以做什么
- 创建、版本化、渲染、执行与提升提示词,并管理片段、标签和集合
- 管理网关配置、部署、提供商、虚拟密钥与 API 密钥
- 管理护栏、访问策略、出站白名单、用量与速率限制
- 查询成本、延迟、令牌、错误、缓存与反馈等分析数据,读取日志与审计记录
- 管理用户、工作区、邀请、SCIM 映射、集成与 MCP 服务器注册
- 适用场景
- 适合需要管理 Portkey AI 网关的场景:让助手在对话中查看或修改提示词、路由配置、密钥、护栏与用量数据。若只需少数领域,建议收窄暴露的工具域,因为完整工具目录体积较大。
- 运行要求
- 通过 npx 以 stdio 在本地运行(需 Node.js),或从源码构建后运行。需要具备相应权限范围的 Portkey API 密钥,放在 PORTKEY_API_KEY 中;PORTKEY_BASE_URL 可指向自建网关。可选 PORTKEY_TOOL_DOMAINS 限定暴露的工具域。需要能访问 Portkey Admin 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:
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
is paginated, and the complete 194-tool catalog is roughly 400 KB once a
client follows nextCursor through every page. 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,提交 c523690
工具
0版本历史
1- v0.3.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分