@mastra/mcp-docs-server 1.2.16-alpha.1 → 1.2.16-alpha.4
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/a2a.md +1 -1
- package/.docs/docs/agents/overview.md +2 -0
- package/.docs/docs/agents/processors.md +4 -4
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/using-tools.md +15 -11
- package/.docs/docs/browser/overview.md +22 -3
- package/.docs/docs/capabilities/subagents.md +2 -2
- package/.docs/docs/datasets/running-experiments.md +2 -2
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/sandbox.md +1 -1
- package/.docs/docs/deployment/workers.md +5 -5
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/editor/overview.md +3 -1
- package/.docs/docs/evals/custom-scorers.md +1 -1
- package/.docs/docs/evals/multi-turn.md +1 -1
- package/.docs/docs/evals/overview.md +3 -3
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/harness/overview.md +1 -1
- package/.docs/docs/long-running-agents/background-tasks.md +2 -2
- package/.docs/docs/long-running-agents/goals.md +3 -2
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +1 -1
- package/.docs/docs/mastra-platform/github.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/mastra-platform/overview.md +3 -3
- package/.docs/docs/mastra-platform/server.md +2 -2
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/memory/memory-processors.md +1 -1
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +13 -13
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +3 -3
- package/.docs/docs/server/custom-adapters.md +2 -2
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workspace/lsp.md +27 -0
- package/.docs/docs/workspace/overview.md +2 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +1 -1
- package/.docs/integrations/browsers/agent-browser.md +2 -3
- package/.docs/integrations/browsers/firecrawl.md +0 -1
- package/.docs/integrations/browsers/stagehand.md +2 -3
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/openrouter.md +5 -2
- package/.docs/models/gateways/vercel.md +3 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aiand.md +3 -2
- package/.docs/models/providers/digitalocean.md +2 -1
- package/.docs/models/providers/edenai.md +88 -0
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/inceptron.md +8 -9
- package/.docs/models/providers/kilo.md +10 -7
- package/.docs/models/providers/llmgateway.md +3 -1
- package/.docs/models/providers/merge-gateway.md +262 -0
- package/.docs/models/providers/nano-gpt.md +11 -34
- package/.docs/models/providers/opencode.md +2 -1
- package/.docs/models/providers/tinfoil.md +9 -8
- package/.docs/models/providers/xai.md +2 -1
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/acp/acp-agent.md +1 -1
- package/.docs/reference/agent-controller/session.md +1 -1
- package/.docs/reference/agents/channels.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/ai-sdk/overview.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/cli/mastra.md +5 -5
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -1
- package/.docs/reference/configuration.md +3 -3
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getWorkflow.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/deployer/netlify.md +1 -1
- package/.docs/reference/deployer.md +1 -1
- package/.docs/reference/editor/prompt-blocks.md +1 -1
- package/.docs/reference/editor/tools.md +1 -1
- package/.docs/reference/evals/completeness.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/file-based-agents/config.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +5 -5
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/logging/pino-logger.md +1 -1
- package/.docs/reference/memory/observational-memory.md +12 -4
- package/.docs/reference/migrations/upgrade-to-v1/agent.md +3 -3
- package/.docs/reference/migrations/upgrade-to-v1/client.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mcp.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/storage.md +5 -5
- package/.docs/reference/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/reference/observability/tracing/bridges/datadog.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/sentry.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +27 -3
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -2
- package/.docs/reference/processors/processor-interface.md +16 -16
- package/.docs/reference/processors/stream-error-retry-processor.md +2 -2
- package/.docs/reference/rag/chunking-and-embedding.md +1 -1
- package/.docs/reference/rag/metadata-filters.md +1 -1
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/signals/webhook-signal-provider.md +1 -1
- package/.docs/reference/storage/retention.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +1 -1
- package/.docs/reference/tools/mcp-client.md +3 -3
- package/.docs/reference/tools/mcp-server.md +5 -5
- package/.docs/reference/tools/task-tools.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +1 -1
- package/.docs/reference/vectors/couchbase.md +1 -1
- package/.docs/reference/vectors/mongodb.md +2 -2
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/voice/overview.md +1 -1
- package/.docs/reference/voice/speech-to-speech.md +1 -1
- package/.docs/reference/voice/speech-to-text.md +1 -1
- package/.docs/reference/voice/voice.on.md +1 -1
- package/.docs/reference/voice/voice.updateConfig.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
- package/.docs/docs/browser/recording.md +0 -120
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# MCPClient
|
|
4
4
|
|
|
5
|
-
The `MCPClient` class provides a way to manage multiple MCP server connections and their tools in a Mastra application. It handles connection lifecycle
|
|
5
|
+
The `MCPClient` class provides a way to manage multiple MCP server connections and their tools in a Mastra application. It handles connection lifecycle and tool namespacing while providing access to tools across all configured servers.
|
|
6
6
|
|
|
7
7
|
## Constructor
|
|
8
8
|
|
|
@@ -248,7 +248,7 @@ const res = await agent.stream(prompt, {
|
|
|
248
248
|
|
|
249
249
|
Returns every server's tools as plain, serializable definitions, grouped by server name and keyed by the server's own tool name (without the `serverName_toolName` namespacing that `listTools()` applies).
|
|
250
250
|
|
|
251
|
-
Unlike `listTools()`, the result contains no functions or references to a live client, so it can be passed through `JSON.stringify` and cached in Redis
|
|
251
|
+
Unlike `listTools()`, the result contains no functions or references to a live client, so it can be passed through `JSON.stringify` and cached in Redis or a database, as well as a build artifact. Each definition holds the data from the MCP `tools/list` response (name, description, input schema, output schema, annotations, and `_meta`), plus the server name, version, and instructions captured at discovery time.
|
|
252
252
|
|
|
253
253
|
```typescript
|
|
254
254
|
const definitions = await mcp.listToolDefinitions()
|
|
@@ -991,7 +991,7 @@ try {
|
|
|
991
991
|
|
|
992
992
|
Concurrent `authenticate()` calls for the same server join the pending flow. Different servers authenticate independently. With valid stored tokens the call reconnects without opening a browser.
|
|
993
993
|
|
|
994
|
-
Hosts that drive the flow themselves can capture the authorization code with the exported `createOAuthCallbackServer` helper, which binds a one-shot loopback server
|
|
994
|
+
Hosts that drive the flow themselves can capture the authorization code with the exported `createOAuthCallbackServer` helper, which binds a one-shot loopback server and validates the OAuth `state` parameter before resolving with the code. It creates a plain HTTP server, so it's only for local loopback redirects. Web applications that use an HTTPS redirect URL must host their own callback endpoint and drive the provider directly rather than using this helper:
|
|
995
995
|
|
|
996
996
|
```typescript
|
|
997
997
|
import { createOAuthCallbackServer, getCallbackUrlCandidates } from '@mastra/mcp'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# MCPServer
|
|
4
4
|
|
|
5
|
-
The `MCPServer` class provides the functionality to expose your existing Mastra tools and Agents as a Model Context Protocol (MCP) server.
|
|
5
|
+
The `MCPServer` class provides the functionality to expose your existing Mastra tools and Agents as a Model Context Protocol (MCP) server. Any MCP client, such as Cursor, Windsurf, or Claude Desktop, can connect to these capabilities and make them available to an agent.
|
|
6
6
|
|
|
7
7
|
Note that if you only need to use your tools or agents directly within your Mastra application, you don't necessarily need to create an MCP server. This API is specifically for exposing your Mastra tools and agents to _external_ MCP clients.
|
|
8
8
|
|
|
@@ -95,7 +95,7 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
|
|
|
95
95
|
|
|
96
96
|
A powerful feature of `MCPServer` is its ability to automatically expose your Mastra Agents as callable tools. When you provide agents in the `agents` property of the configuration:
|
|
97
97
|
|
|
98
|
-
- **Tool Naming**: Each agent is converted into a tool
|
|
98
|
+
- **Tool Naming**: Each agent is converted into a tool with the name `ask_<agentKey>`, where `<agentKey>` is the key you used for that agent in the `agents` object. For instance, if you configure `agents: { myAgentKey: myAgentInstance }`, a tool with the name `ask_myAgentKey` will be created.
|
|
99
99
|
|
|
100
100
|
- **Tool Functionality**:
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ A powerful feature of `MCPServer` is its ability to automatically expose your Ma
|
|
|
104
104
|
- **Execution**: When this tool is called, it invokes the corresponding agent's `generate()` method with the provided `query`.
|
|
105
105
|
- **Output**: The direct result from the agent's `generate()` method is returned as the output of the tool.
|
|
106
106
|
|
|
107
|
-
- **Name collisions.** If an explicit tool defined in the `tools` configuration has the same name as an agent-derived tool (e.g., a tool
|
|
107
|
+
- **Name collisions.** If an explicit tool defined in the `tools` configuration has the same name as an agent-derived tool (e.g., a tool with the name `ask_myAgentKey` alongside an agent keyed as `myAgentKey`), the _explicitly defined tool will take precedence_. The agent won't be converted into a tool in this conflicting case, and a warning will be logged.
|
|
108
108
|
|
|
109
109
|
This makes it straightforward to allow MCP clients to interact with your agents using natural language queries, like any other tool.
|
|
110
110
|
|
|
@@ -116,7 +116,7 @@ The description for this generated tool will be: "Ask agent `<agent.name>` a que
|
|
|
116
116
|
|
|
117
117
|
For an agent to be converted into a tool, it **must** have a non-empty `description` string property set in its configuration when it was instantiated (e.g., `new Agent({ id: 'my-agent', name: 'myAgent', description: 'This agent does X.', ... })`). If an agent is passed to `MCPServer` with a missing or empty `description`, an error will be thrown when the `MCPServer` is instantiated, and server setup will fail.
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
Clients can use MCP to access your agents' generative capabilities and ask them questions directly.
|
|
120
120
|
|
|
121
121
|
### Accessing MCP Context in Tools
|
|
122
122
|
|
|
@@ -1240,7 +1240,7 @@ const customMiddleware = createOAuthMiddleware({
|
|
|
1240
1240
|
|
|
1241
1241
|
## Authentication context
|
|
1242
1242
|
|
|
1243
|
-
Tools can access request metadata via `context.mcp.extra` when using HTTP-based transports.
|
|
1243
|
+
Tools can access request metadata via `context.mcp.extra` when using HTTP-based transports. You can pass authentication info and user context, as well as custom data from your HTTP middleware to your MCP tools.
|
|
1244
1244
|
|
|
1245
1245
|
### How it works
|
|
1246
1246
|
|
|
@@ -25,7 +25,7 @@ const agent = new Agent({
|
|
|
25
25
|
})
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Or import the tools directly:
|
|
28
|
+
Or import the tools directly. `taskWriteTool`, `taskUpdateTool`, `taskCompleteTool`, and `taskCheckTool` are the export names; `task_write`, `task_update`, `task_complete`, and `task_check` are the tool IDs the model sees in tool calls and traces:
|
|
29
29
|
|
|
30
30
|
```typescript
|
|
31
31
|
import { taskWriteTool, taskUpdateTool, taskCompleteTool, taskCheckTool } from '@mastra/core/tools'
|
|
@@ -353,7 +353,7 @@ const response = await agent.generate('Find information about deployment', {
|
|
|
353
353
|
})
|
|
354
354
|
```
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
Runtime configuration supports these use cases:
|
|
357
357
|
|
|
358
358
|
- Switch between environments (dev/staging/prod)
|
|
359
359
|
- Adjust performance parameters based on load
|
|
@@ -56,7 +56,7 @@ Otherwise, you have several options for setting up your single-node Chroma serve
|
|
|
56
56
|
|
|
57
57
|
Note: Forking is only supported on Chroma Cloud, or if you deploy your own OSS **distributed** Chroma.
|
|
58
58
|
|
|
59
|
-
`forkIndex`
|
|
59
|
+
`forkIndex` instantly forks an existing Chroma index without affecting the original index. Learn more on the [Chroma docs](https://docs.trychroma.com/cloud/collection-forking).
|
|
60
60
|
|
|
61
61
|
**indexName** (`string`): Name of the index to fork
|
|
62
62
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The `ConvexVector` class provides vector storage and similarity search using [Convex](https://convex.dev). It stores embeddings inside Convex and performs cosine similarity search in the Mastra adapter.
|
|
6
6
|
|
|
7
|
-
> **Development-scale search:** `ConvexVector` reads matching vectors through the Mastra storage handler
|
|
7
|
+
> **Development-scale search:** `ConvexVector` reads matching vectors through the Mastra storage handler and filters them in JavaScript. It then computes cosine similarity and sorts the results before returning the top matches. Use it for local development, tests, and small datasets.
|
|
8
8
|
>
|
|
9
9
|
> For production vector search on Convex, use `ConvexNativeVector`. It uses the Convex native `vectorSearch` API, which requires a deployed Convex vector index and a Convex action.
|
|
10
10
|
|
|
@@ -101,7 +101,7 @@ Adds or updates vectors and their metadata in the collection.
|
|
|
101
101
|
|
|
102
102
|
Searches for similar vectors.
|
|
103
103
|
|
|
104
|
-
> **Warning:** The `filter` and `includeVector` parameters aren't currently supported. Filtering must be performed client-side after retrieving results
|
|
104
|
+
> **Warning:** The `filter` and `includeVector` parameters aren't currently supported. Filtering must be performed client-side after retrieving results or through the Couchbase SDK's Search capabilities. Retrieve the vector embedding by fetching the full document by ID with the Couchbase SDK.
|
|
105
105
|
|
|
106
106
|
**indexName** (`string`): Name of the index to search in
|
|
107
107
|
|
|
@@ -220,7 +220,7 @@ const results = await store.textQuery({
|
|
|
220
220
|
|
|
221
221
|
### `hybridQuery()`
|
|
222
222
|
|
|
223
|
-
Runs a hybrid search that fuses vector similarity and full-text results using MongoDB's server-side `$rankFusion`. It requires MongoDB >= 8.0 and is generally available from 8.1. On 8.0.x, it may
|
|
223
|
+
Runs a hybrid search that fuses vector similarity and full-text results using MongoDB's server-side `$rankFusion`. It requires MongoDB >= 8.0 and is generally available from 8.1. On 8.0.x, it may require a MongoDB support case for enablement. It runs where enabled, including Atlas 8.0.x. A full-text search index must exist: it's auto-created for managed indexes, but for a bring-your-own collection you must call `createSearchIndex()` first (opt-in).
|
|
224
224
|
|
|
225
225
|
**indexName** (`string`): Name of the Mastra index to search
|
|
226
226
|
|
|
@@ -276,7 +276,7 @@ interface IndexStats {
|
|
|
276
276
|
Deletes a vector index. Behavior depends on how the index was created:
|
|
277
277
|
|
|
278
278
|
- **Managed index** (created without `collectionName`): drops the entire collection and all its data.
|
|
279
|
-
- **Bring-your-own index** (created with `collectionName`): drops the Atlas vectorSearch index
|
|
279
|
+
- **Bring-your-own index** (created with `collectionName`): drops the Atlas vectorSearch index. If `createSearchIndex()` provisioned a companion full-text search index, it drops that index too. The caller's operational collection and its documents are preserved. This store never drops a collection it didn't create.
|
|
280
280
|
|
|
281
281
|
The BYO classification is recorded durably when the index is created, so it's applied correctly even by a different process (e.g. an index created by a setup job and later deleted by a long-lived service). Always pass the **logical index name** (the `indexName` used at `createIndex`), not the physical collection name.
|
|
282
282
|
|
|
@@ -350,7 +350,7 @@ The `PgVector` class exposes its underlying PostgreSQL connection pool as a publ
|
|
|
350
350
|
pgVector.pool // instance of pg.Pool
|
|
351
351
|
```
|
|
352
352
|
|
|
353
|
-
|
|
353
|
+
Direct pool access supports advanced operations such as direct SQL queries, transactions, or pool-state monitoring. When using the pool directly:
|
|
354
354
|
|
|
355
355
|
- You are responsible for releasing clients (`client.release()`) after use.
|
|
356
356
|
- The pool remains accessible after calling `disconnect()`, but new queries will fail.
|
|
@@ -24,7 +24,7 @@ The QdrantVector class provides vector search using [Qdrant](https://qdrant.tech
|
|
|
24
24
|
|
|
25
25
|
**namedVectors** (`Record<string, { size: number; distance: 'cosine' | 'euclidean' | 'dotproduct' }>`): Configuration for named vector spaces. When provided, creates a collection with multiple named vector fields.
|
|
26
26
|
|
|
27
|
-
#### Creating a
|
|
27
|
+
#### Creating a `named vectors` Collection
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
// Create a collection with multiple named vector spaces
|
|
@@ -84,7 +84,7 @@ await store.upsert({
|
|
|
84
84
|
|
|
85
85
|
**using** (`string`): Name of the vector field to query when using named vectors. Use this when your collection has multiple named vector fields.
|
|
86
86
|
|
|
87
|
-
####
|
|
87
|
+
#### `named vectors`
|
|
88
88
|
|
|
89
89
|
Qdrant supports [multiple vectors per collection](https://qdrant.tech/documentation/concepts/vectors/#named-vectors), with a name assigned to each vector field. Use the `using` parameter to select the vector field to query:
|
|
90
90
|
|
|
@@ -748,7 +748,7 @@ Visit the [xAI Realtime Voice Reference](https://mastra.ai/integrations/voice/xa
|
|
|
748
748
|
|
|
749
749
|
### Realtime voice
|
|
750
750
|
|
|
751
|
-
Run live calls a user can talk over
|
|
751
|
+
Run live calls that a user can talk over in a browser or by phone. Mastra hands the audio loop to LiveKit for voice activity and semantic turn detection, plus barge-in. Your agent generates each reply with its own model, tools, and memory. For setup and configuration options, check out [Realtime voice](https://mastra.ai/integrations/voice/livekit).
|
|
752
752
|
|
|
753
753
|
## Voice configuration
|
|
754
754
|
|
|
@@ -80,7 +80,7 @@ export const agent = new Agent({
|
|
|
80
80
|
|
|
81
81
|
## Listen for realtime events
|
|
82
82
|
|
|
83
|
-
Realtime voice providers emit events you can use to update your UI
|
|
83
|
+
Realtime voice providers emit events you can use to update your UI and play assistant audio, while logging transcriptions and handling errors:
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
86
|
agent.voice.on('speaking', ({ audio }) => {
|
|
@@ -35,7 +35,7 @@ Mastra supports several Speech-to-Text providers, each with their own capabiliti
|
|
|
35
35
|
- [**ElevenLabs**](https://mastra.ai/integrations/voice/elevenlabs): Advanced speech recognition with support for multiple languages
|
|
36
36
|
- [**Google**](https://mastra.ai/integrations/voice/google): Google's speech recognition with extensive language support
|
|
37
37
|
- [**Cloudflare**](https://mastra.ai/integrations/voice/cloudflare): Edge-optimized speech recognition for low-latency applications
|
|
38
|
-
- [**Deepgram**](https://mastra.ai/integrations/voice/deepgram): AI-powered speech recognition with high accuracy for
|
|
38
|
+
- [**Deepgram**](https://mastra.ai/integrations/voice/deepgram): AI-powered speech recognition with high accuracy for multiple accents
|
|
39
39
|
- [**Sarvam**](https://mastra.ai/integrations/voice/sarvam): Specialized in Indic languages and accents
|
|
40
40
|
|
|
41
41
|
Each provider is implemented as a separate package that you can install as needed:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# voice.on()
|
|
4
4
|
|
|
5
|
-
The `on()` method registers event listeners for voice events. This is particularly important for real-time voice providers, where events are used to communicate transcribed text
|
|
5
|
+
The `on()` method registers event listeners for voice events. This is particularly important for real-time voice providers, where events are used to communicate transcribed text and audio responses, as well as other state changes.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# voice.updateConfig()
|
|
4
4
|
|
|
5
|
-
The `updateConfig()` method allows you to update the configuration of a voice provider at runtime. This is useful for changing voice settings
|
|
5
|
+
The `updateConfig()` method allows you to update the configuration of a voice provider at runtime. This is useful for changing voice settings and API keys, along with other provider-specific options without creating a new instance.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -146,7 +146,7 @@ const detection = LocalSandbox.detectIsolation()
|
|
|
146
146
|
|
|
147
147
|
## Environment isolation
|
|
148
148
|
|
|
149
|
-
By default, `LocalSandbox` only includes `PATH` in the environment.
|
|
149
|
+
By default, `LocalSandbox` only includes `PATH` in the environment. Commands can run without accidental exposure of API keys and secrets.
|
|
150
150
|
|
|
151
151
|
```typescript
|
|
152
152
|
// Default: only PATH is available (commands work, secrets protected)
|
|
@@ -278,7 +278,7 @@ const instructions = workspace.getInstructions({ requestContext })
|
|
|
278
278
|
|
|
279
279
|
#### `getInstructionsAsync(opts?)`
|
|
280
280
|
|
|
281
|
-
Returns combined workspace instructions. Use this when the workspace uses resolver-backed providers. A runtime-defined filesystem is resolved per request
|
|
281
|
+
Returns combined workspace instructions. Use this when the workspace uses resolver-backed providers. A runtime-defined filesystem is resolved per request. A runtime-defined sandbox contributes stable placeholder text unless `instructions.dynamicSandbox` is set to `'resolve'`.
|
|
282
282
|
|
|
283
283
|
```typescript
|
|
284
284
|
const instructions = await workspace.getInstructionsAsync({ requestContext })
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.16-alpha.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`898bba4`](https://github.com/mastra-ai/mastra/commit/898bba46d4806dd255a44e5dc3a3d5827eaefdfe), [`f9aab1c`](https://github.com/mastra-ai/mastra/commit/f9aab1cfc3fda03238a7fd7bd8b794e07497878c), [`e31421b`](https://github.com/mastra-ai/mastra/commit/e31421bc9c11c03c6e74f447ecb5820000e2b9d7), [`aece0e7`](https://github.com/mastra-ai/mastra/commit/aece0e7cb124ae1eb1230689b887f5554b9a0bf0)]:
|
|
8
|
+
- @mastra/core@1.59.0-alpha.2
|
|
9
|
+
|
|
10
|
+
## 1.2.16-alpha.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`aa3e7be`](https://github.com/mastra-ai/mastra/commit/aa3e7be30f8addb0278ea74429f4df054517a287), [`90822db`](https://github.com/mastra-ai/mastra/commit/90822dba08fb2169c518e4a6d7f127c098eb46b8), [`3700208`](https://github.com/mastra-ai/mastra/commit/37002080c7838267803a7e579a7d58b908d62f36), [`8b7131e`](https://github.com/mastra-ai/mastra/commit/8b7131eb0407f58f5205e68fb27b81f026488f28), [`79c4f82`](https://github.com/mastra-ai/mastra/commit/79c4f8295f568752eeadf8a9b50010a7d9ec06ae)]:
|
|
15
|
+
- @mastra/core@1.59.0-alpha.1
|
|
16
|
+
|
|
3
17
|
## 1.2.16-alpha.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.16-alpha.
|
|
3
|
+
"version": "1.2.16-alpha.4",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/
|
|
32
|
-
"@mastra/
|
|
31
|
+
"@mastra/core": "1.59.0-alpha.2",
|
|
32
|
+
"@mastra/mcp": "^1.16.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^2.0.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.122",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
49
|
+
"@mastra/core": "1.59.0-alpha.2",
|
|
50
|
+
"@internal/types-builder": "0.0.97"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Browser recording
|
|
4
|
-
|
|
5
|
-
**Added in:** `@mastra/core@1.43.0`
|
|
6
|
-
|
|
7
|
-
Browser recording adds two opt-in tools that let an agent save a browser session as a Motion-JPEG AVI video. The agent can also add short captions while it works.
|
|
8
|
-
|
|
9
|
-
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
10
|
-
|
|
11
|
-
## When to use browser recording
|
|
12
|
-
|
|
13
|
-
Use browser recording when you need to:
|
|
14
|
-
|
|
15
|
-
- Review what an agent did in a browser
|
|
16
|
-
- Share a short browser automation run with a teammate
|
|
17
|
-
- Debug missed actions, slow page loads, or unexpected navigation
|
|
18
|
-
- Add short captions that explain each major step
|
|
19
|
-
|
|
20
|
-
Recording tools are disabled by default. Enable them only for agents that need to write video files.
|
|
21
|
-
|
|
22
|
-
## Enable recording
|
|
23
|
-
|
|
24
|
-
Pass a `recording` object to `AgentBrowser` or `StagehandBrowser`. The only required field is `outputDir`. You can also set `maxDurationMs`, `maxWidth`, and `maxHeight` as defaults for every recording started by this browser.
|
|
25
|
-
|
|
26
|
-
The following example enables recording for `AgentBrowser`:
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { join } from 'node:path'
|
|
30
|
-
import { AgentBrowser } from '@mastra/agent-browser'
|
|
31
|
-
|
|
32
|
-
export const browser = new AgentBrowser({
|
|
33
|
-
headless: false,
|
|
34
|
-
recording: {
|
|
35
|
-
outputDir: join(process.cwd(), 'browser-recordings'),
|
|
36
|
-
maxDurationMs: 60_000,
|
|
37
|
-
maxWidth: 1280,
|
|
38
|
-
maxHeight: 720,
|
|
39
|
-
},
|
|
40
|
-
})
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The same option works with `StagehandBrowser`:
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
import { join } from 'node:path'
|
|
47
|
-
import { StagehandBrowser } from '@mastra/stagehand'
|
|
48
|
-
|
|
49
|
-
export const browser = new StagehandBrowser({
|
|
50
|
-
headless: false,
|
|
51
|
-
recording: {
|
|
52
|
-
outputDir: join(process.cwd(), 'browser-recordings'),
|
|
53
|
-
maxDurationMs: 60_000,
|
|
54
|
-
maxWidth: 1280,
|
|
55
|
-
maxHeight: 720,
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
The agent can still override these defaults per-recording by passing `maxDurationMs`, `maxWidth`, or `maxHeight` to the `browser_record` tool at start time.
|
|
61
|
-
|
|
62
|
-
## Recording tools
|
|
63
|
-
|
|
64
|
-
Enabling recording adds these tools:
|
|
65
|
-
|
|
66
|
-
| Tool | Description |
|
|
67
|
-
| ------------------------ | ------------------------------------------------------------ |
|
|
68
|
-
| `browser_record` | Starts, stops, or checks the status of a recording. |
|
|
69
|
-
| `browser_record_caption` | Adds a short caption at the current moment in the recording. |
|
|
70
|
-
|
|
71
|
-
`browser_record` accepts an `action` field:
|
|
72
|
-
|
|
73
|
-
- `start`: Start recording the current browser session.
|
|
74
|
-
- `status`: Check whether a recording is active.
|
|
75
|
-
- `stop`: Stop recording and write the `.avi` file.
|
|
76
|
-
|
|
77
|
-
The `outputPath` option for `browser_record` must be an absolute path inside the configured `recording.outputDir`. If you omit it, Mastra creates a file in `outputDir`.
|
|
78
|
-
|
|
79
|
-
## Example agent instructions
|
|
80
|
-
|
|
81
|
-
Tell the agent when to record and when to add captions:
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
import { Agent } from '@mastra/core/agent'
|
|
85
|
-
import { browser } from '../browsers'
|
|
86
|
-
|
|
87
|
-
export const browserAgent = new Agent({
|
|
88
|
-
id: 'browser-agent',
|
|
89
|
-
name: 'Browser Agent',
|
|
90
|
-
model: 'openai/gpt-5.6-sol',
|
|
91
|
-
browser,
|
|
92
|
-
instructions: `Use browser tools to complete the requested task.
|
|
93
|
-
|
|
94
|
-
When the user asks for a recording:
|
|
95
|
-
1. Call browser_record with action="start" before browser work begins.
|
|
96
|
-
2. After each major action, call browser_record_caption with a caption of about six words.
|
|
97
|
-
3. Call browser_record with action="stop" as soon as the task is complete.
|
|
98
|
-
4. Return the saved video path to the user.`,
|
|
99
|
-
})
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Output format and limits
|
|
103
|
-
|
|
104
|
-
Recordings are saved as Motion-JPEG AVI files. This format is encoded in JavaScript and doesn't require `ffmpeg` or native dependencies.
|
|
105
|
-
|
|
106
|
-
Default limits:
|
|
107
|
-
|
|
108
|
-
- Maximum duration: 30 seconds
|
|
109
|
-
- Hard duration cap: 120 seconds
|
|
110
|
-
- Maximum frame size: 1024 × 720
|
|
111
|
-
- Captions: 80 characters each
|
|
112
|
-
- One active recording per process
|
|
113
|
-
|
|
114
|
-
Use shorter recordings when possible. Long browser sessions produce larger files and are harder to review.
|
|
115
|
-
|
|
116
|
-
## Next steps
|
|
117
|
-
|
|
118
|
-
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
119
|
-
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
120
|
-
- [Browser overview](https://mastra.ai/docs/browser/overview)
|