portkey-admin-mcp 0.12.2 → 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 +53 -15
- package/README.md +14 -12
- package/build/index.js +1454 -961
- package/build/server.js +1454 -961
- 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
|
|
@@ -14,6 +14,9 @@ MCP catalog and preserve the actual selection guidance exposed through
|
|
|
14
14
|
`tools/list`. A tool can perform a workflow across several listed routes rather
|
|
15
15
|
than mapping one-to-one to one HTTP endpoint.
|
|
16
16
|
|
|
17
|
+
Routes marked "undocumented upstream" are called by this server but are not in
|
|
18
|
+
the public Portkey OpenAPI, so their contracts can change without a spec diff.
|
|
19
|
+
|
|
17
20
|
## Workflow-only and multi-request tools
|
|
18
21
|
|
|
19
22
|
| Tool | Behavior |
|
|
@@ -50,8 +53,39 @@ than mapping one-to-one to one HTTP endpoint.
|
|
|
50
53
|
| `get_analytics_group_models` | GET `/analytics/groups/ai-models` |
|
|
51
54
|
| `get_analytics_group_metadata` | GET `/analytics/groups/metadata/{key}` |
|
|
52
55
|
| `get_analytics_group_providers` | GET `/analytics/groups/provider` |
|
|
56
|
+
| `get_analytics_group_mcp` | GET `/analytics/groups/mcp` |
|
|
57
|
+
| `get_analytics_group_a2a` | GET `/analytics/groups/a2a` |
|
|
58
|
+
| `get_analytics_group_workspaces` | GET `/analytics/groups/workspaces` |
|
|
53
59
|
|
|
54
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
|
+
|
|
55
89
|
## users (10)
|
|
56
90
|
|
|
57
91
|
Routes:
|
|
@@ -79,7 +113,7 @@ Routes:
|
|
|
79
113
|
|
|
80
114
|
- GET/POST `/admin/workspaces`; GET/PUT/DELETE `/admin/workspaces/{workspaceId}`
|
|
81
115
|
- GET/POST `/admin/workspaces/{workspaceId}/users`; GET/PUT/DELETE `/admin/workspaces/{workspaceId}/users/{userId}`
|
|
82
|
-
- GET/POST `/scim/workspaces`; DELETE `/scim/workspaces/{mappingId}`; GET `/scim/groups`
|
|
116
|
+
- GET/POST `/scim/workspaces`; DELETE `/scim/workspaces/{mappingId}`; GET `/scim/groups` (undocumented upstream; served from the `/v2` base)
|
|
83
117
|
|
|
84
118
|
| Tool | Selection guidance and result |
|
|
85
119
|
|---|---|
|
|
@@ -118,6 +152,7 @@ Routes:
|
|
|
118
152
|
Routes:
|
|
119
153
|
|
|
120
154
|
- GET/POST `/deployments`; GET/PUT/DELETE `/deployments/{id}`. DELETE archives; deprecated `/ping` is intentionally omitted.
|
|
155
|
+
- Undocumented upstream: these tools call the `/v2` base (the `/v1` base with its suffix swapped to `/v2`), while the public OpenAPI lists `/deployments` under `/v1`.
|
|
121
156
|
|
|
122
157
|
| Tool | Selection guidance and result |
|
|
123
158
|
|---|---|
|
|
@@ -156,9 +191,9 @@ Routes:
|
|
|
156
191
|
|
|
157
192
|
| Tool | Selection guidance and result |
|
|
158
193
|
|---|---|
|
|
159
|
-
| `list_collections` | List prompt collections in the workspace, optionally filtering by name or workspace. Returns ids, names, slugs, and timestamps so you can choose a collection_id before create_prompt, get_collection, or list_prompts. |
|
|
160
|
-
| `create_collection` | Create a new prompt collection for organizing prompts by app. Use this when you need a new namespace before create_prompt;
|
|
161
|
-
| `get_collection` | Fetch one collection by id or slug and return its name, slug, workspace, and timestamps. Use list_collections when browsing and get_collection when you already know the target. |
|
|
194
|
+
| `list_collections` | List prompt collections in the workspace, optionally filtering by name or workspace. Returns ids, names, slugs, parent collection ids, and timestamps so you can choose a collection_id before create_prompt, get_collection, or list_prompts. |
|
|
195
|
+
| `create_collection` | Create a new prompt collection for organizing prompts by app. Use this when you need a new namespace before create_prompt; set parent_collection_id to nest it under an existing collection. Returns the collection id and slug, and does not move any prompts. |
|
|
196
|
+
| `get_collection` | Fetch one collection by id or slug and return its name, slug, workspace, parent collection id, child collections with prompt counts, and timestamps. Use list_collections when browsing and get_collection when you already know the target. |
|
|
162
197
|
| `update_collection` | Update a collection's name or description only. This does not move prompts or change membership, so use it for metadata changes rather than reorganization. |
|
|
163
198
|
| `delete_collection` | Delete a prompt collection by ID. This cannot be undone; prompts stay in the workspace but lose their collection grouping, so reassign them first if organization matters. |
|
|
164
199
|
|
|
@@ -187,7 +222,7 @@ Routes:
|
|
|
187
222
|
| `get_prompt_version` | Retrieve a specific prompt version by its version UUID. Use list_prompt_versions to find the id first; returns the template, parameters, and model config for that version. |
|
|
188
223
|
| `update_prompt_version` | Update a specific prompt version's label assignment. This only assigns or removes a label, and null clears the label after you look up ids with list_prompt_labels. |
|
|
189
224
|
|
|
190
|
-
## analytics (
|
|
225
|
+
## analytics (25)
|
|
191
226
|
|
|
192
227
|
Routes:
|
|
193
228
|
|
|
@@ -209,6 +244,9 @@ Routes:
|
|
|
209
244
|
| `get_analytics_group_models` | Get a paginated per-model breakdown with total_groups, group_count, and a models array containing request count, cost, and token usage. Use this to compare model cost, popularity, and efficiency; use get_token_analytics or get_cost_analytics for time-series trends instead. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
210
245
|
| `get_analytics_group_providers` | Enterprise-gated. Get provider-grouped analytics for one workspace and time range with selectable metrics, ordering, pagination, and optional total count. Use this when comparing provider traffic or reliability; requested metric fields are preserved in each provider row. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
211
246
|
| `get_analytics_group_metadata` | Get a paginated metadata breakdown with total_groups, group_count, and a metadata_groups array grouped by the required metadata_key. Use this for custom breakdowns like per-environment or per-feature analysis; pass metadata_key in addition to the time window. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
247
|
+
| `get_analytics_group_mcp` | Get a paginated per-MCP-server breakdown with total_groups, group_count, and an mcp_servers array containing each server name and its request count. Use this to see which MCP servers receive the most traffic; use get_analytics_group_a2a for A2A agents or get_analytics_group_users and get_analytics_group_models for other breakdowns. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
248
|
+
| `get_analytics_group_a2a` | Get a paginated per-agent breakdown with total_groups, group_count, and an agents array containing each A2A (agent-to-agent) agent name and its request count. Use this to see which agents receive the most traffic; use get_analytics_group_mcp for MCP servers instead. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
249
|
+
| `get_analytics_group_workspaces` | Get a paginated per-workspace breakdown with total_groups, group_count, is_quota_exceeded when reported, and a workspaces array containing each workspace_slug with request count and cost. Use this for org-wide chargeback or comparing workspaces; pass workspace_slug to other analytics tools to drill into one workspace. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
212
250
|
| `get_error_stacks_analytics` | Get stacked error-series data grouped by HTTP status code over time, with summary and per-code series. Use this to see which error classes dominate; use get_error_status_codes_analytics for distinct-code distribution instead. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
213
251
|
| `get_error_status_codes_analytics` | Get HTTP error-code distribution time-series data with summary and per-code series. Use this to see which codes occur most often; use get_error_stacks_analytics for stacked or cumulative breakdowns. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
214
252
|
| `get_user_requests_analytics` | Get per-user request-count time-series data with counts grouped by user. Use this to find heavy users and traffic concentration; use get_users_analytics for aggregate active and new user trends instead. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
@@ -222,8 +260,8 @@ Routes:
|
|
|
222
260
|
|
|
223
261
|
Routes:
|
|
224
262
|
|
|
225
|
-
- GET/PUT `/admin/organisation/defaults`
|
|
226
|
-
- GET/PUT `/workspace-exclusions/{input-guardrails|output-guardrails}`
|
|
263
|
+
- GET/PUT `/admin/organisation/defaults` (undocumented upstream)
|
|
264
|
+
- GET/PUT `/workspace-exclusions/{input-guardrails|output-guardrails}` (undocumented upstream)
|
|
227
265
|
- GET/POST `/guardrails`; GET/PUT/DELETE `/guardrails/{guardrailId}`
|
|
228
266
|
- GET/PUT `/guardrails/{guardrailId}/mcp-servers`; PUT `/guardrails/{guardrailId}/mcp-servers/{mcpServerId}`
|
|
229
267
|
|
|
@@ -238,9 +276,9 @@ Routes:
|
|
|
238
276
|
| `list_guardrails` | List guardrails in the org with id, slug, status, ownership, and optional workspace/org filters. Use this to find IDs and slugs before get_guardrail, update_guardrail, or delete_guardrail. |
|
|
239
277
|
| `get_guardrail` | Fetch one guardrail by id or slug with its full checks and actions; use list_guardrails to discover ids first. Use before update_guardrail or delete_guardrail when you need the exact enforcement policy, and returns the full check and action configuration alongside status and ownership. |
|
|
240
278
|
| `create_guardrail` | Create an LLM or MCP-tool guardrail. LLM guardrails require checks and actions; MCP-tool guardrails can be created first and mapped to servers afterward. The new version becomes the policy anchor for downstream use. |
|
|
241
|
-
| `list_guardrail_mcp_servers` | List every MCP-server mapping for one guardrail, including the input/output phases and mapped capability IDs. Use this before replace_guardrail_mcp_servers because replacement removes every mapping omitted from its request. |
|
|
242
|
-
| `replace_guardrail_mcp_servers` | Replace the complete MCP-server mapping set for one guardrail. Any existing server omitted from mcp_servers is removed, and an empty object clears all mappings. Read list_guardrail_mcp_servers first. Repeating the same complete map is safe. |
|
|
243
|
-
| `upsert_guardrail_mcp_server` | Create or replace one guardrail mapping for one MCP server without changing mappings for other servers. run_on defaults to both input and output. Use list_guardrail_mcp_servers to inspect the current mapping set first. Repeating the same mapping is safe. |
|
|
279
|
+
| `list_guardrail_mcp_servers` | List every MCP-server mapping for one guardrail, including the input/output phases and mapped capability IDs. Requires a guardrail with target mcp_tools. Use this before replace_guardrail_mcp_servers because replacement removes every mapping omitted from its request. |
|
|
280
|
+
| `replace_guardrail_mcp_servers` | Replace the complete MCP-server mapping set for one guardrail. Requires a guardrail with target mcp_tools. Any existing server omitted from mcp_servers is removed, and an empty object clears all mappings. Read list_guardrail_mcp_servers first. Repeating the same complete map is safe. |
|
|
281
|
+
| `upsert_guardrail_mcp_server` | Create or replace one guardrail mapping for one MCP server without changing mappings for other servers. Requires a guardrail with target mcp_tools. run_on defaults to both input and output. Use list_guardrail_mcp_servers to inspect the current mapping set first. Repeating the same mapping is safe. |
|
|
244
282
|
| `update_guardrail` | Update a guardrail's name, checks, or actions, unlike create_guardrail which registers a new one or delete_guardrail which removes it. This creates a new version that takes effect immediately for dependent configs, so review list_guardrails first; returns the updated id, slug, and version_id. |
|
|
245
283
|
| `delete_guardrail` | Delete a guardrail by id or slug. This is irreversible and removes the check from any configs that reference it, so review dependent configs first. |
|
|
246
284
|
|
|
@@ -324,7 +362,7 @@ Routes:
|
|
|
324
362
|
Routes:
|
|
325
363
|
|
|
326
364
|
- POST `/logs`; GET `/logs/{logId}`
|
|
327
|
-
- GET `/logs/exports/field-restrictions
|
|
365
|
+
- GET `/logs/exports/field-restrictions` (undocumented upstream); GET/POST `/logs/exports`; GET/PUT `/logs/exports/{exportId}`
|
|
328
366
|
- POST `/logs/exports/{exportId}/{start|cancel}`; GET `/logs/exports/{exportId}/download`
|
|
329
367
|
|
|
330
368
|
| Tool | Selection guidance and result |
|
|
@@ -379,10 +417,10 @@ Routes:
|
|
|
379
417
|
| Tool | Selection guidance and result |
|
|
380
418
|
|---|---|
|
|
381
419
|
| `get_model_pricing` | Get Portkey's current public pricing configuration for one exact provider/model pair. Prices are returned in USD cents per token or provider-specific unit and may include cache, audio, image, fine-tuning, and calculation metadata. Use this read-only catalog lookup before setting integration pricing_adjustments or custom-model pricing; it does not return your negotiated integration multiplier or require Portkey authentication. |
|
|
382
|
-
| `list_integrations` | List org-level AI provider connections with optional workspace or
|
|
383
|
-
| `create_integration` | Create an AI-provider integration that becomes the source for workspace providers. ai_provider_id identifies the backend; provider-specific fields configure Azure, Bedrock, Vertex, or custom hosts. For workspace-scoped integrations, create_default_provider controls automatic provider creation. key is write-only, but secret_mappings can resolve it or configuration fields from Secret References at runtime. pricing_adjustments apply negotiated discounts or markups to cost accounting. Use update_integration_models and update_integration_workspaces after creation; returns the new integration id and slug. |
|
|
420
|
+
| `list_integrations` | List org-level AI provider connections with optional workspace, type, or tag filters. Use this to find integration slugs before model or workspace updates. Returns total plus id, name, slug, provider, status, description, workspace counts, and config summary. |
|
|
421
|
+
| `create_integration` | Create an AI-provider integration that becomes the source for workspace providers. ai_provider_id identifies the backend; provider-specific fields configure Azure, Bedrock, Vertex, or custom hosts. For workspace-scoped integrations, create_default_provider controls automatic provider creation. key is write-only, but secret_mappings can resolve it or configuration fields from Secret References at runtime. pricing_adjustments apply negotiated discounts or markups to cost accounting; tags attach key-value labels that list_integrations can filter on. Use update_integration_models and update_integration_workspaces after creation; returns the new integration id and slug. |
|
|
384
422
|
| `get_integration` | Fetch one integration by slug, including masked key, workspace access, allowed models, and configuration metadata. Use this before editing provider-specific settings or auditing access. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
385
|
-
| `update_integration` | Update an integration's name, description, API key, provider config, Secret Reference mappings,
|
|
423
|
+
| `update_integration` | Update an integration's name, description, API key, provider config, Secret Reference mappings, pricing adjustments, or tags by slug. Only provided fields change; tags replaces the whole map and null clears it; key, secret mapping, and config changes take effect immediately and can disrupt dependent providers or live requests, while pricing multipliers change cost analytics and budget accounting. Review get_integration first. Model availability and workspace access remain separate in update_integration_models and update_integration_workspaces. |
|
|
386
424
|
| `delete_integration` | Delete an integration by slug. This is irreversible and stops the org-level connection, which will break dependent virtual keys, providers, and workspace access. |
|
|
387
425
|
| `list_integration_models` | List models enabled on an integration. Use this to verify model availability before creating prompts or configs. Returns total plus model ids, display names, enabled state, and custom-model markers. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. |
|
|
388
426
|
| `update_integration_models` | Bulk enable or disable integration models, register custom or fine-tuned models, set per-model hosts and headers, and attach static token pricing. allow_all_models controls whether future provider models start enabled. These changes affect every workspace using the integration; inspect list_integration_models first and use get_model_pricing when deriving custom rates. Returns success and the number of models updated. |
|
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,15 +146,17 @@ 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
|
-
| **Analytics** |
|
|
153
|
+
| **Analytics** | 25 | Cost, latency, errors, tokens, cache, feedback, provider, MCP, A2A, and workspace groups |
|
|
152
154
|
| **Logging** | 10 | Log retrieval, ingestion, export, and field restrictions |
|
|
153
155
|
| **Tracing** | 2 | Feedback creation and updates on traces |
|
|
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
|
|
@@ -172,13 +174,13 @@ If a tool returns a `403` with Portkey error `AB03`, it means missing scopes —
|
|
|
172
174
|
<details>
|
|
173
175
|
<summary><strong>Enterprise-gated tools and other scope requirements</strong></summary>
|
|
174
176
|
|
|
175
|
-
### Enterprise-gated tools (
|
|
177
|
+
### Enterprise-gated tools (56)
|
|
176
178
|
|
|
177
179
|
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.
|
|
178
180
|
|
|
179
181
|
| Area | Tools | Required scope |
|
|
180
182
|
|---|---|---|
|
|
181
|
-
| Analytics (
|
|
183
|
+
| Analytics (25) | `get_cost_analytics`, `get_request_analytics`, `get_token_analytics`, `get_latency_analytics`, `get_error_analytics`, `get_error_rate_analytics`, `get_cache_hit_latency`, `get_cache_hit_rate`, `get_cache_summary`, `get_users_analytics`, `get_error_stacks_analytics`, `get_error_status_codes_analytics`, `get_user_requests_analytics`, `get_rescued_requests_analytics`, `get_feedback_analytics`, `get_feedback_models_analytics`, `get_feedback_scores_analytics`, `get_feedback_weighted_analytics`, `get_analytics_group_users`, `get_analytics_group_models`, `get_analytics_group_metadata`, `get_analytics_group_providers`, `get_analytics_group_mcp`, `get_analytics_group_a2a`, `get_analytics_group_workspaces` | org-level `analytics.view` |
|
|
182
184
|
| Deployments (5) | `list_deployments`, `register_deployment`, `get_deployment`, `update_deployment`, `archive_deployment` | Enterprise deployment administration |
|
|
183
185
|
| Audit | `list_audit_logs` | `audit_logs.list` |
|
|
184
186
|
| Org-level integrations | `get_integration`, `list_integration_models`, `list_integration_workspaces` | `organisation_integrations.read` |
|
|
@@ -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/)
|