@mastra/mcp-docs-server 1.1.28-alpha.0 → 1.1.28-alpha.3

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.
@@ -1,6 +1,6 @@
1
1
  # ![OpenCode Zen logo](https://models.dev/logos/opencode.svg)OpenCode Zen
2
2
 
3
- Access 38 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
3
+ Access 39 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
6
6
 
@@ -63,6 +63,7 @@ for await (const chunk of stream) {
63
63
  | `opencode/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
64
64
  | `opencode/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
65
65
  | `opencode/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
66
+ | `opencode/hy3-preview-free` | 256K | | | | | | — | — |
66
67
  | `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
67
68
  | `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
68
69
  | `opencode/ling-2.6-flash-free` | 262K | | | | | | — | — |
@@ -1,6 +1,6 @@
1
1
  # ![Poe logo](https://models.dev/logos/poe.svg)Poe
2
2
 
3
- Access 118 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
3
+ Access 119 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Poe documentation](https://creator.poe.com/docs/external-applications/openai-compatible-api).
6
6
 
@@ -126,6 +126,7 @@ for await (const chunk of stream) {
126
126
  | `poe/openai/gpt-image-1` | 128K | | | | | | — | — |
127
127
  | `poe/openai/gpt-image-1-mini` | — | | | | | | — | — |
128
128
  | `poe/openai/gpt-image-1.5` | 128K | | | | | | — | — |
129
+ | `poe/openai/gpt-image-2` | — | | | | | | $5 | $32 |
129
130
  | `poe/openai/o1` | 200K | | | | | | $14 | $54 |
130
131
  | `poe/openai/o1-pro` | 200K | | | | | | $140 | $540 |
131
132
  | `poe/openai/o3` | 200K | | | | | | $2 | $7 |
@@ -1,6 +1,6 @@
1
1
  # ![SiliconFlow (China) logo](https://models.dev/logos/siliconflow-cn.svg)SiliconFlow (China)
2
2
 
3
- Access 79 SiliconFlow (China) models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_CN_API_KEY` environment variable.
3
+ Access 81 SiliconFlow (China) models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_CN_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [SiliconFlow (China) documentation](https://cloud.siliconflow.com/models).
6
6
 
@@ -61,7 +61,8 @@ for await (const chunk of stream) {
61
61
  | `siliconflow-cn/Pro/MiniMaxAI/MiniMax-M2.5` | 192K | | | | | | $0.30 | $1 |
62
62
  | `siliconflow-cn/Pro/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
63
63
  | `siliconflow-cn/Pro/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
64
- | `siliconflow-cn/Pro/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.55 | $3 |
64
+ | `siliconflow-cn/Pro/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $2 |
65
+ | `siliconflow-cn/Pro/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
65
66
  | `siliconflow-cn/Pro/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
66
67
  | `siliconflow-cn/Pro/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
67
68
  | `siliconflow-cn/Pro/zai-org/GLM-5.1` | 205K | | | | | | $1 | $4 |
@@ -101,6 +102,7 @@ for await (const chunk of stream) {
101
102
  | `siliconflow-cn/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.29 | $2 |
102
103
  | `siliconflow-cn/Qwen/Qwen3.5-4B` | 262K | | | | | | — | — |
103
104
  | `siliconflow-cn/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.22 | $2 |
105
+ | `siliconflow-cn/Qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.23 | $2 |
104
106
  | `siliconflow-cn/Qwen/QwQ-32B` | 131K | | | | | | $0.15 | $0.58 |
105
107
  | `siliconflow-cn/stepfun-ai/Step-3.5-Flash` | 262K | | | | | | $0.10 | $0.30 |
106
108
  | `siliconflow-cn/tencent/Hunyuan-A13B-Instruct` | 131K | | | | | | $0.14 | $0.57 |
@@ -1,6 +1,6 @@
1
1
  # ![SiliconFlow logo](https://models.dev/logos/siliconflow.svg)SiliconFlow
2
2
 
3
- Access 73 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
3
+ Access 74 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [SiliconFlow documentation](https://cloud.siliconflow.com/models).
6
6
 
@@ -54,7 +54,8 @@ for await (const chunk of stream) {
54
54
  | `siliconflow/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $0.58 | $2 |
55
55
  | `siliconflow/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
56
56
  | `siliconflow/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
57
- | `siliconflow/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.55 | $3 |
57
+ | `siliconflow/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $2 |
58
+ | `siliconflow/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
58
59
  | `siliconflow/nex-agi/DeepSeek-V3.1-Nex-N1` | 131K | | | | | | $0.50 | $2 |
59
60
  | `siliconflow/openai/gpt-oss-120b` | 131K | | | | | | $0.05 | $0.45 |
60
61
  | `siliconflow/openai/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.18 |
@@ -1,6 +1,6 @@
1
1
  # ![Together AI logo](https://models.dev/logos/togetherai.svg)Together AI
2
2
 
3
- Access 15 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
3
+ Access 16 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
6
6
 
@@ -41,6 +41,7 @@ for await (const chunk of stream) {
41
41
  | `togetherai/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
42
42
  | `togetherai/MiniMaxAI/MiniMax-M2.7` | 203K | | | | | | $0.30 | $1 |
43
43
  | `togetherai/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
44
+ | `togetherai/moonshotai/Kimi-K2.6` | 262K | | | | | | $1 | $5 |
44
45
  | `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
45
46
  | `togetherai/Qwen/Qwen3-235B-A22B-Instruct-2507-tput` | 262K | | | | | | $0.20 | $0.60 |
46
47
  | `togetherai/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` | 262K | | | | | | $2 | $2 |
@@ -218,7 +218,7 @@ const response = await agent.generate('Help me organize my day', {
218
218
 
219
219
  **options.memory.resource** (`string`): Resource identifier for organizing conversations by user, session, or context.
220
220
 
221
- **options.memory.options** (`MemoryConfig`): Additional memory configuration options including lastMessages, readOnly, semanticRecall, and workingMemory.
221
+ **options.memory.options** (`MemoryConfig`): Additional memory configuration options including lastMessages, readOnly, semanticRecall, workingMemory, and filterIncompleteToolCalls.
222
222
 
223
223
  **options.onFinish** (`LoopConfig['onFinish']`): Callback fired when generation completes.
224
224
 
@@ -0,0 +1,228 @@
1
+ # BrowserViewer
2
+
3
+ The `BrowserViewer` class provides browser automation for CLI-based tools. It launches Chrome via Playwright, exposes a Chrome DevTools Protocol (CDP) URL, and automatically injects it into CLI commands run through workspace tools.
4
+
5
+ Use `BrowserViewer` when your agent drives a browser through a CLI tool like `browser-use`, `agent-browser`, or `browse`. For SDK-based browser automation, use [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser) or [`StagehandBrowser`](https://mastra.ai/reference/browser/stagehand-browser).
6
+
7
+ ## Usage example
8
+
9
+ ```typescript
10
+ import { Workspace, LocalSandbox } from '@mastra/core/workspace'
11
+ import { BrowserViewer } from '@mastra/browser-viewer'
12
+ import { Agent } from '@mastra/core/agent'
13
+
14
+ const workspace = new Workspace({
15
+ sandbox: new LocalSandbox({
16
+ workingDirectory: './workspace',
17
+ }),
18
+ browser: new BrowserViewer({
19
+ cli: 'browser-use',
20
+ headless: false,
21
+ }),
22
+ })
23
+
24
+ const browserAgent = new Agent({
25
+ id: 'browser-agent',
26
+ model: 'openai/gpt-5.4',
27
+ workspace,
28
+ instructions: 'You are a web automation assistant.',
29
+ })
30
+ ```
31
+
32
+ ### Connecting to an existing browser
33
+
34
+ ```typescript
35
+ const viewer = new BrowserViewer({
36
+ cli: 'browser-use',
37
+ cdpUrl: 'ws://127.0.0.1:9222/devtools/browser/abc123',
38
+ })
39
+ ```
40
+
41
+ When `cdpUrl` is provided, `BrowserViewer` connects to the existing browser instead of launching a new one. Scope defaults to `'shared'`.
42
+
43
+ ## Constructor parameters
44
+
45
+ **cli** (`'agent-browser' | 'browser-use' | 'browse-cli'`): Which CLI the agent uses for browser automation. The CLI connects to Chrome via the CDP URL.
46
+
47
+ **headless** (`boolean`): Whether to run Chrome in headless mode. (Default: `true`)
48
+
49
+ **cdpUrl** (`string | (() => string | Promise<string>)`): CDP WebSocket URL for connecting to an existing browser instead of launching one.
50
+
51
+ **cdpPort** (`number`): Port for Chrome remote debugging. Only used when launching Chrome (not when connecting via cdpUrl). (Default: `0 (auto-assign)`)
52
+
53
+ **scope** (`'shared' | 'thread'`): Browser instance scope. 'thread' gives each thread its own browser. 'shared' shares one browser across all threads. Defaults to 'shared' when cdpUrl is provided. (Default: `'thread'`)
54
+
55
+ **viewport** (`{ width: number; height: number }`): Browser viewport dimensions. (Default: `{ width: 1280, height: 720 }`)
56
+
57
+ **executablePath** (`string`): Path to a Chrome executable. Uses Playwright's bundled Chromium by default.
58
+
59
+ **onLaunch** (`(args: { browser: MastraBrowser }) => void | Promise<void>`): Callback invoked after the browser is ready.
60
+
61
+ **onClose** (`(args: { browser: MastraBrowser }) => void | Promise<void>`): Callback invoked before the browser closes.
62
+
63
+ **screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
64
+
65
+ ## Properties
66
+
67
+ **id** (`string`): Unique identifier for this browser instance. Generated as 'browser-viewer-{timestamp}'.
68
+
69
+ **name** (`string`): 'BrowserViewer'
70
+
71
+ **provider** (`string`): 'browser-viewer'
72
+
73
+ **providerType** (`'cli'`): Always 'cli'. Distinguishes BrowserViewer from SDK-based providers like AgentBrowser.
74
+
75
+ **cli** (`'agent-browser' | 'browser-use' | 'browse-cli'`): The CLI provider this instance is configured for.
76
+
77
+ **status** (`BrowserStatus`): Current browser status: 'pending', 'launching', 'ready', 'error', 'closing', or 'closed'.
78
+
79
+ ## Methods
80
+
81
+ ### Lifecycle
82
+
83
+ #### `launch(threadId?)`
84
+
85
+ Launches Chrome. For `'shared'` scope, launches a single shared browser. For `'thread'` scope, launches a browser for the specified thread.
86
+
87
+ ```typescript
88
+ await viewer.launch()
89
+ await viewer.launch('thread-123')
90
+ ```
91
+
92
+ #### `ensureReady()`
93
+
94
+ Ensures the browser is launched and ready. For `'thread'` scope, creates a new browser for the current thread if needed.
95
+
96
+ ```typescript
97
+ await viewer.ensureReady()
98
+ ```
99
+
100
+ #### `isBrowserRunning(threadId?)`
101
+
102
+ Checks if a browser is running. For `'thread'` scope, checks the specified thread.
103
+
104
+ ```typescript
105
+ const running = viewer.isBrowserRunning()
106
+ const threadRunning = viewer.isBrowserRunning('thread-123')
107
+ ```
108
+
109
+ Returns: `boolean`
110
+
111
+ #### `close()`
112
+
113
+ Closes all browser instances and cleans up resources.
114
+
115
+ ```typescript
116
+ await viewer.close()
117
+ ```
118
+
119
+ ### CDP access
120
+
121
+ #### `getCdpUrl(threadId?)`
122
+
123
+ Returns the CDP WebSocket URL for the current or specified thread. CLI tools use this URL to connect to the managed browser.
124
+
125
+ ```typescript
126
+ const cdpUrl = viewer.getCdpUrl()
127
+ // => 'ws://127.0.0.1:52481/devtools/browser/abc...'
128
+ ```
129
+
130
+ Returns: `string | null`
131
+
132
+ #### `connectToExternalCdp(cdpUrl, threadId?)`
133
+
134
+ Connects to an external browser via CDP URL for screencast. Use this when the agent provides its own browser endpoint (for example, a cloud browser service). BrowserViewer connects for screencast without managing the browser lifecycle.
135
+
136
+ ```typescript
137
+ await viewer.connectToExternalCdp('wss://cloud.example.com/session', 'thread-123')
138
+ ```
139
+
140
+ ### Screencast
141
+
142
+ #### `startScreencast(options?)`
143
+
144
+ Starts streaming browser frames. Returns a `ScreencastStream` that emits frame events. Handles tab switching automatically by creating fresh CDP sessions when tabs change.
145
+
146
+ ```typescript
147
+ const stream = await viewer.startScreencast({
148
+ format: 'jpeg',
149
+ quality: 80,
150
+ })
151
+
152
+ stream.on('frame', frame => {
153
+ console.log('Frame received:', frame.data.length, 'bytes')
154
+ })
155
+
156
+ stream.on('stop', reason => {
157
+ console.log('Screencast stopped:', reason)
158
+ })
159
+ ```
160
+
161
+ Returns: `Promise<ScreencastStream>`
162
+
163
+ ### Input injection
164
+
165
+ #### `injectMouseEvent(params, threadId?)`
166
+
167
+ Injects a mouse event into the browser via CDP. Used by Studio for live interaction.
168
+
169
+ ```typescript
170
+ await viewer.injectMouseEvent({
171
+ type: 'mousePressed',
172
+ x: 100,
173
+ y: 200,
174
+ button: 'left',
175
+ clickCount: 1,
176
+ })
177
+ ```
178
+
179
+ #### `injectKeyboardEvent(params, threadId?)`
180
+
181
+ Injects a keyboard event into the browser via CDP. Used by Studio for live interaction.
182
+
183
+ ```typescript
184
+ await viewer.injectKeyboardEvent({
185
+ type: 'keyDown',
186
+ key: 'Enter',
187
+ code: 'Enter',
188
+ })
189
+ ```
190
+
191
+ ## Supported CLIs
192
+
193
+ Each CLI must be installed separately. Each also publishes a [skill](https://mastra.ai/docs/workspace/skills) that teaches the agent its commands and workflows. When a CLI command runs through `workspace_execute_command`, Mastra detects it and injects the CDP URL automatically using the correct flag.
194
+
195
+ Unlike SDK providers, `BrowserViewer` does not provide agent tools. The agent uses CLI commands through `workspace_execute_command` instead.
196
+
197
+ ### [agent-browser](https://www.npmjs.com/package/agent-browser)
198
+
199
+ Config value: `'agent-browser'` · CDP flag: `--cdp`
200
+
201
+ ```bash
202
+ npm install -g agent-browser
203
+ npx skills add vercel-labs/agent-browser
204
+ ```
205
+
206
+ ### [browser-use](https://pypi.org/project/browser-use/)
207
+
208
+ Config value: `'browser-use'` · CDP flag: `--cdp-url`
209
+
210
+ ```bash
211
+ pip install browser-use
212
+ npx skills add browser-use/browser-use --skill browser-use
213
+ ```
214
+
215
+ ### [browse-cli](https://www.npmjs.com/package/@browserbasehq/browse-cli) (command: `browse`)
216
+
217
+ Config value: `'browse-cli'` · CDP flag: `--ws`
218
+
219
+ ```bash
220
+ npm install -g @browserbasehq/browse-cli
221
+ npx skills add browserbase/skills
222
+ ```
223
+
224
+ ## Related
225
+
226
+ - [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer) — setup and usage walkthrough
227
+ - [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser) — base class API reference
228
+ - [Workspace overview](https://mastra.ai/docs/workspace/overview) — workspace configuration
@@ -6,6 +6,7 @@ You don't instantiate `MastraBrowser` directly. Instead, use a provider implemen
6
6
 
7
7
  - [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser): Deterministic browser automation using refs
8
8
  - [`StagehandBrowser`](https://mastra.ai/reference/browser/stagehand-browser): AI-powered browser automation using natural language
9
+ - [`BrowserViewer`](https://mastra.ai/reference/browser/browser-viewer): CLI-based browser automation with CDP URL injection
9
10
 
10
11
  ## Usage example
11
12
 
@@ -33,7 +34,7 @@ export const browserAgent = new Agent({
33
34
 
34
35
  **viewport** (`{ width: number; height: number }`): Browser viewport dimensions. Controls the size of the browser window. (Default: `{ width: 1280, height: 720 }`)
35
36
 
36
- **timeout** (`number`): Default timeout in milliseconds for browser operations. (Default: `10000`)
37
+ **timeout** (`number`): Default timeout in milliseconds. Each provider defines its own semantics and default. See the provider reference for details.
37
38
 
38
39
  **cdpUrl** (`string | (() => string | Promise<string>)`): CDP WebSocket URL, HTTP endpoint, or sync/async provider function. When provided, connects to an existing browser instead of launching a new one. HTTP endpoints are resolved to WebSocket internally. Can't be used with scope: 'thread' (automatically uses shared scope).
39
40
 
@@ -52,7 +52,7 @@ Use stagehand_extract to get data from pages.`,
52
52
 
53
53
  **scope** (`'shared' | 'thread'`): Browser instance scope across threads. (Default: `'thread' (or 'shared' when cdpUrl is provided)`)
54
54
 
55
- **timeout** (`number`): Default timeout in milliseconds for browser operations. (Default: `10000`)
55
+ **timeout** (`number`): Default timeout in milliseconds for Stagehand operations. (Default: `30000`)
56
56
 
57
57
  **onLaunch** (`(args: { browser: MastraBrowser }) => void | Promise<void>`): Callback invoked after the browser is ready.
58
58
 
@@ -41,6 +41,7 @@ The Reference section provides documentation of Mastra's API, including paramete
41
41
  - [Supabase](https://mastra.ai/reference/auth/supabase)
42
42
  - [WorkOS](https://mastra.ai/reference/auth/workos)
43
43
  - [AgentBrowser](https://mastra.ai/reference/browser/agent-browser)
44
+ - [BrowserViewer](https://mastra.ai/reference/browser/browser-viewer)
44
45
  - [MastraBrowser Class](https://mastra.ai/reference/browser/mastra-browser)
45
46
  - [StagehandBrowser](https://mastra.ai/reference/browser/stagehand-browser)
46
47
  - [create-mastra](https://mastra.ai/reference/cli/create-mastra)
@@ -291,6 +292,7 @@ The Reference section provides documentation of Mastra's API, including paramete
291
292
  - [GCSFilesystem](https://mastra.ai/reference/workspace/gcs-filesystem)
292
293
  - [LocalFilesystem](https://mastra.ai/reference/workspace/local-filesystem)
293
294
  - [LocalSandbox](https://mastra.ai/reference/workspace/local-sandbox)
295
+ - [ModalSandbox](https://mastra.ai/reference/workspace/modal-sandbox)
294
296
  - [S3Filesystem](https://mastra.ai/reference/workspace/s3-filesystem)
295
297
  - [SandboxProcessManager](https://mastra.ai/reference/workspace/process-manager)
296
298
  - [VercelSandbox](https://mastra.ai/reference/workspace/vercel)