portkey-admin-mcp 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ENDPOINTS.md +29 -1
- package/README.md +11 -9
- package/build/index.js +1354 -950
- package/build/server.js +1354 -950
- package/docs/DISTRIBUTION.md +8 -7
- package/docs/PRISMA_AIRS_INTEROPERABILITY.md +34 -9
- package/package.json +14 -14
package/ENDPOINTS.md
CHANGED
|
@@ -6,7 +6,7 @@ Route mappings were reviewed against the official Portkey OpenAPI on 2026-09-08.
|
|
|
6
6
|
- Base URL: `https://api.portkey.ai/v1`
|
|
7
7
|
- Authentication: `x-portkey-api-key`
|
|
8
8
|
- Public catalog exception: `get_model_pricing` uses `https://api.portkey.ai` without authentication
|
|
9
|
-
- Total:
|
|
9
|
+
- Total: 194 tools across 22 domains
|
|
10
10
|
- Enterprise-gated names and counts are maintained in `src/tools/index.ts` and verified against README by `npm run verify:readme-tools`
|
|
11
11
|
|
|
12
12
|
The route lists are domain-level service routes. The tool tables are the complete
|
|
@@ -58,6 +58,34 @@ the public Portkey OpenAPI, so their contracts can change without a spec diff.
|
|
|
58
58
|
| `get_analytics_group_workspaces` | GET `/analytics/groups/workspaces` |
|
|
59
59
|
|
|
60
60
|
<!-- tool-catalog:start -->
|
|
61
|
+
## access-policies (5)
|
|
62
|
+
|
|
63
|
+
Routes:
|
|
64
|
+
|
|
65
|
+
- GET/POST `/policies/access`; GET/PUT/DELETE `/policies/access/{accessPolicyId}`
|
|
66
|
+
|
|
67
|
+
| Tool | Selection guidance and result |
|
|
68
|
+
|---|---|
|
|
69
|
+
| `create_access_policy` | Create a workspace access policy for users, groups, and agents targeting MCP tools or provider models. Changes who may access those targets. An omitted effect becomes deny only when both user ANY and agent ANY are present; otherwise allow, which requires a specific subject. Returns the policy UUID; use get_access_policy before later updates. |
|
|
70
|
+
| `list_access_policies` | Inspect active workspace access policies, newest first, without changing permissions. Filter by subject, MCP server, effect, enabled state, or creation time. Returns total and the current page of policy summaries with versions; use get_access_policy for complete subjects and targets. |
|
|
71
|
+
| `get_access_policy` | Read one access policy's complete subjects, targets, effect, and current version. Use this before update_access_policy so replacement lists and optimistic concurrency use the latest state. Returns policy details; a missing policy returns HTTP 404. |
|
|
72
|
+
| `update_access_policy` | Replace an access policy's complete subjects and targets, changing access permissions. Requires the current version from get_access_policy; a stale version returns HTTP 409 without retrying. Omitted name, description, effect, and enabled retain their stored values. Returns Portkey's acknowledgement; reread before retrying a conflict. |
|
|
73
|
+
| `delete_access_policy` | Delete an access policy by UUID, removing its allow or deny rule and changing access permissions. This cannot be undone by this tool. Inspect get_access_policy first; returns Portkey's acknowledgement, or HTTP 404 when the policy is missing. |
|
|
74
|
+
|
|
75
|
+
## egress-allowlist (5)
|
|
76
|
+
|
|
77
|
+
Routes:
|
|
78
|
+
|
|
79
|
+
- GET/POST `/egress-allowlist`; GET/PUT/DELETE `/egress-allowlist/{egressAllowlistId}`. Uses the `/v2` base: hosted `/v1` returns the inference gateway fallback, while `/v2` reaches the organisation permission check; the public OpenAPI still lists `/v1`.
|
|
80
|
+
|
|
81
|
+
| Tool | Selection guidance and result |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `list_egress_allowlist` | Inspect the organisation's trusted custom-host egress allowlist without changing destinations. Returns total and the current page of entries; filter by domain before creating duplicates, and use get_egress_allowlist_entry to inspect one entry. Requires organisation permission. |
|
|
84
|
+
| `create_egress_allowlist_entry` | Trust a custom hostname, IP literal, or wildcard for organisation egress, widening permitted outbound destinations. Use list_egress_allowlist to inspect existing trust first. Portkey rejects metadata destinations and duplicates. Returns the new UUID and normalized domain; requires organisation permission. |
|
|
85
|
+
| `get_egress_allowlist_entry` | Read one organisation egress allowlist entry's trusted domain, description, and audit fields. Use this before changing or deleting a destination. Returns entry details, or HTTP 404 if it is missing; requires organisation permission. |
|
|
86
|
+
| `update_egress_allowlist_entry` | Change an organisation egress allowlist domain or description, potentially changing trusted outbound destinations. Inspect get_egress_allowlist_entry first. Omitted fields stay unchanged; description null clears it. At least one changed field is required. Returns Portkey's acknowledgement; requires organisation permission. |
|
|
87
|
+
| `delete_egress_allowlist_entry` | Remove an organisation egress allowlist entry, revoking trust in its outbound destination and potentially breaking integrations that use it. Inspect get_egress_allowlist_entry first. Deletion cannot be undone by this tool. Returns Portkey's acknowledgement or HTTP 404; requires organisation permission. |
|
|
88
|
+
|
|
61
89
|
## users (10)
|
|
62
90
|
|
|
63
91
|
Routes:
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h1>Portkey Admin MCP Server</h1>
|
|
6
6
|
|
|
7
|
-
**The [Portkey](https://portkey.ai/) Admin API as an MCP server —
|
|
7
|
+
**The [Portkey](https://portkey.ai/) Admin API as an MCP server — 194 tools across prompts, configs, keys, analytics, governance, deployments, and more.**
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<hr>
|
|
33
33
|
|
|
34
34
|
> [!IMPORTANT]
|
|
35
|
-
> **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
|
|
35
|
+
> **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 a `PORTKEY_BASE_URL` swap. See the short [Prisma AIRS interoperability guide](./docs/PRISMA_AIRS_INTEROPERABILITY.md) for the supported side-by-side model and adapter criteria.
|
|
36
36
|
|
|
37
37
|
<h2 align="center">Contents</h2>
|
|
38
38
|
|
|
@@ -96,7 +96,7 @@ npx -y portkey-admin-mcp
|
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
Scoping domains is also the biggest lever on context cost, not just access. `tools/list`
|
|
99
|
-
is paginated, and the complete
|
|
99
|
+
is paginated, and the complete 194-tool catalog is roughly 400 KB once a
|
|
100
100
|
client follows `nextCursor` through every page. Narrowing to the domains a client
|
|
101
101
|
actually needs cuts that roughly proportionally.
|
|
102
102
|
|
|
@@ -146,6 +146,8 @@ Then use this config:
|
|
|
146
146
|
| **MCP Integrations** | 10 | External MCP tool integrations |
|
|
147
147
|
| **MCP Servers** | 12 | MCP server registry, capabilities, and live connections |
|
|
148
148
|
| **Guardrails** | 14 | LLM and MCP-tool policies, server mappings, organisation defaults, workspace exclusions |
|
|
149
|
+
| **Access Policies** | 5 | Allow/deny users, groups, and agents access to MCP tools and provider models |
|
|
150
|
+
| **Egress Allowlist** | 5 | Organisation trust for custom outbound hosts |
|
|
149
151
|
| **Usage Limits** | 7 | Cost and token consumption limits |
|
|
150
152
|
| **Rate Limits** | 5 | Request frequency controls |
|
|
151
153
|
| **Analytics** | 25 | Cost, latency, errors, tokens, cache, feedback, provider, MCP, A2A, and workspace groups |
|
|
@@ -154,7 +156,7 @@ Then use this config:
|
|
|
154
156
|
| **Users & Workspaces** | 24 | User management, invites, workspace members, SCIM group mappings |
|
|
155
157
|
| **Audit** | 1 | Audit log access |
|
|
156
158
|
|
|
157
|
-
**
|
|
159
|
+
**194 tools total across 22 tool domains.** See [ENDPOINTS.md](./ENDPOINTS.md) for the full list with descriptions.
|
|
158
160
|
|
|
159
161
|
Portkey's newer product language increasingly presents provider credentials as
|
|
160
162
|
Providers, while the current Admin API still exposes both `/virtual-keys` and
|
|
@@ -237,7 +239,7 @@ For local-only HTTP use, leave `MCP_HOST` at its default `127.0.0.1`. Set `MCP_H
|
|
|
237
239
|
| `PORTKEY_BASE_URL` | `https://api.portkey.ai/v1` | Portkey Admin API base URL. Prisma AIRS/SCM URLs are not compatible; credentialed requests never auto-follow redirects |
|
|
238
240
|
| `PORTKEY_ALLOW_PRIVATE_BASE_URL` | — | Set to `true` to allow a literal loopback/private `PORTKEY_BASE_URL` |
|
|
239
241
|
| `PORTKEY_ALLOW_INSECURE_HTTP` | — | Separately set to `true` only when a trusted self-hosted gateway cannot use HTTPS |
|
|
240
|
-
| `PORTKEY_TOOL_DOMAINS` | — | Server-side allowlist of the
|
|
242
|
+
| `PORTKEY_TOOL_DOMAINS` | — | Server-side allowlist of the 22 domains: `users`, `workspaces`, `configs`, `deployments`, `keys`, `collections`, `prompts`, `analytics`, `guardrails`, `limits`, `audit`, `labels`, `partials`, `tracing`, `logging`, `providers`, `secret-references`, `integrations`, `mcp-integrations`, `mcp-servers`, `access-policies`, `egress-allowlist`. HTTP `?tools=` may narrow it but cannot expand it |
|
|
241
243
|
| `MCP_TOOL_DOMAINS` | — | Fallback for `PORTKEY_TOOL_DOMAINS`, used only when that is unset |
|
|
242
244
|
| `MCP_TRANSPORT` | `stdio` | `stdio` or `http`; the Docker image picks its entrypoint from this (set `http` for the HTTP server) |
|
|
243
245
|
| `MCP_HOST` | `127.0.0.1` | Bind address |
|
|
@@ -267,7 +269,7 @@ For local-only HTTP use, leave `MCP_HOST` at its default `127.0.0.1`. Set `MCP_H
|
|
|
267
269
|
| `MCP_TLS_CERT_PATH` | — | TLS cert for native HTTPS |
|
|
268
270
|
| `MCP_TLS_CA_PATH` | — | Optional CA bundle for native HTTPS; only used when the TLS key and cert are set |
|
|
269
271
|
| `MCP_SHUTDOWN_TIMEOUT_MS` | `10000` | How long graceful shutdown waits before the process is forced to exit, in milliseconds; must be positive |
|
|
270
|
-
| `MCP_MAX_REQUEST_SIZE` | `1mb` | Maximum HTTP request body size |
|
|
272
|
+
| `MCP_MAX_REQUEST_SIZE` | `1mb` | Maximum HTTP request body size; tool arguments also have a fixed budget of 10,000 array elements and object members, counted across nested input |
|
|
271
273
|
| `MCP_READY_CHECK_MODE` | `local` | `local` or `portkey`; `portkey` makes `/ready` also check Portkey connectivity |
|
|
272
274
|
| `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error` |
|
|
273
275
|
| `ALLOWED_ORIGINS` | — | CORS allow-list; also used to validate the `Host` header (DNS-rebinding protection) when `MCP_AUTH_MODE=none` |
|
|
@@ -352,8 +354,8 @@ network errors, and response-contract failures still fail the run.
|
|
|
352
354
|
`PORTKEY_ORGANISATION_ID` is set. Set it to your organisation ID to exercise that route.
|
|
353
355
|
|
|
354
356
|
The required CI and release gates measure every TypeScript source file and fail
|
|
355
|
-
below 80% line coverage. The
|
|
356
|
-
|
|
357
|
+
below 80% line coverage. The CI and Coverage workflow reports show the current
|
|
358
|
+
line, branch, and function coverage.
|
|
357
359
|
|
|
358
360
|
`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`.
|
|
359
361
|
|
|
@@ -380,7 +382,7 @@ tool catalog in this repository as authoritative when a third-party index lags.
|
|
|
380
382
|
### Built With
|
|
381
383
|
|
|
382
384
|
[](https://www.typescriptlang.org/)
|
|
383
|
-
[](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
384
386
|
[](https://zod.dev/)
|
|
385
387
|
[](https://biomejs.dev/)
|
|
386
388
|
[](https://nodejs.org/)
|