@prompteryx/mcp-server 1.1.0 → 1.1.2

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 CHANGED
@@ -1,271 +1,267 @@
1
- # @prompteryx/mcp-server
2
-
3
- **The most feature-rich browser automation MCP server.** Control web browsers, run workflows, send emails, manage spreadsheets, and more — all from your favourite AI assistant.
4
-
5
- Works with **Claude Desktop, ChatGPT, Cursor, VS Code, Gemini CLI**, and 400+ other MCP clients.
6
-
7
- ---
8
-
9
- ## Quick Start (5 minutes)
10
-
11
- ### 1. Get your API key
12
-
13
- 1. Log in at [prompteryx.ai](https://www.prompteryx.ai)
14
- 2. Go to **Settings → API Keys**
15
- 3. Click **Create API Key** and copy it (starts with `px_key_`)
16
-
17
- ### 2. Add to your AI tool
18
-
19
- **Claude Desktop** — edit `~/.claude/claude_desktop_config.json`:
20
-
21
- ```json
22
- {
23
- "mcpServers": {
24
- "prompteryx": {
25
- "command": "npx",
26
- "args": ["@prompteryx/mcp-server@latest"],
27
- "env": { "PROMPTERYX_API_KEY": "px_key_YOUR_KEY_HERE" }
28
- }
29
- }
30
- }
31
- ```
32
-
33
- **Cursor** — create `.cursor/mcp.json` in your project:
34
-
35
- ```json
36
- {
37
- "mcpServers": {
38
- "prompteryx": {
39
- "command": "npx",
40
- "args": ["@prompteryx/mcp-server@latest"],
41
- "env": { "PROMPTERYX_API_KEY": "px_key_YOUR_KEY_HERE" }
42
- }
43
- }
44
- }
45
- ```
46
-
47
- **VS Code** — add to `.vscode/settings.json`:
48
-
49
- ```json
50
- {
51
- "mcp": {
52
- "servers": {
53
- "prompteryx": {
54
- "command": "npx",
55
- "args": ["@prompteryx/mcp-server@latest"],
56
- "env": { "PROMPTERYX_API_KEY": "px_key_YOUR_KEY_HERE" }
57
- }
58
- }
59
- }
60
- }
61
- ```
62
-
63
- **ChatGPT** — via MCP connectors:
64
-
65
- ```
66
- Server URL: https://www.prompteryx.ai/api/mcp
67
- API Key: px_key_YOUR_KEY_HERE
68
- ```
69
-
70
- **Gemini CLI**:
71
-
72
- ```bash
73
- gemini --mcp-server="npx @prompteryx/mcp-server" \
74
- --mcp-env="PROMPTERYX_API_KEY=px_key_YOUR_KEY_HERE"
75
- ```
76
-
77
- ### 3. Start using it
78
-
79
- Just ask your AI assistant:
80
-
81
- - *"Go to amazon.com and find wireless headphones under £50"*
82
- - *"Take a screenshot of the current page"*
83
- - *"Send an email via Gmail to john@example.com with subject 'Meeting tomorrow'"*
84
- - *"Read the data from my Google Sheet"*
85
- - *"Create a Prompteryx workflow that monitors Gmail and posts to Slack"*
86
- - *"Run my 'Daily Report' workflow"*
87
-
88
- ---
89
-
90
- ## What You Can Do
91
-
92
- ### Browser Automation (21 tools)
93
-
94
- Navigate websites, click buttons, fill forms, extract data, take screenshots, generate PDFs, manage cookies, upload files, execute JavaScript, and more.
95
-
96
- All browser actions run in a **cloud browser** by default — nothing to install locally.
97
-
98
- | Tool | Description |
99
- |------|-------------|
100
- | `browser_navigate` | Go to a URL |
101
- | `browser_click` | Click an element |
102
- | `browser_fill` | Fill an input field |
103
- | `browser_type` | Type text character by character |
104
- | `browser_press_key` | Press keyboard keys (Enter, Tab, etc.) |
105
- | `browser_select` | Select a dropdown option |
106
- | `browser_check` | Check/uncheck a checkbox |
107
- | `browser_hover` | Hover over an element |
108
- | `browser_scroll` | Scroll the page or to an element |
109
- | `browser_extract_text` | Get text content from an element |
110
- | `browser_extract_attribute` | Get an HTML attribute (href, src, etc.) |
111
- | `browser_screenshot` | Take a screenshot (returns image) |
112
- | `browser_evaluate` | Run JavaScript in the page |
113
- | `browser_wait` | Wait for elements, timeouts, or navigation |
114
- | `browser_get_page_info` | Get current URL and title |
115
- | `browser_drag_drop` | Drag and drop elements |
116
- | `browser_set_files` | Upload files |
117
- | `browser_get_cookies` | Read cookies |
118
- | `browser_set_cookies` | Set cookies |
119
- | `browser_pdf` | Generate a PDF of the page |
120
- | `browser_close` | Close the browser session |
121
-
122
- ### AI Browser Agent
123
-
124
- Give natural language instructions and let the AI see the screen and act:
125
-
126
- | Tool | Description |
127
- |------|-------------|
128
- | `browser_ai_action` | "Log in and download the monthly report" — the AI figures out the clicks, scrolls, and typing |
129
-
130
- Uses Google Gemini Computer Use. Actions are recorded so you can replay them without AI costs.
131
-
132
- ### Workflows (unique — no other MCP server has this)
133
-
134
- | Tool | Description |
135
- |------|-------------|
136
- | `workflow_list` | List your saved workflows |
137
- | `workflow_get` | Get workflow details |
138
- | `workflow_execute` | Run a saved workflow |
139
- | `workflow_create` | Create a workflow (from nodes or natural language) |
140
- | `workflow_delete` | Delete a workflow |
141
- | `workflow_add_node` | Add a node to an existing workflow |
142
- | `workflow_record_actions` | Record browser actions → save as reusable workflow |
143
-
144
- ### Integrations
145
-
146
- Automatically available for services you've connected on [prompteryx.ai/connections](https://www.prompteryx.ai/connections):
147
-
148
- - **Gmail** — send, read, search emails
149
- - **Google Sheets** — read, append, update data
150
- - **Google Calendar** — create, list events
151
- - **Google Drive** — upload, download, list files
152
- - **Google Docs** — create, read documents
153
- - **Slack** — send messages, manage channels
154
- - **Notion** — create pages, manage databases
155
- - **Airtable** — CRUD operations on bases
156
- - **Microsoft Outlook, Excel, Word, SharePoint, Teams**
157
- - **Telegram, WhatsApp, Facebook, Instagram, YouTube**
158
- - **WordPress** — create posts, manage content
159
- - **Stripe** — customers, charges, invoices
160
- - **OpenAI, Anthropic, Gemini, ElevenLabs** — AI model calls
161
- - More added regularly — new integrations appear automatically
162
-
163
- ### Data Tools (zero cost, run locally)
164
-
165
- | Tool | Description |
166
- |------|-------------|
167
- | `transform_json` | Parse, query, transform JSON data |
168
- | `generate_uuid` | Generate a UUID |
169
- | `base64_encode` | Encode text to Base64 |
170
- | `base64_decode` | Decode Base64 to text |
171
- | `format_date` | Format dates and timestamps |
172
- | `math_operation` | Evaluate math expressions |
173
-
174
- ### Resources
175
-
176
- | Resource | URI | Description |
177
- |----------|-----|-------------|
178
- | Workflows | `prompteryx://workflows` | Your saved workflows |
179
- | Connections | `prompteryx://connections` | Connected OAuth services |
180
- | Usage | `prompteryx://usage` | Current usage stats and limits |
181
-
182
- ---
183
-
184
- ## Environment Variables
185
-
186
- | Variable | Required | Default | Description |
187
- |----------|----------|---------|-------------|
188
- | `PROMPTERYX_API_KEY` | Yes | — | Your API key (from Settings → API Keys) |
189
- | `PROMPTERYX_API_URL` | No | `https://www.prompteryx.ai` | API base URL |
190
- | `PROMPTERYX_EXECUTION_MODE` | No | `cloud` | `cloud` or `local` |
191
- | `PROMPTERYX_CHROME_PROFILE` | No | — | Chrome profile ID (local mode only) |
192
- | `PROMPTERYX_SESSION_TIMEOUT` | No | `300000` | Session idle timeout in ms |
193
- | `PROMPTERYX_STEALTH_MODE` | No | `true` | Bypass bot detection (Patchright) |
194
- | `PROMPTERYX_VIDEO_RECORDING` | No | `false` | Record browser sessions |
195
-
196
- ---
197
-
198
- ## Local Browser Mode (optional)
199
-
200
- For using your own Chrome profiles with saved logins:
201
-
202
- 1. Download the **Prompteryx Desktop App** from [prompteryx.ai/download](https://www.prompteryx.ai/download)
203
- 2. Install and launch it (runs in the system tray)
204
- 3. Add to your config:
205
-
206
- ```json
207
- "env": {
208
- "PROMPTERYX_API_KEY": "px_key_...",
209
- "PROMPTERYX_EXECUTION_MODE": "local",
210
- "PROMPTERYX_CHROME_PROFILE": "your-profile-id"
211
- }
212
- ```
213
-
214
- ---
215
-
216
- ## Pricing
217
-
218
- MCP usage is included in your Prompteryx subscription:
219
-
220
- | | Free | Starter (£20/mo) | Pro (£45/mo) | Enterprise |
221
- |---|---|---|---|---|
222
- | Browser tools | 1,500/mo | 3,000/mo | 12,000/mo | Custom |
223
- | Cloud browser | — | 60 min | 300 min | 1,200 min |
224
- | AI credits | 50 | 500 | 1,500 | Custom |
225
- | Integrations | 3 services | All | All | All |
226
- | Workflow execution | Limited | Unlimited | Unlimited | Unlimited |
227
- | Workflow creation | — | Yes | Yes | Yes |
228
- | Record to workflow | — | Yes | Yes | Yes |
229
- | Stealth mode | — | Yes | Yes | Yes |
230
- | Video recording | — | — | Yes | Yes |
231
-
232
- ---
233
-
234
- ## How It Compares
235
-
236
- | Feature | Prompteryx | Playwright MCP | Zapier MCP | Puppeteer MCP |
237
- |---------|-----------|---------------|-----------|--------------|
238
- | Browser automation | 21 tools | 13 tools | None | 8 tools |
239
- | Cloud browser | Yes | No | No | No |
240
- | Chrome profiles | Yes | No | No | No |
241
- | AI browser agent | Yes | No | No | No |
242
- | Stealth mode | Yes | No | No | No |
243
- | Integrations | 20+ | None | 8,000+ | None |
244
- | Workflow builder | Yes | No | No | No |
245
- | Action recording | Yes | No | No | No |
246
- | Screenshots | Visual | Text-only | N/A | Yes |
247
-
248
- ---
249
-
250
- ## Troubleshooting
251
-
252
- | Problem | Solution |
253
- |---------|----------|
254
- | "API key invalid" | Verify key starts with `px_key_` and is active in Settings |
255
- | "Cloud browser minutes exceeded" | Upgrade your plan or use `PROMPTERYX_EXECUTION_MODE=local` |
256
- | "Integration not available" | Connect the service at [prompteryx.ai/connections](https://www.prompteryx.ai/connections) |
257
- | "Session disconnected" | The server auto-recovers — just retry your request |
258
- | "AI credits exhausted" | Purchase more at Settings → AI Credits |
259
- | Server not starting | Ensure Node.js 18+ is installed: `node --version` |
260
-
261
- ---
262
-
263
- ## Support
264
-
265
- - Website: [prompteryx.ai](https://www.prompteryx.ai)
266
- - Documentation: [docs.prompteryx.ai](https://docs.prompteryx.ai)
267
- - Email: support@prompteryx.ai
268
-
269
- ## License
270
-
271
- MIT
1
+ # @prompteryx/mcp-server
2
+
3
+ **The most feature-rich browser automation MCP server.** Control web browsers, run workflows, send emails, manage spreadsheets, and more — all from your favourite AI assistant.
4
+
5
+ Works with **Claude Desktop, ChatGPT, Cursor, VS Code, Gemini CLI**, and 400+ other MCP clients.
6
+
7
+ ---
8
+
9
+ ## Quick Start (5 minutes)
10
+
11
+ ### 1. Get your API key
12
+
13
+ 1. Log in at [prompteryx.ai](https://www.prompteryx.ai)
14
+ 2. Open the [API Keys page](https://www.prompteryx.ai/api-keys)
15
+ 3. Click **Create API Key** and copy it (starts with `px_live_`, shown once)
16
+
17
+ Prefer not to paste a key? Clients that support OAuth (Claude, ChatGPT, VS Code, Cursor) can use the hosted endpoint `https://www.prompteryx.ai/api/mcp` and sign in with Prompteryx instead.
18
+
19
+ ### 2. Add to your AI tool
20
+
21
+ **Claude Desktop** — edit `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`):
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "prompteryx": {
27
+ "command": "npx",
28
+ "args": ["@prompteryx/mcp-server@latest"],
29
+ "env": { "PROMPTERYX_API_KEY": "px_live_YOUR_KEY_HERE" }
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ **Cursor** — create `.cursor/mcp.json` in your project:
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "prompteryx": {
41
+ "command": "npx",
42
+ "args": ["@prompteryx/mcp-server@latest"],
43
+ "env": { "PROMPTERYX_API_KEY": "px_live_YOUR_KEY_HERE" }
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ **VS Code** — create `.vscode/mcp.json`:
50
+
51
+ ```json
52
+ {
53
+ "servers": {
54
+ "prompteryx": {
55
+ "command": "npx",
56
+ "args": ["@prompteryx/mcp-server@latest"],
57
+ "env": { "PROMPTERYX_API_KEY": "px_live_YOUR_KEY_HERE" }
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ **Claude Code**:
64
+
65
+ ```bash
66
+ claude mcp add prompteryx -e PROMPTERYX_API_KEY=px_live_YOUR_KEY_HERE -- npx -y @prompteryx/mcp-server
67
+ # or the hosted endpoint with OAuth sign-in (no key):
68
+ claude mcp add --transport http prompteryx https://www.prompteryx.ai/api/mcp
69
+ ```
70
+
71
+ **ChatGPT** — add a connector with the server URL `https://www.prompteryx.ai/api/mcp` and choose OAuth; approve the connection on the Prompteryx consent screen. Clients without OAuth can send the header `X-API-Key: px_live_YOUR_KEY_HERE` instead.
72
+
73
+ **Gemini CLI**:
74
+
75
+ ```bash
76
+ gemini --mcp-server="npx @prompteryx/mcp-server" \
77
+ --mcp-env="PROMPTERYX_API_KEY=px_live_YOUR_KEY_HERE"
78
+ ```
79
+
80
+ ### 3. Start using it
81
+
82
+ Just ask your AI assistant:
83
+
84
+ - *"Go to amazon.com and find wireless headphones under £50"*
85
+ - *"Take a screenshot of the current page"*
86
+ - *"Send an email via Gmail to john@example.com with subject 'Meeting tomorrow'"*
87
+ - *"Read the data from my Google Sheet"*
88
+ - *"Create a Prompteryx workflow that monitors Gmail and posts to Slack"*
89
+ - *"Run my 'Daily Report' workflow"*
90
+
91
+ ---
92
+
93
+ ## What You Can Do
94
+
95
+ ### Browser Automation (21 tools)
96
+
97
+ Navigate websites, click buttons, fill forms, extract data, take screenshots, generate PDFs, manage cookies, upload files, execute JavaScript, and more.
98
+
99
+ All browser actions run in a **cloud browser** by default — nothing to install locally.
100
+
101
+ | Tool | Description |
102
+ |------|-------------|
103
+ | `browser_navigate` | Go to a URL |
104
+ | `browser_click` | Click an element |
105
+ | `browser_fill` | Fill an input field |
106
+ | `browser_type` | Type text character by character |
107
+ | `browser_press_key` | Press keyboard keys (Enter, Tab, etc.) |
108
+ | `browser_select` | Select a dropdown option |
109
+ | `browser_check` | Check/uncheck a checkbox |
110
+ | `browser_hover` | Hover over an element |
111
+ | `browser_scroll` | Scroll the page or to an element |
112
+ | `browser_extract_text` | Get text content from an element |
113
+ | `browser_extract_attribute` | Get an HTML attribute (href, src, etc.) |
114
+ | `browser_screenshot` | Take a screenshot (returns image) |
115
+ | `browser_evaluate` | Run JavaScript in the page |
116
+ | `browser_wait` | Wait for elements, timeouts, or navigation |
117
+ | `browser_get_page_info` | Get current URL and title |
118
+ | `browser_drag_drop` | Drag and drop elements |
119
+ | `browser_set_files` | Upload files |
120
+ | `browser_get_cookies` | Read cookies |
121
+ | `browser_set_cookies` | Set cookies |
122
+ | `browser_pdf` | Generate a PDF of the page |
123
+ | `browser_close` | Close the browser session |
124
+
125
+ ### AI Browser Agent
126
+
127
+ Give natural language instructions and let the AI see the screen and act:
128
+
129
+ | Tool | Description |
130
+ |------|-------------|
131
+ | `browser_ai_action` | "Log in and download the monthly report" — the AI figures out the clicks, scrolls, and typing |
132
+
133
+ Runs in a cloud browser on `gemini-3.5-flash` by default; pass `model` for another browser-agent model (for example `claude-sonnet-5-5-vision`) and `aiVision` for a quality preset (`low` … `max-precision`). Spends AI credits and cloud-browser minutes. Say where to start inside the instruction.
134
+
135
+ ### Workflows (unique — no other MCP server has this)
136
+
137
+ | Tool | Description |
138
+ |------|-------------|
139
+ | `workflow_list` | List your saved workflows |
140
+ | `workflow_get` | Get workflow details |
141
+ | `workflow_execute` | Run a saved workflow |
142
+ | `workflow_create` | Create a workflow (from nodes or natural language) |
143
+ | `workflow_delete` | Delete a workflow |
144
+ | `workflow_add_node` | Add a node to an existing workflow |
145
+ | `workflow_record_actions` | Record browser actions → save as reusable workflow |
146
+
147
+ ### Connect Hub — 3,000 apps (5 tools)
148
+
149
+ Use the apps you have connected at [prompteryx.ai/connections](https://www.prompteryx.ai/connections) (Gmail, Google Sheets, Slack, Notion, HubSpot, Stripe, …):
150
+
151
+ | Tool | Description |
152
+ |------|-------------|
153
+ | `connect_hub_list_apps` | Browse or search the app catalogue |
154
+ | `connect_hub_list_actions` | Actions an app offers |
155
+ | `connect_hub_get_action` | Parameter schema for one action |
156
+ | `connect_hub_list_accounts` | Your connected accounts |
157
+ | `connect_hub_run_action` | Run an action with your connected account (one Connect Hub call; marked destructive so clients ask first) |
158
+
159
+ A few built-in integrations (currently `send_message`) also appear as their own tools when the matching credentials are connected.
160
+
161
+ ### Data Tools (zero cost, run locally)
162
+
163
+ | Tool | Description |
164
+ |------|-------------|
165
+ | `transform_json` | Parse, query, transform JSON data |
166
+ | `generate_uuid` | Generate a UUID |
167
+ | `base64_encode` | Encode text to Base64 |
168
+ | `base64_decode` | Decode Base64 to text |
169
+ | `format_date` | Format dates and timestamps |
170
+ | `math_operation` | Evaluate math expressions |
171
+
172
+ ### Resources
173
+
174
+ | Resource | URI | Description |
175
+ |----------|-----|-------------|
176
+ | Workflows | `prompteryx://workflows` | Your saved workflows |
177
+ | Connections | `prompteryx://connections` | Connected OAuth services |
178
+ | Usage | `prompteryx://usage` | Current usage stats and limits |
179
+
180
+ ---
181
+
182
+ ## Environment Variables
183
+
184
+ | Variable | Required | Default | Description |
185
+ |----------|----------|---------|-------------|
186
+ | `PROMPTERYX_API_KEY` | Yes | — | Your API key (`px_live_…`, from the API Keys page) |
187
+ | `PROMPTERYX_API_URL` | No | `https://www.prompteryx.ai` | API base URL |
188
+ | `PROMPTERYX_EXECUTION_MODE` | No | `cloud` | `cloud` or `local` |
189
+ | `PROMPTERYX_CHROME_PROFILE` | No | — | Chrome profile ID (local mode only) |
190
+ | `PROMPTERYX_SESSION_TIMEOUT` | No | `300000` | Session idle timeout in ms |
191
+ | `PROMPTERYX_STEALTH_MODE` | No | `true` | Bypass bot detection (Patchright) |
192
+ | `PROMPTERYX_VIDEO_RECORDING` | No | `false` | Record browser sessions (paid plans) |
193
+
194
+ ---
195
+
196
+ ## Local Browser Mode (optional)
197
+
198
+ For using your own Chrome profiles with saved logins:
199
+
200
+ 1. Download the **Prompteryx Desktop App** from [prompteryx.ai/download](https://www.prompteryx.ai/download)
201
+ 2. Install and launch it (runs in the system tray)
202
+ 3. Add to your config:
203
+
204
+ ```json
205
+ "env": {
206
+ "PROMPTERYX_API_KEY": "px_live_...",
207
+ "PROMPTERYX_EXECUTION_MODE": "local",
208
+ "PROMPTERYX_CHROME_PROFILE": "your-profile-id"
209
+ }
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Pricing
215
+
216
+ MCP usage draws on your Prompteryx plan's allowances, the same as the app and the API (prices in USD, billed monthly):
217
+
218
+ | | Free Trial | Starter ($20/mo) | Developer ($20/mo) | Pro ($45/mo) | Enterprise |
219
+ |---|---|---|---|---|---|
220
+ | Workflow runs / month | 1,500 | 3,000 | 3,000 | 12,000 | 12,000 |
221
+ | Cloud browser minutes / month | 10 | 6,000 | 6,000 | 15,000 | 1,200 |
222
+ | AI credits / month | 50 | 500 | 100 | 1,500 | 1,500 |
223
+ | Connect Hub calls / month | — | 100 | — | 300 | 20,000 |
224
+ | Video recording | — | Yes | Yes | Yes | Yes |
225
+
226
+ Access follows your balance on any plan: when credits or minutes run out, the tool says which to top up. Current numbers: [prompteryx.ai/pricing](https://www.prompteryx.ai/pricing).
227
+
228
+ ---
229
+
230
+ ## How It Compares
231
+
232
+ | Feature | Prompteryx | Playwright MCP | Zapier MCP | Puppeteer MCP |
233
+ |---------|-----------|---------------|-----------|--------------|
234
+ | Browser automation | 21 tools | 13 tools | None | 8 tools |
235
+ | Cloud browser | Yes | No | No | No |
236
+ | Chrome profiles | Yes | No | No | No |
237
+ | AI browser agent | Yes | No | No | No |
238
+ | Stealth mode | Yes | No | No | No |
239
+ | Integrations | 20+ | None | 8,000+ | None |
240
+ | Workflow builder | Yes | No | No | No |
241
+ | Action recording | Yes | No | No | No |
242
+ | Screenshots | Visual | Text-only | N/A | Yes |
243
+
244
+ ---
245
+
246
+ ## Troubleshooting
247
+
248
+ | Problem | Solution |
249
+ |---------|----------|
250
+ | "API key invalid" | Check the key starts with `px_live_` and is active on the API Keys page |
251
+ | "Cloud browser minutes exceeded" | Upgrade your plan or use `PROMPTERYX_EXECUTION_MODE=local` |
252
+ | "Integration not available" | Connect the service at [prompteryx.ai/connections](https://www.prompteryx.ai/connections) |
253
+ | "Session disconnected" | The server auto-recovers — just retry your request |
254
+ | "AI credits exhausted" | Buy an AI credits top-up in the app or wait for the monthly reset |
255
+ | Server not starting | Ensure Node.js 18+ is installed: `node --version` |
256
+
257
+ ---
258
+
259
+ ## Support
260
+
261
+ - Website: [prompteryx.ai](https://www.prompteryx.ai)
262
+ - Documentation: [docs.prompteryx.ai](https://docs.prompteryx.ai)
263
+ - Email: support@prompteryx.ai
264
+
265
+ ## License
266
+
267
+ MIT
@@ -23,6 +23,32 @@ export interface MonthlyUsage {
23
23
  cloudBrowserMinutes: number;
24
24
  aiCreditsUsed: number;
25
25
  }
26
+ /**
27
+ * Spendable balances = plan allowance left this period + purchased top-ups
28
+ * (GET /api/v1/auth/validate `balances`, lib/mcp/usage-balances.ts on the
29
+ * platform). Absent when talking to an older platform build.
30
+ */
31
+ export interface UsageBalances {
32
+ aiCredits: {
33
+ plan: number;
34
+ purchased: number;
35
+ total: number;
36
+ };
37
+ /** null = the platform could not read the quota; `remaining: null` = unmetered. */
38
+ cloudBrowserMinutes: {
39
+ planRemaining: number | null;
40
+ purchased: number;
41
+ remaining: number | null;
42
+ unlimited: boolean;
43
+ } | null;
44
+ connectHubCalls: {
45
+ planRemaining: number;
46
+ purchased: number;
47
+ remaining: number;
48
+ };
49
+ /** Operator account: every gate is bypassed. */
50
+ unlimited: boolean;
51
+ }
26
52
  export interface AuthContext {
27
53
  userId: string;
28
54
  email: string;
@@ -37,6 +63,7 @@ export interface AuthContext {
37
63
  credentials: CredentialSummary[];
38
64
  workflows: WorkflowSummary[];
39
65
  browserbaseContextId?: string;
66
+ balances?: UsageBalances;
40
67
  }
41
68
  export declare class AuthError extends Error {
42
69
  statusCode: number;
@@ -1 +1 @@
1
- {"version":3,"file":"api-key-auth.d.ts","sourceRoot":"","sources":["../../src/auth/api-key-auth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CA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