
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 分