@mastra/mcp-docs-server 1.1.35-alpha.21 → 1.1.35-alpha.26
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/.docs/docs/agents/processors.md +1 -1
- package/.docs/docs/agents/signals.md +151 -0
- package/.docs/docs/browser/agent-browser.md +15 -0
- package/.docs/docs/browser/stagehand.md +25 -1
- package/.docs/docs/voice/overview.md +84 -0
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/chutes.md +23 -54
- package/.docs/models/providers/databricks.md +96 -0
- package/.docs/models/providers/novita-ai.md +5 -5
- package/.docs/models/providers/nvidia.md +59 -49
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode.md +43 -42
- package/.docs/models/providers/sarvam.md +72 -0
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/agents/agent.md +83 -0
- package/.docs/reference/browser/agent-browser.md +37 -11
- package/.docs/reference/browser/stagehand-browser.md +35 -9
- package/.docs/reference/client-js/agents.md +89 -0
- package/.docs/reference/index.md +3 -0
- package/.docs/reference/processors/prefill-error-handler.md +3 -3
- package/.docs/reference/storage/dsql.md +428 -0
- package/.docs/reference/tools/brightdata.md +167 -0
- package/.docs/reference/voice/inworld.md +133 -0
- package/CHANGELOG.md +21 -0
- package/package.json +5 -5
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Bright Data tools
|
|
2
|
+
|
|
3
|
+
The `@mastra/brightdata` package wraps the [Bright Data SDK](https://github.com/brightdata/bright-data-sdk-node) as Mastra-compatible tools. It exposes factory functions for web search and web fetch — each returning a tool created with [`createTool()`](https://mastra.ai/reference/tools/create-tool) that includes full Zod input/output schemas.
|
|
4
|
+
|
|
5
|
+
The search tool is backed by Bright Data's [SERP API](https://brightdata.com/products/serp-api) and the fetch tool by [Web Unlocker](https://brightdata.com/products/web-unlocker). Both bypass bot detection and CAPTCHAs.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
**npm**:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @mastra/brightdata zod
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**pnpm**:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm add @mastra/brightdata zod
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Yarn**:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
yarn add @mastra/brightdata zod
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Bun**:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
bun add @mastra/brightdata zod
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
Use `createBrightDataTools()` to get both tools with shared configuration:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { createBrightDataTools } from '@mastra/brightdata'
|
|
39
|
+
|
|
40
|
+
const { webSearch, webFetch } = createBrightDataTools()
|
|
41
|
+
// Or pass an explicit API key:
|
|
42
|
+
// const { webSearch, webFetch } = createBrightDataTools({ apiKey: 'brd-...' })
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Each tool can also be created individually:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { createBrightDataSearchTool, createBrightDataFetchTool } from '@mastra/brightdata'
|
|
49
|
+
|
|
50
|
+
const searchTool = createBrightDataSearchTool()
|
|
51
|
+
const fetchTool = createBrightDataFetchTool({ apiKey: 'brd-...' })
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
By default, all tools read `BRIGHTDATA_API_TOKEN` from the environment. You can pass `{ apiKey }` explicitly to override.
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
All factory functions accept `BrightDataClientOptions` from `@brightdata/sdk`:
|
|
59
|
+
|
|
60
|
+
**apiKey** (`string`): Bright Data API token. Falls back to the \`BRIGHTDATA\_API\_TOKEN\` environment variable.
|
|
61
|
+
|
|
62
|
+
Additional fields supported by the `bdclient` constructor (such as `timeout`, `webUnlockerZone`, `serpZone`, and `rateLimit`) can be passed through the same options object.
|
|
63
|
+
|
|
64
|
+
## `createBrightDataTools()`
|
|
65
|
+
|
|
66
|
+
Returns an object containing both tools with a shared configuration.
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { createBrightDataTools } from '@mastra/brightdata'
|
|
70
|
+
|
|
71
|
+
const tools = createBrightDataTools({ apiKey: 'brd-...' })
|
|
72
|
+
// tools.webSearch, tools.webFetch
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Returns:** `{ webSearch, webFetch }`
|
|
76
|
+
|
|
77
|
+
## `createBrightDataSearchTool()`
|
|
78
|
+
|
|
79
|
+
Creates a tool that searches Google through Bright Data's SERP API. Returns parsed organic results.
|
|
80
|
+
|
|
81
|
+
**Tool ID:** `brightdata-search`
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { createBrightDataSearchTool } from '@mastra/brightdata'
|
|
85
|
+
|
|
86
|
+
const searchTool = createBrightDataSearchTool()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Input
|
|
90
|
+
|
|
91
|
+
**query** (`string`): The search query.
|
|
92
|
+
|
|
93
|
+
**country** (`string`): Two-letter country code for geo-targeted results (for example, \`us\` or \`gb\`).
|
|
94
|
+
|
|
95
|
+
**start** (`number`): Result offset for pagination. For example, \`10\` returns the second page of 10 results.
|
|
96
|
+
|
|
97
|
+
### Output
|
|
98
|
+
|
|
99
|
+
**query** (`string`): The original search query.
|
|
100
|
+
|
|
101
|
+
**results** (`SearchResult[]`): Organic search results. Entries missing a link or title are filtered out.
|
|
102
|
+
|
|
103
|
+
**results.link** (`string`): Result URL.
|
|
104
|
+
|
|
105
|
+
**results.title** (`string`): Result title.
|
|
106
|
+
|
|
107
|
+
**results.description** (`string`): Result snippet.
|
|
108
|
+
|
|
109
|
+
**currentPage** (`number`): Page number returned by the SERP API. Defaults to \`1\` when the upstream response omits or returns a non-positive value.
|
|
110
|
+
|
|
111
|
+
## `createBrightDataFetchTool()`
|
|
112
|
+
|
|
113
|
+
Creates a tool that fetches a webpage through Bright Data's Web Unlocker and returns the page content as Markdown.
|
|
114
|
+
|
|
115
|
+
**Tool ID:** `brightdata-fetch`
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { createBrightDataFetchTool } from '@mastra/brightdata'
|
|
119
|
+
|
|
120
|
+
const fetchTool = createBrightDataFetchTool()
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Input
|
|
124
|
+
|
|
125
|
+
**url** (`string`): The URL to fetch. Must be a valid HTTP or HTTPS URL.
|
|
126
|
+
|
|
127
|
+
### Output
|
|
128
|
+
|
|
129
|
+
**url** (`string`): The input URL.
|
|
130
|
+
|
|
131
|
+
**content** (`string`): Page content as Markdown.
|
|
132
|
+
|
|
133
|
+
## Agent example
|
|
134
|
+
|
|
135
|
+
The following example demonstrates a research agent that combines search and fetch:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import { Agent } from '@mastra/core/agent'
|
|
139
|
+
import { createBrightDataTools } from '@mastra/brightdata'
|
|
140
|
+
|
|
141
|
+
const { webSearch, webFetch } = createBrightDataTools()
|
|
142
|
+
|
|
143
|
+
const agent = new Agent({
|
|
144
|
+
id: 'research-agent',
|
|
145
|
+
name: 'Research Agent',
|
|
146
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
147
|
+
instructions:
|
|
148
|
+
'You are a research assistant. Use the search tool to find relevant pages, then use the fetch tool to read full Markdown content from the best results.',
|
|
149
|
+
tools: {
|
|
150
|
+
webSearch,
|
|
151
|
+
webFetch,
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Environment variables
|
|
157
|
+
|
|
158
|
+
| Variable | Description |
|
|
159
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------- |
|
|
160
|
+
| `BRIGHTDATA_API_TOKEN` | Your Bright Data API token. Used as the default when `apiKey` is not passed to a factory function. |
|
|
161
|
+
|
|
162
|
+
## Related
|
|
163
|
+
|
|
164
|
+
- [`createTool()`](https://mastra.ai/reference/tools/create-tool)
|
|
165
|
+
- [Bright Data SERP API](https://brightdata.com/products/serp-api)
|
|
166
|
+
- [Bright Data Web Unlocker](https://brightdata.com/products/web-unlocker)
|
|
167
|
+
- [Bright Data SDK for Node.js](https://github.com/brightdata/bright-data-sdk-node)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Inworld
|
|
2
|
+
|
|
3
|
+
The Inworld voice implementation in Mastra provides streaming text-to-speech (TTS) and batch speech-to-text (STT) capabilities using Inworld AI's API. It supports multiple TTS and STT models, configurable audio encodings, and progressive audio streaming.
|
|
4
|
+
|
|
5
|
+
## Usage example
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { InworldVoice } from '@mastra/voice-inworld'
|
|
9
|
+
|
|
10
|
+
// Initialize with default configuration (uses INWORLD_API_KEY environment variable)
|
|
11
|
+
const voice = new InworldVoice()
|
|
12
|
+
|
|
13
|
+
// Initialize with custom configuration
|
|
14
|
+
const voice = new InworldVoice({
|
|
15
|
+
speechModel: {
|
|
16
|
+
name: 'inworld-tts-2',
|
|
17
|
+
apiKey: 'your-api-key',
|
|
18
|
+
},
|
|
19
|
+
listeningModel: {
|
|
20
|
+
name: 'groq/whisper-large-v3',
|
|
21
|
+
apiKey: 'your-api-key',
|
|
22
|
+
},
|
|
23
|
+
speaker: 'Dennis',
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
// Text-to-Speech (streaming)
|
|
27
|
+
const audioStream = await voice.speak('Hello, world!')
|
|
28
|
+
|
|
29
|
+
// Speech-to-Text
|
|
30
|
+
const transcript = await voice.listen(audioStream)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Constructor parameters
|
|
34
|
+
|
|
35
|
+
**speechModel** (`InworldVoiceConfig`): Configuration for text-to-speech functionality. (Default: `{ name: 'inworld-tts-2' }`)
|
|
36
|
+
|
|
37
|
+
**speechModel.name** (`'inworld-tts-2' | 'inworld-tts-1.5-max' | 'inworld-tts-1.5-mini'`): The Inworld TTS model to use.
|
|
38
|
+
|
|
39
|
+
**speechModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
40
|
+
|
|
41
|
+
**listeningModel** (`InworldListeningConfig`): Configuration for speech-to-text functionality. (Default: `{ name: 'groq/whisper-large-v3' }`)
|
|
42
|
+
|
|
43
|
+
**listeningModel.name** (`'groq/whisper-large-v3'`): The Inworld STT model to use.
|
|
44
|
+
|
|
45
|
+
**listeningModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
46
|
+
|
|
47
|
+
**speaker** (`string`): Default voice ID to use for text-to-speech. (Default: `'Dennis'`)
|
|
48
|
+
|
|
49
|
+
**audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'ALAW' | 'MULAW' | 'FLAC' | 'PCM' | 'WAV'`): Default audio encoding for TTS output. (Default: `'MP3'`)
|
|
50
|
+
|
|
51
|
+
**sampleRateHertz** (`number`): Default sample rate for TTS output. (Default: `48000`)
|
|
52
|
+
|
|
53
|
+
**language** (`string`): Default BCP-47 language code for STT. (Default: `'en-US'`)
|
|
54
|
+
|
|
55
|
+
## Methods
|
|
56
|
+
|
|
57
|
+
### `speak(input, options?)`
|
|
58
|
+
|
|
59
|
+
Converts text to speech using Inworld's streaming TTS endpoint. Returns a readable stream that emits audio chunks progressively as they arrive.
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const audioStream = await voice.speak('Hello, world!', {
|
|
63
|
+
speaker: 'Olivia',
|
|
64
|
+
audioEncoding: 'WAV',
|
|
65
|
+
sampleRateHertz: 24000,
|
|
66
|
+
speakingRate: 1.2,
|
|
67
|
+
temperature: 0.8,
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
72
|
+
|
|
73
|
+
**options** (`InworldSpeakOptions`): Additional options for speech synthesis.
|
|
74
|
+
|
|
75
|
+
**options.speaker** (`string`): Override the default speaker for this request.
|
|
76
|
+
|
|
77
|
+
**options.audioEncoding** (`AudioEncoding`): Override the default audio encoding.
|
|
78
|
+
|
|
79
|
+
**options.sampleRateHertz** (`number`): Override the default sample rate.
|
|
80
|
+
|
|
81
|
+
**options.speakingRate** (`number`): Adjust the speaking rate.
|
|
82
|
+
|
|
83
|
+
**options.temperature** (`number`): Controls voice variability. Honored on \`inworld-tts-1.5-\*\` models; ignored by \`inworld-tts-2\`.
|
|
84
|
+
|
|
85
|
+
**options.deliveryMode** (`'STABLE' | 'BALANCED' | 'CREATIVE'`): Steering control for delivery style. Only honored by \`inworld-tts-2\`.
|
|
86
|
+
|
|
87
|
+
**options.language** (`string`): BCP-47 language code for this request. Auto-detected when omitted.
|
|
88
|
+
|
|
89
|
+
**Returns:** `Promise<NodeJS.ReadableStream>`
|
|
90
|
+
|
|
91
|
+
### `listen(input, options?)`
|
|
92
|
+
|
|
93
|
+
Converts speech to text using Inworld's batch STT endpoint.
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const transcript = await voice.listen(audioStream, {
|
|
97
|
+
audioEncoding: 'MP3',
|
|
98
|
+
sampleRateHertz: 44100,
|
|
99
|
+
language: 'ja-JP',
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**input** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
104
|
+
|
|
105
|
+
**options** (`InworldListenOptions`): Additional options for transcription.
|
|
106
|
+
|
|
107
|
+
**options.audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'FLAC' | 'AUTO_DETECT'`): Audio encoding of the input stream.
|
|
108
|
+
|
|
109
|
+
**options.sampleRateHertz** (`number`): Sample rate of the input audio.
|
|
110
|
+
|
|
111
|
+
**options.language** (`string`): BCP-47 language code for transcription.
|
|
112
|
+
|
|
113
|
+
**options.numberOfChannels** (`number`): Number of audio channels in the input.
|
|
114
|
+
|
|
115
|
+
**Returns:** `Promise<string>`
|
|
116
|
+
|
|
117
|
+
### `getSpeakers()`
|
|
118
|
+
|
|
119
|
+
Returns a list of available voices from the Inworld API.
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
const speakers = await voice.getSpeakers()
|
|
123
|
+
// [{ voiceId: 'Dennis', name: 'Dennis', language: 'en', description: '...', tags: ['friendly'], source: 'SYSTEM' }, ...]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Returns:** `Promise<Array<{ voiceId: string; name: string; language: string; description: string; tags: string[]; source: string }>>`
|
|
127
|
+
|
|
128
|
+
## Notes
|
|
129
|
+
|
|
130
|
+
- The TTS endpoint uses progressive NDJSON streaming, so audio playback can begin before the full response is received.
|
|
131
|
+
- An API key can be provided via the `speechModel` or `listeningModel` config, or the `INWORLD_API_KEY` environment variable. TTS and STT keys are resolved independently: passing distinct `speechModel.apiKey` and `listeningModel.apiKey` values lets each service use its own credential. If only one is provided, it is reused for both services as a fallback before the env var.
|
|
132
|
+
- `inworld-tts-2` is the default flagship model. Use `deliveryMode` (`STABLE` | `BALANCED` | `CREATIVE`) to steer delivery style on this model. The `temperature` option is ignored on `inworld-tts-2`.
|
|
133
|
+
- The `inworld-tts-1.5-mini` model offers lower latency at the cost of reduced voice quality compared to `inworld-tts-1.5-max`.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.35-alpha.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`f984b4d`](https://github.com/mastra-ai/mastra/commit/f984b4d6c60bf2ae2a9b156f0e8c35a66fe96c91), [`ce01024`](https://github.com/mastra-ai/mastra/commit/ce010242eee9bdfc09e4c26725b9d37998679a8d), [`f984b4d`](https://github.com/mastra-ai/mastra/commit/f984b4d6c60bf2ae2a9b156f0e8c35a66fe96c91), [`8373ff4`](https://github.com/mastra-ai/mastra/commit/8373ff46745d77af79f183c4470f80fa2727a6b2), [`11c1528`](https://github.com/mastra-ai/mastra/commit/11c152848c5d0ef227184853b5040f5b41ee7b1e)]:
|
|
8
|
+
- @mastra/core@1.33.0-alpha.13
|
|
9
|
+
|
|
10
|
+
## 1.1.35-alpha.23
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`b59316f`](https://github.com/mastra-ai/mastra/commit/b59316ffa0f7688165b0f9c81ccdf85da461e5b2), [`55f1e2d`](https://github.com/mastra-ai/mastra/commit/55f1e2d65425b95a49ae788053b266f256e38c96), [`d48a705`](https://github.com/mastra-ai/mastra/commit/d48a705ff3dfbdc7a996e07ecd8293b5effd9a2a)]:
|
|
15
|
+
- @mastra/core@1.33.0-alpha.12
|
|
16
|
+
|
|
17
|
+
## 1.1.35-alpha.22
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`37c0dc5`](https://github.com/mastra-ai/mastra/commit/37c0dc5697d343db98628bf867bf71ce6deec6d7), [`ef6b584`](https://github.com/mastra-ai/mastra/commit/ef6b5847ac33c0a7e80af3a86e8801e2933dd3ee), [`4dd900d`](https://github.com/mastra-ai/mastra/commit/4dd900d75dfe9be89f8c15188b368a8622aa1e18), [`4ff5bdf`](https://github.com/mastra-ai/mastra/commit/4ff5bdfe170cba6dfb5260c6af0f4ba668430772), [`bbcd93c`](https://github.com/mastra-ai/mastra/commit/bbcd93cf7d8aa1007d6d84bfd033b8015c912087), [`308bd07`](https://github.com/mastra-ai/mastra/commit/308bd074f35cef0c75d82fc1eb19382fe04ecf6f)]:
|
|
22
|
+
- @mastra/core@1.33.0-alpha.11
|
|
23
|
+
|
|
3
24
|
## 1.1.35-alpha.20
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.35-alpha.
|
|
3
|
+
"version": "1.1.35-alpha.26",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/
|
|
33
|
-
"@mastra/
|
|
32
|
+
"@mastra/mcp": "^1.7.0",
|
|
33
|
+
"@mastra/core": "1.33.0-alpha.13"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.19.11",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsx": "^4.21.0",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "4.1.5",
|
|
49
|
-
"@
|
|
49
|
+
"@internal/lint": "0.0.92",
|
|
50
50
|
"@internal/types-builder": "0.0.67",
|
|
51
|
-
"@
|
|
51
|
+
"@mastra/core": "1.33.0-alpha.13"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|