@mastra/mcp-docs-server 1.1.27 → 1.1.28-alpha.1

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
  # ![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,232 @@
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: `false`)
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
+ **userDataDir** (`string`): Path to Chrome user data directory. Persists cookies, localStorage, and extensions across sessions.
58
+
59
+ **executablePath** (`string`): Path to a Chrome executable. Uses Playwright's bundled Chromium by default.
60
+
61
+ **timeout** (`number`): Default timeout in milliseconds for browser operations. (Default: `10000`)
62
+
63
+ **onLaunch** (`(args: { browser: MastraBrowser }) => void | Promise<void>`): Callback invoked after the browser is ready.
64
+
65
+ **onClose** (`(args: { browser: MastraBrowser }) => void | Promise<void>`): Callback invoked before the browser closes.
66
+
67
+ **screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
68
+
69
+ ## Properties
70
+
71
+ **id** (`string`): Unique identifier for this browser instance. Generated as 'browser-viewer-{timestamp}'.
72
+
73
+ **name** (`string`): 'BrowserViewer'
74
+
75
+ **provider** (`string`): 'browser-viewer'
76
+
77
+ **providerType** (`'cli'`): Always 'cli'. Distinguishes BrowserViewer from SDK-based providers like AgentBrowser.
78
+
79
+ **cli** (`'agent-browser' | 'browser-use' | 'browse-cli'`): The CLI provider this instance is configured for.
80
+
81
+ **status** (`BrowserStatus`): Current browser status: 'pending', 'launching', 'ready', 'error', 'closing', or 'closed'.
82
+
83
+ ## Methods
84
+
85
+ ### Lifecycle
86
+
87
+ #### `launch(threadId?)`
88
+
89
+ Launches Chrome. For `'shared'` scope, launches a single shared browser. For `'thread'` scope, launches a browser for the specified thread.
90
+
91
+ ```typescript
92
+ await viewer.launch()
93
+ await viewer.launch('thread-123')
94
+ ```
95
+
96
+ #### `ensureReady()`
97
+
98
+ Ensures the browser is launched and ready. For `'thread'` scope, creates a new browser for the current thread if needed.
99
+
100
+ ```typescript
101
+ await viewer.ensureReady()
102
+ ```
103
+
104
+ #### `isBrowserRunning(threadId?)`
105
+
106
+ Checks if a browser is running. For `'thread'` scope, checks the specified thread.
107
+
108
+ ```typescript
109
+ const running = viewer.isBrowserRunning()
110
+ const threadRunning = viewer.isBrowserRunning('thread-123')
111
+ ```
112
+
113
+ Returns: `boolean`
114
+
115
+ #### `close()`
116
+
117
+ Closes all browser instances and cleans up resources.
118
+
119
+ ```typescript
120
+ await viewer.close()
121
+ ```
122
+
123
+ ### CDP access
124
+
125
+ #### `getCdpUrl(threadId?)`
126
+
127
+ Returns the CDP WebSocket URL for the current or specified thread. CLI tools use this URL to connect to the managed browser.
128
+
129
+ ```typescript
130
+ const cdpUrl = viewer.getCdpUrl()
131
+ // => 'ws://127.0.0.1:52481/devtools/browser/abc...'
132
+ ```
133
+
134
+ Returns: `string | null`
135
+
136
+ #### `connectToExternalCdp(cdpUrl, threadId?)`
137
+
138
+ 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.
139
+
140
+ ```typescript
141
+ await viewer.connectToExternalCdp('wss://cloud.example.com/session', 'thread-123')
142
+ ```
143
+
144
+ ### Screencast
145
+
146
+ #### `startScreencast(options?)`
147
+
148
+ Starts streaming browser frames. Returns a `ScreencastStream` that emits frame events. Handles tab switching automatically by creating fresh CDP sessions when tabs change.
149
+
150
+ ```typescript
151
+ const stream = await viewer.startScreencast({
152
+ format: 'jpeg',
153
+ quality: 80,
154
+ })
155
+
156
+ stream.on('frame', frame => {
157
+ console.log('Frame received:', frame.data.length, 'bytes')
158
+ })
159
+
160
+ stream.on('stop', reason => {
161
+ console.log('Screencast stopped:', reason)
162
+ })
163
+ ```
164
+
165
+ Returns: `Promise<ScreencastStream>`
166
+
167
+ ### Input injection
168
+
169
+ #### `injectMouseEvent(params, threadId?)`
170
+
171
+ Injects a mouse event into the browser via CDP. Used by Studio for live interaction.
172
+
173
+ ```typescript
174
+ await viewer.injectMouseEvent({
175
+ type: 'mousePressed',
176
+ x: 100,
177
+ y: 200,
178
+ button: 'left',
179
+ clickCount: 1,
180
+ })
181
+ ```
182
+
183
+ #### `injectKeyboardEvent(params, threadId?)`
184
+
185
+ Injects a keyboard event into the browser via CDP. Used by Studio for live interaction.
186
+
187
+ ```typescript
188
+ await viewer.injectKeyboardEvent({
189
+ type: 'keyDown',
190
+ key: 'Enter',
191
+ code: 'Enter',
192
+ })
193
+ ```
194
+
195
+ ## Supported CLIs
196
+
197
+ 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.
198
+
199
+ Unlike SDK providers, `BrowserViewer` does not provide agent tools. The agent uses CLI commands through `workspace_execute_command` instead.
200
+
201
+ ### [agent-browser](https://www.npmjs.com/package/agent-browser)
202
+
203
+ Config value: `'agent-browser'` · CDP flag: `--cdp`
204
+
205
+ ```bash
206
+ npm install -g agent-browser
207
+ npx skills add vercel-labs/agent-browser
208
+ ```
209
+
210
+ ### [browser-use](https://pypi.org/project/browser-use/)
211
+
212
+ Config value: `'browser-use'` · CDP flag: `--cdp-url`
213
+
214
+ ```bash
215
+ pip install browser-use
216
+ npx skills add browser-use/browser-use --skill browser-use
217
+ ```
218
+
219
+ ### [browse-cli](https://www.npmjs.com/package/@browserbasehq/browse-cli) (command: `browse`)
220
+
221
+ Config value: `'browse-cli'` · CDP flag: `--ws`
222
+
223
+ ```bash
224
+ npm install -g @browserbasehq/browse-cli
225
+ npx skills add browserbase/skills
226
+ ```
227
+
228
+ ## Related
229
+
230
+ - [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer) — setup and usage walkthrough
231
+ - [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser) — base class API reference
232
+ - [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
 
@@ -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)