@mastra/mcp-docs-server 0.13.40-alpha.0 → 0.13.41-alpha.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/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +43 -43
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +12 -12
- package/.docs/organized/changelogs/create-mastra.md +5 -5
- package/.docs/organized/changelogs/mastra.md +23 -23
- package/.docs/raw/reference/vectors/pinecone.mdx +16 -1
- package/.docs/raw/reference/voice/azure.mdx +95 -80
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/prompts/migration.d.ts +3 -0
- package/dist/prompts/migration.d.ts.map +1 -0
- package/dist/stdio.js +148 -1
- package/dist/tools/migration.d.ts +40 -0
- package/dist/tools/migration.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -8,6 +8,8 @@ description: "Documentation for the AzureVoice class, providing text-to-speech a
|
|
|
8
8
|
The AzureVoice class in Mastra provides text-to-speech and speech-to-text capabilities using Microsoft Azure Cognitive Services.
|
|
9
9
|
|
|
10
10
|
## Usage Example
|
|
11
|
+
This requires Azure Speech Services credentials that can be provided through environment variables or directly in the configuration:
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
```typescript
|
|
13
15
|
import { AzureVoice } from "@mastra/voice-azure";
|
|
@@ -15,29 +17,25 @@ import { AzureVoice } from "@mastra/voice-azure";
|
|
|
15
17
|
// Initialize with configuration
|
|
16
18
|
const voice = new AzureVoice({
|
|
17
19
|
speechModel: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
apiKey: "your-azure-speech-api-key", // Or use AZURE_API_KEY env var
|
|
21
|
+
region: "eastus", // Or use AZURE_REGION env var
|
|
22
|
+
voiceName: "en-US-AriaNeural", // Optional: specific voice for TTS
|
|
21
23
|
},
|
|
22
24
|
listeningModel: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
apiKey: "your-azure-speech-api-key", // Or use AZURE_API_KEY env var
|
|
26
|
+
region: "eastus", // Or use AZURE_REGION env var
|
|
27
|
+
language: "en-US", // Optional: recognition language for STT
|
|
26
28
|
},
|
|
27
|
-
speaker: "en-US-JennyNeural", //
|
|
29
|
+
speaker: "en-US-JennyNeural", // Optional: default voice
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
// Convert text to speech
|
|
31
33
|
const audioStream = await voice.speak("Hello, how can I help you?", {
|
|
32
|
-
speaker: "en-US-GuyNeural", //
|
|
33
|
-
style: "cheerful", // Voice style
|
|
34
|
+
speaker: "en-US-GuyNeural", // Optional: override default voice
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
// Convert speech to text
|
|
37
|
-
const text = await voice.listen(audioStream
|
|
38
|
-
filetype: "wav",
|
|
39
|
-
language: "en-US",
|
|
40
|
-
});
|
|
38
|
+
const text = await voice.listen(audioStream);
|
|
41
39
|
```
|
|
42
40
|
|
|
43
41
|
## Configuration
|
|
@@ -69,26 +67,36 @@ const text = await voice.listen(audioStream, {
|
|
|
69
67
|
|
|
70
68
|
### AzureSpeechConfig
|
|
71
69
|
|
|
70
|
+
Configuration object for speech synthesis (`speechModel`) and recognition (`listeningModel`).
|
|
71
|
+
|
|
72
72
|
<PropertiesTable
|
|
73
73
|
content={[
|
|
74
74
|
{
|
|
75
|
-
name: "
|
|
76
|
-
type: "
|
|
77
|
-
description:
|
|
75
|
+
name: "apiKey",
|
|
76
|
+
type: "string",
|
|
77
|
+
description:
|
|
78
|
+
"Azure Speech Services API key (NOT Azure OpenAI key). Falls back to AZURE_API_KEY environment variable.",
|
|
78
79
|
isOptional: true,
|
|
79
80
|
},
|
|
80
81
|
{
|
|
81
|
-
name: "
|
|
82
|
+
name: "region",
|
|
82
83
|
type: "string",
|
|
83
84
|
description:
|
|
84
|
-
"Azure
|
|
85
|
+
"Azure region (e.g., 'eastus', 'westeurope'). Falls back to AZURE_REGION environment variable.",
|
|
85
86
|
isOptional: true,
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
|
-
name: "
|
|
89
|
+
name: "voiceName",
|
|
90
|
+
type: "string",
|
|
91
|
+
description:
|
|
92
|
+
"Voice ID for speech synthesis (e.g., 'en-US-AriaNeural', 'en-US-JennyNeural'). Only used in speechModel. See voice list below.",
|
|
93
|
+
isOptional: true,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "language",
|
|
89
97
|
type: "string",
|
|
90
98
|
description:
|
|
91
|
-
"
|
|
99
|
+
"Recognition language code (e.g., 'en-US', 'fr-FR'). Only used in listeningModel.",
|
|
92
100
|
isOptional: true,
|
|
93
101
|
},
|
|
94
102
|
]}
|
|
@@ -111,32 +119,14 @@ Converts text to speech using Azure's neural text-to-speech service.
|
|
|
111
119
|
{
|
|
112
120
|
name: "options.speaker",
|
|
113
121
|
type: "string",
|
|
114
|
-
description: "Voice ID to use for speech synthesis.",
|
|
122
|
+
description: "Voice ID to use for speech synthesis (e.g., 'en-US-JennyNeural'). Overrides the default voice.",
|
|
115
123
|
isOptional: true,
|
|
116
124
|
defaultValue: "Constructor's speaker value",
|
|
117
125
|
},
|
|
118
|
-
{
|
|
119
|
-
name: "options.style",
|
|
120
|
-
type: "string",
|
|
121
|
-
description: "Speaking style (e.g., 'cheerful', 'sad', 'angry').",
|
|
122
|
-
isOptional: true,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: "options.rate",
|
|
126
|
-
type: "string",
|
|
127
|
-
description: "Speaking rate (e.g., 'slow', 'medium', 'fast').",
|
|
128
|
-
isOptional: true,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: "options.pitch",
|
|
132
|
-
type: "string",
|
|
133
|
-
description: "Voice pitch (e.g., 'low', 'medium', 'high').",
|
|
134
|
-
isOptional: true,
|
|
135
|
-
},
|
|
136
126
|
]}
|
|
137
127
|
/>
|
|
138
128
|
|
|
139
|
-
Returns: `Promise<NodeJS.ReadableStream>`
|
|
129
|
+
Returns: `Promise<NodeJS.ReadableStream>` - Audio stream in WAV format
|
|
140
130
|
|
|
141
131
|
### listen()
|
|
142
132
|
|
|
@@ -147,31 +137,19 @@ Transcribes audio using Azure's speech-to-text service.
|
|
|
147
137
|
{
|
|
148
138
|
name: "audioStream",
|
|
149
139
|
type: "NodeJS.ReadableStream",
|
|
150
|
-
description: "Audio stream to transcribe.",
|
|
140
|
+
description: "Audio stream to transcribe. Must be in WAV format.",
|
|
151
141
|
isOptional: false,
|
|
152
142
|
},
|
|
153
|
-
{
|
|
154
|
-
name: "options.filetype",
|
|
155
|
-
type: "string",
|
|
156
|
-
description: "Audio format of the input stream.",
|
|
157
|
-
isOptional: true,
|
|
158
|
-
defaultValue: "'wav'",
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
name: "options.language",
|
|
162
|
-
type: "string",
|
|
163
|
-
description: "Language code for transcription.",
|
|
164
|
-
isOptional: true,
|
|
165
|
-
defaultValue: "'en-US'",
|
|
166
|
-
},
|
|
167
143
|
]}
|
|
168
144
|
/>
|
|
169
145
|
|
|
170
|
-
Returns: `Promise<string>`
|
|
146
|
+
Returns: `Promise<string>` - The recognized text from the audio
|
|
147
|
+
|
|
148
|
+
**Note:** Language and recognition settings are configured in the `listeningModel` configuration during initialization, not passed as options to this method.
|
|
171
149
|
|
|
172
150
|
### getSpeakers()
|
|
173
151
|
|
|
174
|
-
Returns an array of available voice options, where each node contains:
|
|
152
|
+
Returns an array of available voice options (200+ voices), where each node contains:
|
|
175
153
|
|
|
176
154
|
<PropertiesTable
|
|
177
155
|
content={[
|
|
@@ -179,40 +157,77 @@ Returns an array of available voice options, where each node contains:
|
|
|
179
157
|
name: "voiceId",
|
|
180
158
|
type: "string",
|
|
181
159
|
description:
|
|
182
|
-
"Unique identifier for the voice (e.g., 'en-US-JennyNeural')",
|
|
183
|
-
isOptional: false,
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
name: "name",
|
|
187
|
-
type: "string",
|
|
188
|
-
description: "Human-readable name of the voice",
|
|
160
|
+
"Unique identifier for the voice (e.g., 'en-US-JennyNeural', 'fr-FR-DeniseNeural')",
|
|
189
161
|
isOptional: false,
|
|
190
162
|
},
|
|
191
163
|
{
|
|
192
|
-
name: "
|
|
164
|
+
name: "language",
|
|
193
165
|
type: "string",
|
|
194
|
-
description: "Language
|
|
166
|
+
description: "Language code extracted from voice ID (e.g., 'en', 'fr')",
|
|
195
167
|
isOptional: false,
|
|
196
168
|
},
|
|
197
169
|
{
|
|
198
|
-
name: "
|
|
170
|
+
name: "region",
|
|
199
171
|
type: "string",
|
|
200
|
-
description: "
|
|
172
|
+
description: "Region code extracted from voice ID (e.g., 'US', 'GB', 'FR')",
|
|
201
173
|
isOptional: false,
|
|
202
174
|
},
|
|
203
|
-
{
|
|
204
|
-
name: "styles",
|
|
205
|
-
type: "string[]",
|
|
206
|
-
description: "Available speaking styles for the voice",
|
|
207
|
-
isOptional: true,
|
|
208
|
-
},
|
|
209
175
|
]}
|
|
210
176
|
/>
|
|
211
177
|
|
|
212
|
-
|
|
178
|
+
Returns: `Promise<Array<{ voiceId: string; language: string; region: string; }>>`
|
|
179
|
+
|
|
180
|
+
## Important Notes
|
|
181
|
+
|
|
182
|
+
### Azure Speech Services vs Azure OpenAI
|
|
183
|
+
|
|
184
|
+
**⚠️ Critical:** This package uses **Azure Speech Services**, which is different from **Azure OpenAI Services**.
|
|
185
|
+
|
|
186
|
+
- **DO NOT** use your `AZURE_OPENAI_API_KEY` for this package
|
|
187
|
+
- **DO** use an Azure Speech Services subscription key (obtain from Azure Portal under "Speech Services")
|
|
188
|
+
- These are separate Azure resources with different API keys and endpoints
|
|
189
|
+
|
|
190
|
+
### Environment Variables
|
|
191
|
+
|
|
192
|
+
API keys and regions can be provided via constructor options or environment variables:
|
|
193
|
+
|
|
194
|
+
- `AZURE_API_KEY` - Your Azure Speech Services subscription key
|
|
195
|
+
- `AZURE_REGION` - Your Azure region (e.g., 'eastus', 'westeurope')
|
|
196
|
+
|
|
197
|
+
### Voice Capabilities
|
|
198
|
+
|
|
199
|
+
- Azure offers 200+ neural voices across 50+ languages
|
|
200
|
+
- Each voice ID follows the format: `{language}-{region}-{name}Neural` (e.g., 'en-US-JennyNeural')
|
|
201
|
+
- Some voices include multilingual support or HD quality variants
|
|
202
|
+
- Audio output is in WAV format
|
|
203
|
+
- Audio input for recognition must be in WAV format
|
|
204
|
+
|
|
205
|
+
## Available Voices
|
|
206
|
+
|
|
207
|
+
Azure provides 200+ neural voices across many languages. Some popular English voices include:
|
|
208
|
+
|
|
209
|
+
- **US English:**
|
|
210
|
+
- `en-US-AriaNeural` (Female, default)
|
|
211
|
+
- `en-US-JennyNeural` (Female)
|
|
212
|
+
- `en-US-GuyNeural` (Male)
|
|
213
|
+
- `en-US-DavisNeural` (Male)
|
|
214
|
+
- `en-US-AvaNeural` (Female)
|
|
215
|
+
- `en-US-AndrewNeural` (Male)
|
|
216
|
+
|
|
217
|
+
- **British English:**
|
|
218
|
+
- `en-GB-SoniaNeural` (Female)
|
|
219
|
+
- `en-GB-RyanNeural` (Male)
|
|
220
|
+
- `en-GB-LibbyNeural` (Female)
|
|
221
|
+
|
|
222
|
+
- **Australian English:**
|
|
223
|
+
- `en-AU-NatashaNeural` (Female)
|
|
224
|
+
- `en-AU-WilliamNeural` (Male)
|
|
225
|
+
|
|
226
|
+
To get a complete list of all 200+ voices:
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
const voices = await voice.getSpeakers();
|
|
230
|
+
console.log(voices); // Array of { voiceId, language, region }
|
|
231
|
+
```
|
|
213
232
|
|
|
214
|
-
|
|
215
|
-
- Azure offers a wide range of neural voices across many languages
|
|
216
|
-
- Some voices support speaking styles like cheerful, sad, angry, etc.
|
|
217
|
-
- Speech recognition supports multiple audio formats and languages
|
|
218
|
-
- Azure's speech services provide high-quality neural voices with natural-sounding speech
|
|
233
|
+
For more information, see the [Azure Neural TTS documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=tts).
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 0.13.41-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add migration tool to mcp docs server for stable branch that will let users know to upgrade mcp docs server @latest to @beta to get the proper migration tool. ([#10200](https://github.com/mastra-ai/mastra/pull/10200))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f21ed89`](https://github.com/mastra-ai/mastra/commit/f21ed89577cfa00d616f10eaf10d8feb096f283e), [`eebb7bb`](https://github.com/mastra-ai/mastra/commit/eebb7bb407c57342a3be3a2efbe68c696589feeb), [`c6e6d07`](https://github.com/mastra-ai/mastra/commit/c6e6d071ecf346a80dceab410af2c567c7e66a57), [`0e6df8f`](https://github.com/mastra-ai/mastra/commit/0e6df8f66340992cb1b319834657deb17368de52), [`6295fd7`](https://github.com/mastra-ai/mastra/commit/6295fd783d49075d5bf2c18ff9486e94d36aaa56), [`d813cf7`](https://github.com/mastra-ai/mastra/commit/d813cf7251695d85cc60469058384ffa74974484)]:
|
|
10
|
+
- @mastra/mcp@0.14.3-alpha.0
|
|
11
|
+
- @mastra/core@0.24.2-alpha.0
|
|
12
|
+
|
|
13
|
+
## 0.13.40
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`0a0aa87`](https://github.com/mastra-ai/mastra/commit/0a0aa87910dd9234ae11e8146fbf54d71f0b1516), [`56bbbd0`](https://github.com/mastra-ai/mastra/commit/56bbbd0eb4510455ff03d6bf2827fdbd307938be), [`d576fd8`](https://github.com/mastra-ai/mastra/commit/d576fd8f2a3c61bcf2f7d5d2bdfb496d442c46c2), [`5e48406`](https://github.com/mastra-ai/mastra/commit/5e48406766fa94e2b7c56b70fb7d6068cf7f3989), [`7fcce62`](https://github.com/mastra-ai/mastra/commit/7fcce62880c3525fbf752d59c0ac2c478cffe024), [`16a324f`](https://github.com/mastra-ai/mastra/commit/16a324f8c30a07d0d899bc2e4e7998c6b40a4cb6), [`26aee16`](https://github.com/mastra-ai/mastra/commit/26aee160149e7acb84a533bf45631aaed6dd7077), [`b063a81`](https://github.com/mastra-ai/mastra/commit/b063a8144176915a766ea15888e1e8a06a020776), [`5ff9462`](https://github.com/mastra-ai/mastra/commit/5ff9462691c80a6841b014bcc68f6a85c3fd3fbf)]:
|
|
18
|
+
- @mastra/core@0.24.1
|
|
19
|
+
|
|
3
20
|
## 0.13.40-alpha.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAmBxC,QAAA,IAAI,MAAM,EAAE,SAAS,CAAC;AAiCtB,iBAAe,SAAS,kBAQvB;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/prompts/migration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiDpD,eAAO,MAAM,uBAAuB,EAAE,gBAcrC,CAAC"}
|
package/dist/stdio.js
CHANGED
|
@@ -102,6 +102,64 @@ function createLogger(server2) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
var logger = createLogger();
|
|
105
|
+
|
|
106
|
+
// src/prompts/migration.ts
|
|
107
|
+
var UPGRADE_MESSAGE = `# Migration Guide Upgrade Required
|
|
108
|
+
|
|
109
|
+
To access migration guides for upgrading to Mastra v1.0-beta, you need to upgrade your mcp-docs-server to the beta version.
|
|
110
|
+
|
|
111
|
+
## How to Upgrade
|
|
112
|
+
|
|
113
|
+
The migration tool and prompts are only available in the beta version of the mcp-docs-server.
|
|
114
|
+
|
|
115
|
+
Visit the installation guide for detailed instructions on how to upgrade to the beta version:
|
|
116
|
+
|
|
117
|
+
https://mastra.ai/docs/v1/getting-started/mcp-docs-server#installation
|
|
118
|
+
|
|
119
|
+
Once upgraded, you'll be able to:
|
|
120
|
+
- Browse migration guides with the \`mastraMigration\` tool
|
|
121
|
+
- Use migration prompts like \`upgrade-to-v1\` and \`migration-checklist\`
|
|
122
|
+
- Get step-by-step migration instructions for each breaking change
|
|
123
|
+
- Use automated codemods to handle many migrations automatically
|
|
124
|
+
|
|
125
|
+
## Why Beta?
|
|
126
|
+
|
|
127
|
+
The migration guides are specific to the v1.0-beta release and are actively being updated as the beta evolves. The stable (0.x) documentation server doesn't include these guides as they're not relevant to users on the stable version.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
**Note:** This message is shown because you're currently using the stable (@latest) version of @mastra/mcp-docs-server. Upgrade to @beta to access migration guides and prompts.`;
|
|
132
|
+
var migrationPrompts = [
|
|
133
|
+
{
|
|
134
|
+
name: "upgrade-to-v1",
|
|
135
|
+
description: 'Get a guided migration plan for upgrading from Mastra v0.x to v1.0-beta. Optionally specify an area (e.g., "agent", "workflow") to focus on.',
|
|
136
|
+
arguments: [
|
|
137
|
+
{
|
|
138
|
+
name: "area",
|
|
139
|
+
description: 'Optional: A specific area to focus the migration guide on (e.g., "agent", "workflow", "tools")',
|
|
140
|
+
required: false
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "migration-checklist",
|
|
146
|
+
description: "Get a comprehensive checklist for migrating to Mastra v1.0-beta. Lists all breaking changes organized by area."
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
var migrationPromptMessages = {
|
|
150
|
+
listPrompts: async () => migrationPrompts,
|
|
151
|
+
getPromptMessages: async () => {
|
|
152
|
+
return [
|
|
153
|
+
{
|
|
154
|
+
role: "user",
|
|
155
|
+
content: {
|
|
156
|
+
type: "text",
|
|
157
|
+
text: UPGRADE_MESSAGE
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
};
|
|
105
163
|
var BLOG_BASE_URL = process.env.BLOG_URL || "https://mastra.ai";
|
|
106
164
|
async function fetchBlogPosts() {
|
|
107
165
|
void logger.debug("Fetching list of blog posts");
|
|
@@ -1090,6 +1148,93 @@ var examplesTool = {
|
|
|
1090
1148
|
}
|
|
1091
1149
|
}
|
|
1092
1150
|
};
|
|
1151
|
+
var migrationInputSchema = z.object({
|
|
1152
|
+
path: z.string().optional().describe(
|
|
1153
|
+
'Path to the migration guide (e.g., "upgrade-to-v1/agent", "agentnetwork"). If not provided, lists all available migrations.\n\nExample migration paths:\n- agentnetwork\n- upgrade-to-v1/agent\n- upgrade-to-v1/cli\n- upgrade-to-v1/client\n- upgrade-to-v1/evals\n...'
|
|
1154
|
+
),
|
|
1155
|
+
listSections: z.boolean().optional().describe("Set to true to list all section headers in a migration guide without fetching full content."),
|
|
1156
|
+
sections: z.array(z.string()).optional().describe(
|
|
1157
|
+
"Specific section titles to fetch from the migration guide. If not provided, returns the entire guide. Use this after exploring section headers."
|
|
1158
|
+
),
|
|
1159
|
+
queryKeywords: z.array(z.string()).optional().describe("Keywords to search across all migration guides. Use this to find guides related to specific topics.")
|
|
1160
|
+
});
|
|
1161
|
+
var UPGRADE_MESSAGE2 = `# Migration Guide Upgrade Required
|
|
1162
|
+
|
|
1163
|
+
To access migration guides for upgrading to Mastra v1.0-beta, you need to upgrade your mcp-docs-server to the beta version.
|
|
1164
|
+
|
|
1165
|
+
## How to Upgrade
|
|
1166
|
+
|
|
1167
|
+
The migration tool is only available in the beta version of the mcp-docs-server.
|
|
1168
|
+
|
|
1169
|
+
1. **Update your MCP server configuration** to use the beta version. Visit the installation guide for detailed instructions:
|
|
1170
|
+
|
|
1171
|
+
https://mastra.ai/docs/v1/getting-started/mcp-docs-server#installation
|
|
1172
|
+
|
|
1173
|
+
2. **Restart your MCP server** after updating to pick up the beta version
|
|
1174
|
+
|
|
1175
|
+
3. **Access migration guides** - Once upgraded, you'll be able to:
|
|
1176
|
+
- Browse migration guides with the \`mastraMigration\` tool
|
|
1177
|
+
- Get step-by-step migration instructions for each breaking change
|
|
1178
|
+
- Use automated codemods to handle many migrations automatically
|
|
1179
|
+
|
|
1180
|
+
## Why Beta?
|
|
1181
|
+
|
|
1182
|
+
The migration guides are specific to the v1.0-beta release and are actively being updated as the beta evolves. The stable (0.x) documentation server doesn't include these guides as they're not relevant to users on the stable version.
|
|
1183
|
+
|
|
1184
|
+
## Need Help?
|
|
1185
|
+
|
|
1186
|
+
If you have questions about upgrading:
|
|
1187
|
+
- Check the Mastra documentation at https://mastra.ai/docs
|
|
1188
|
+
- Visit the GitHub repository for issues and discussions
|
|
1189
|
+
- Join the Mastra community for support
|
|
1190
|
+
|
|
1191
|
+
---
|
|
1192
|
+
|
|
1193
|
+
**Note:** This message is shown because you're currently using the stable (@latest) version of @mastra/mcp-docs-server. Upgrade to @beta to access migration guides.`;
|
|
1194
|
+
var migrationTool = {
|
|
1195
|
+
name: "mastraMigration",
|
|
1196
|
+
description: `Get migration guidance for Mastra version upgrades and breaking changes.
|
|
1197
|
+
|
|
1198
|
+
This tool works like a file browser - navigate through directories to find migration guides:
|
|
1199
|
+
|
|
1200
|
+
**Step 1: List top-level migrations**
|
|
1201
|
+
- Call with no parameters: \`{}\`
|
|
1202
|
+
- Shows all top-level migration guides and directories
|
|
1203
|
+
|
|
1204
|
+
**Step 2: Navigate into a directory**
|
|
1205
|
+
- Add trailing slash to explore: \`{ path: "upgrade-to-v1/" }\`
|
|
1206
|
+
- Lists all migration guides in that directory
|
|
1207
|
+
|
|
1208
|
+
**Step 3: View a migration guide**
|
|
1209
|
+
- Without trailing slash: \`{ path: "upgrade-to-v1/agent" }\`
|
|
1210
|
+
- Returns the full migration guide content
|
|
1211
|
+
|
|
1212
|
+
**Step 4: Explore guide sections (optional)**
|
|
1213
|
+
- List sections: \`{ path: "upgrade-to-v1/agent", listSections: true }\`
|
|
1214
|
+
- Get specific sections: \`{ path: "upgrade-to-v1/agent", sections: ["Voice methods"] }\`
|
|
1215
|
+
|
|
1216
|
+
**Alternative: Search by keywords**
|
|
1217
|
+
- \`{ queryKeywords: ["RuntimeContext", "pagination"] }\`
|
|
1218
|
+
|
|
1219
|
+
**Examples:**
|
|
1220
|
+
1. List top-level: \`{}\`
|
|
1221
|
+
2. Navigate to upgrade-to-v1: \`{ path: "upgrade-to-v1/" }\`
|
|
1222
|
+
3. Get agent guide: \`{ path: "upgrade-to-v1/agent" }\`
|
|
1223
|
+
4. List guide sections: \`{ path: "upgrade-to-v1/agent", listSections: true }\`
|
|
1224
|
+
5. Search: \`{ queryKeywords: ["RuntimeContext"] }\`
|
|
1225
|
+
|
|
1226
|
+
**Tip:** Paths ending with \`/\` list directory contents. Paths without \`/\` fetch the migration guide.`,
|
|
1227
|
+
parameters: migrationInputSchema,
|
|
1228
|
+
execute: async (args) => {
|
|
1229
|
+
void logger.debug("Executing mastraMigration tool (stub version)", { args });
|
|
1230
|
+
try {
|
|
1231
|
+
return UPGRADE_MESSAGE2;
|
|
1232
|
+
} catch (error) {
|
|
1233
|
+
void logger.error("Failed to execute mastraMigration tool", error);
|
|
1234
|
+
throw error;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1093
1238
|
|
|
1094
1239
|
// src/index.ts
|
|
1095
1240
|
var server;
|
|
@@ -1110,12 +1255,14 @@ server = new MCPServer({
|
|
|
1110
1255
|
mastraDocs: docsTool,
|
|
1111
1256
|
mastraExamples: examplesTool,
|
|
1112
1257
|
mastraChanges: changesTool,
|
|
1258
|
+
mastraMigration: migrationTool,
|
|
1113
1259
|
startMastraCourse,
|
|
1114
1260
|
getMastraCourseStatus,
|
|
1115
1261
|
startMastraCourseLesson,
|
|
1116
1262
|
nextMastraCourseStep,
|
|
1117
1263
|
clearMastraCourseHistory
|
|
1118
|
-
}
|
|
1264
|
+
},
|
|
1265
|
+
prompts: migrationPromptMessages
|
|
1119
1266
|
});
|
|
1120
1267
|
Object.assign(logger, createLogger(server));
|
|
1121
1268
|
async function runServer() {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const migrationInputSchema: z.ZodObject<{
|
|
3
|
+
path: z.ZodOptional<z.ZodString>;
|
|
4
|
+
listSections: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
queryKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
path?: string | undefined;
|
|
9
|
+
queryKeywords?: string[] | undefined;
|
|
10
|
+
listSections?: boolean | undefined;
|
|
11
|
+
sections?: string[] | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
path?: string | undefined;
|
|
14
|
+
queryKeywords?: string[] | undefined;
|
|
15
|
+
listSections?: boolean | undefined;
|
|
16
|
+
sections?: string[] | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type MigrationInput = z.infer<typeof migrationInputSchema>;
|
|
19
|
+
export declare const migrationTool: {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
parameters: z.ZodObject<{
|
|
23
|
+
path: z.ZodOptional<z.ZodString>;
|
|
24
|
+
listSections: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
queryKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
path?: string | undefined;
|
|
29
|
+
queryKeywords?: string[] | undefined;
|
|
30
|
+
listSections?: boolean | undefined;
|
|
31
|
+
sections?: string[] | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
path?: string | undefined;
|
|
34
|
+
queryKeywords?: string[] | undefined;
|
|
35
|
+
listSections?: boolean | undefined;
|
|
36
|
+
sections?: string[] | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
execute: (args: MigrationInput) => Promise<string>;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/tools/migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAqB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAoClE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;oBAkCF,cAAc;CAUrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.41-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"uuid": "^11.1.0",
|
|
34
34
|
"zod": "^3.25.76",
|
|
35
35
|
"zod-to-json-schema": "^3.24.6",
|
|
36
|
-
"@mastra/
|
|
37
|
-
"@mastra/
|
|
36
|
+
"@mastra/core": "0.24.2-alpha.0",
|
|
37
|
+
"@mastra/mcp": "^0.14.3-alpha.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hono/node-server": "^1.19.5",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"tsx": "^4.19.4",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
51
|
"vitest": "^3.2.4",
|
|
52
|
-
"@internal/lint": "0.0.
|
|
53
|
-
"@mastra/core": "0.24.
|
|
52
|
+
"@internal/lint": "0.0.59",
|
|
53
|
+
"@mastra/core": "0.24.2-alpha.0"
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://mastra.ai",
|
|
56
56
|
"repository": {
|