portkey-admin-mcp 0.2.0 → 0.3.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/README.md +32 -10
- package/build/index.js +517 -250
- package/build/server.js +514 -250
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
# Portkey Admin MCP Server
|
|
4
4
|
|
|
5
5
|
<picture>
|
|
6
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=FFFFFF¢er=true&vCenter=true&width=500&lines=
|
|
7
|
-
<source media="(prefers-color-scheme: light)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000¢er=true&vCenter=true&width=500&lines=
|
|
8
|
-
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000¢er=true&vCenter=true&width=500&lines=
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=FFFFFF¢er=true&vCenter=true&width=500&lines=150+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server">
|
|
7
|
+
<source media="(prefers-color-scheme: light)" srcset="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000¢er=true&vCenter=true&width=500&lines=150+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server">
|
|
8
|
+
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=000000¢er=true&vCenter=true&width=500&lines=150+tools+for+Portkey+Admin+API;Prompts%2C+Configs%2C+Analytics;Full+MCP+Protocol+1.0+Server" alt="Typing SVG">
|
|
9
9
|
</picture>
|
|
10
10
|
|
|
11
11
|
MCP server for the [Portkey](https://portkey.ai/) Admin API. Manage prompts, configs, analytics, API keys, and more from any MCP client.
|
|
@@ -16,6 +16,8 @@ MCP server for the [Portkey](https://portkey.ai/) Admin API. Manage prompts, con
|
|
|
16
16
|
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="Node.js"></a>
|
|
17
17
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
18
18
|
|
|
19
|
+
<a href="https://glama.ai/mcp/servers/s-b-e-n-s-o-n/portkey-admin-mcp"><img src="https://glama.ai/mcp/servers/s-b-e-n-s-o-n/portkey-admin-mcp/badges/card.svg" alt="portkey-admin-mcp MCP server"></a>
|
|
20
|
+
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
23
|
---
|
|
@@ -54,6 +56,14 @@ Add to your MCP config (`.cursor/mcp.json`, `.windsurf/mcp.json`, or `.vscode/mc
|
|
|
54
56
|
PORTKEY_API_KEY=your_key npx -y portkey-admin-mcp
|
|
55
57
|
```
|
|
56
58
|
|
|
59
|
+
To expose only a focused subset of tools in stdio clients, set `PORTKEY_TOOL_DOMAINS`:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
PORTKEY_API_KEY=your_key \
|
|
63
|
+
PORTKEY_TOOL_DOMAINS=prompts,analytics \
|
|
64
|
+
npx -y portkey-admin-mcp
|
|
65
|
+
```
|
|
66
|
+
|
|
57
67
|
<details>
|
|
58
68
|
<summary><strong>Build from source</strong></summary>
|
|
59
69
|
|
|
@@ -102,24 +112,35 @@ Then use this config:
|
|
|
102
112
|
| **Rate Limits** | 5 | Request frequency controls |
|
|
103
113
|
| **Analytics** | 20 | Cost, latency, errors, tokens, cache, feedback |
|
|
104
114
|
| **Logging** | 8 | Log ingestion and export |
|
|
105
|
-
| **Tracing** |
|
|
115
|
+
| **Tracing** | 2 | Feedback creation and updates on traces |
|
|
106
116
|
| **Users & Workspaces** | 20 | User management, invites, workspace members |
|
|
107
117
|
| **Audit** | 1 | Audit log access |
|
|
108
118
|
|
|
109
|
-
**
|
|
119
|
+
**150 tools total.** See [ENDPOINTS.md](./ENDPOINTS.md) for the full list with descriptions.
|
|
110
120
|
|
|
111
121
|
---
|
|
112
122
|
|
|
113
123
|
## API Key Scopes
|
|
114
124
|
|
|
115
|
-
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
### Enterprise-gated tools (28)
|
|
128
|
+
|
|
129
|
+
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.
|
|
130
|
+
|
|
131
|
+
| Area | Tools | Required scope |
|
|
132
|
+
|---|---|---|
|
|
133
|
+
| Analytics (20) | `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_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` | org-level `analytics.view` |
|
|
134
|
+
| Audit | `list_audit_logs` | `audit_logs.list` |
|
|
135
|
+
| Org-level integrations | `get_integration`, `list_integration_models`, `list_integration_workspaces` | `organisation_integrations.read` |
|
|
136
|
+
| Org-level users | `list_all_users`, `get_user`, `get_user_stats`, `list_user_invites` | `organisation_users.list` / `organisation_users.read` |
|
|
137
|
+
|
|
138
|
+
### Other scope requirements
|
|
116
139
|
|
|
117
140
|
| Feature | Required |
|
|
118
141
|
|---------|----------|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
| Integration models/workspaces | Organization-level API key |
|
|
122
|
-
| Prompt completions | `completions.write` scope + billing metadata |
|
|
142
|
+
| Prompt completions (`run_prompt_completion`) | `completions.write` scope + billing metadata (`app`, `env`) |
|
|
143
|
+
| Org-level service API key creation via `create_api_key` | `organisation_service_api_keys.create` (Enterprise) |
|
|
123
144
|
|
|
124
145
|
If a tool returns a `403` with Portkey error `AB03`, it means missing scopes — not a broken endpoint.
|
|
125
146
|
|
|
@@ -154,6 +175,7 @@ For local-only HTTP use, leave `MCP_HOST` at its default `127.0.0.1`. Set `MCP_H
|
|
|
154
175
|
| Variable | Default | Description |
|
|
155
176
|
|----------|---------|-------------|
|
|
156
177
|
| `PORTKEY_API_KEY` | (required) | Your Portkey API key |
|
|
178
|
+
| `PORTKEY_TOOL_DOMAINS` | — | Optional comma-separated stdio/HTTP default tool subset, e.g. `prompts,analytics` |
|
|
157
179
|
| `MCP_HOST` | `127.0.0.1` | Bind address |
|
|
158
180
|
| `MCP_PORT` | `3000` | Port |
|
|
159
181
|
| `MCP_PUBLIC_BASE_URL` | — | Public absolute base URL to advertise from `/auth/info` and the status page; recommended for hosted deployments |
|