portkey-admin-mcp 0.6.3 → 0.8.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 +638 -0
- package/README.md +19 -11
- package/build/index.js +2641 -2994
- package/build/server.js +2818 -3065
- package/docs/PRISMA_AIRS_INTEROPERABILITY.md +66 -0
- package/docs/VERCEL_DEPLOYMENT.md +192 -0
- package/package.json +13 -6
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h1>Portkey Admin MCP Server</h1>
|
|
6
6
|
|
|
7
|
-
**The
|
|
7
|
+
**The [Portkey](https://portkey.ai/) Admin API as an MCP server — 171 tools across prompts, configs, keys, analytics, governance, and more.**
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<hr>
|
|
27
27
|
|
|
28
28
|
> [!IMPORTANT]
|
|
29
|
-
> **
|
|
29
|
+
> **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 August 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. Prisma AIRS AI Gateway currently has a different management and authentication surface, 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.
|
|
30
30
|
|
|
31
31
|
<h2 align="center">📑 Contents</h2>
|
|
32
32
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
- [🧰 What You Can Do](#what-you-can-do)
|
|
35
35
|
- [🔑 API Key Scopes](#api-key-scopes)
|
|
36
36
|
- [🌐 HTTP Server (Experimental)](#http-server)
|
|
37
|
+
- [🔄 Prisma AIRS interoperability](./docs/PRISMA_AIRS_INTEROPERABILITY.md)
|
|
37
38
|
- [🛠️ Development](#development)
|
|
38
39
|
- [🧾 Full tool list — ENDPOINTS.md](./ENDPOINTS.md)
|
|
39
40
|
|
|
@@ -81,6 +82,11 @@ PORTKEY_TOOL_DOMAINS=prompts,analytics \
|
|
|
81
82
|
npx -y portkey-admin-mcp
|
|
82
83
|
```
|
|
83
84
|
|
|
85
|
+
Scoping domains is also the biggest lever on context cost, not just access. `tools/list`
|
|
86
|
+
is paginated, and the complete 171-tool catalog is roughly 387 KB (~99K tokens) once a
|
|
87
|
+
client follows `nextCursor` through every page. Narrowing to the domains a client
|
|
88
|
+
actually needs cuts that roughly proportionally.
|
|
89
|
+
|
|
84
90
|
<details>
|
|
85
91
|
<summary><strong>Build from source</strong></summary>
|
|
86
92
|
|
|
@@ -122,19 +128,19 @@ Then use this config:
|
|
|
122
128
|
| **Virtual Keys** | 5 | Manage provider access keys |
|
|
123
129
|
| **Collections** | 5 | Group prompts by app or project |
|
|
124
130
|
| **Providers** | 5 | Manage AI provider configurations |
|
|
125
|
-
| **Integrations** |
|
|
131
|
+
| **Integrations** | 11 | Provider integrations, model pricing, models, workspace access |
|
|
126
132
|
| **MCP Integrations** | 10 | External MCP tool integrations |
|
|
127
|
-
| **MCP Servers** |
|
|
128
|
-
| **Guardrails** |
|
|
133
|
+
| **MCP Servers** | 12 | MCP server registry, capabilities, and live connections |
|
|
134
|
+
| **Guardrails** | 11 | Content safety policies, organisation defaults, workspace exclusions |
|
|
129
135
|
| **Usage Limits** | 7 | Cost and token consumption limits |
|
|
130
136
|
| **Rate Limits** | 5 | Request frequency controls |
|
|
131
137
|
| **Analytics** | 20 | Cost, latency, errors, tokens, cache, feedback |
|
|
132
|
-
| **Logging** |
|
|
138
|
+
| **Logging** | 10 | Log retrieval, ingestion, export, and field restrictions |
|
|
133
139
|
| **Tracing** | 2 | Feedback creation and updates on traces |
|
|
134
|
-
| **Users & Workspaces** |
|
|
140
|
+
| **Users & Workspaces** | 24 | User management, invites, workspace members, SCIM group mappings |
|
|
135
141
|
| **Audit** | 1 | Audit log access |
|
|
136
142
|
|
|
137
|
-
**
|
|
143
|
+
**171 tools total.** See [ENDPOINTS.md](./ENDPOINTS.md) for the full list with descriptions.
|
|
138
144
|
|
|
139
145
|
<hr>
|
|
140
146
|
|
|
@@ -142,7 +148,7 @@ Then use this config:
|
|
|
142
148
|
|
|
143
149
|
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.
|
|
144
150
|
|
|
145
|
-
### Enterprise-gated tools (
|
|
151
|
+
### Enterprise-gated tools (40)
|
|
146
152
|
|
|
147
153
|
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.
|
|
148
154
|
|
|
@@ -152,6 +158,8 @@ The following tools require an **organisation-level scope that is only available
|
|
|
152
158
|
| Audit | `list_audit_logs` | `audit_logs.list` |
|
|
153
159
|
| Org-level integrations | `get_integration`, `list_integration_models`, `list_integration_workspaces` | `organisation_integrations.read` |
|
|
154
160
|
| Org-level users | `list_all_users`, `get_user`, `get_user_stats`, `list_user_invites` | `organisation_users.list` / `organisation_users.read` |
|
|
161
|
+
| Log exports (8) | `create_log_export`, `list_log_exports`, `get_log_export`, `start_log_export`, `cancel_log_export`, `download_log_export`, `update_log_export`, `get_log_export_field_restrictions` | Enterprise Logs Export + `logs.export` |
|
|
162
|
+
| SCIM groups (4) | `list_scim_groups`, `list_scim_workspace_mappings`, `create_scim_workspace_mapping`, `delete_scim_workspace_mapping` | SCIM enabled + organisation admin access |
|
|
155
163
|
|
|
156
164
|
### Other scope requirements
|
|
157
165
|
|
|
@@ -193,7 +201,7 @@ For local-only HTTP use, leave `MCP_HOST` at its default `127.0.0.1`. Set `MCP_H
|
|
|
193
201
|
| Variable | Default | Description |
|
|
194
202
|
|----------|---------|-------------|
|
|
195
203
|
| `PORTKEY_API_KEY` | (required) | Your Portkey API key |
|
|
196
|
-
| `PORTKEY_BASE_URL` | `https://api.portkey.ai/v1` | Portkey Admin API base URL.
|
|
204
|
+
| `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 |
|
|
197
205
|
| `PORTKEY_ALLOW_PRIVATE_BASE_URL` | — | Set to `true` to allow a literal loopback/private `PORTKEY_BASE_URL` |
|
|
198
206
|
| `PORTKEY_ALLOW_INSECURE_HTTP` | — | Separately set to `true` only when a trusted self-hosted gateway cannot use HTTPS |
|
|
199
207
|
| `PORTKEY_TOOL_DOMAINS` | — | Server-side tool-domain allowlist. HTTP `?tools=` may narrow this set but cannot expand it |
|
|
@@ -289,7 +297,7 @@ npm run ci # full pipeline (lint + typecheck + test + build + e2e + v
|
|
|
289
297
|
### Built With
|
|
290
298
|
|
|
291
299
|
[](https://www.typescriptlang.org/)
|
|
292
|
-
[](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
293
301
|
[](https://zod.dev/)
|
|
294
302
|
[](https://biomejs.dev/)
|
|
295
303
|
[](https://nodejs.org/)
|