@mastra/mcp-docs-server 1.2.7-alpha.1 → 1.2.7-alpha.12
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/agent-builder/integrations.md +45 -3
- package/.docs/docs/agent-builder/overview.md +4 -3
- package/.docs/docs/agent-builder/skill-registries.md +1 -3
- package/.docs/docs/agent-controller/modes.md +1 -1
- package/.docs/docs/agent-controller/overview.md +4 -3
- package/.docs/docs/agent-controller/session.md +3 -5
- package/.docs/docs/agents/a2a.md +2 -1
- package/.docs/docs/agents/agent-approval.md +2 -2
- package/.docs/docs/agents/code-mode.md +1 -1
- package/.docs/docs/agents/guardrails.md +10 -9
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +5 -5
- package/.docs/docs/agents/skills.md +3 -5
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +3 -4
- package/.docs/docs/agents/using-tools.md +2 -4
- package/.docs/docs/browser/agent-browser.md +1 -3
- package/.docs/docs/browser/browser-viewer.md +1 -3
- package/.docs/docs/browser/overview.md +2 -1
- package/.docs/docs/browser/recording.md +1 -1
- package/.docs/docs/browser/stagehand.md +1 -1
- package/.docs/docs/capabilities/channels/discord.md +98 -0
- package/.docs/docs/capabilities/channels/other-adapters.md +68 -0
- package/.docs/docs/capabilities/channels/overview.md +255 -0
- package/.docs/docs/capabilities/channels/slack.md +225 -0
- package/.docs/docs/capabilities/channels/teams.md +100 -0
- package/.docs/docs/capabilities/channels/telegram.md +98 -0
- package/.docs/docs/capabilities/channels/whatsapp.md +99 -0
- package/.docs/docs/deployment/mastra-server.md +2 -4
- package/.docs/docs/editor/overview.md +2 -6
- package/.docs/docs/editor/prompts.md +1 -1
- package/.docs/docs/editor/tools.md +3 -5
- package/.docs/docs/evals/built-in-scorers.md +2 -2
- package/.docs/docs/evals/custom-scorers.md +1 -3
- package/.docs/docs/evals/datasets/overview.md +4 -5
- package/.docs/docs/evals/datasets/running-experiments.md +10 -8
- package/.docs/docs/evals/evals-with-memory.md +1 -3
- package/.docs/docs/evals/gates-and-verdicts.md +2 -4
- package/.docs/docs/evals/overview.md +4 -1
- package/.docs/docs/evals/quick-checks.md +3 -5
- package/.docs/docs/getting-started/file-based-agents.md +116 -0
- package/.docs/docs/getting-started/manual-install.md +17 -4
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/long-running-agents/background-tasks.md +3 -3
- package/.docs/docs/long-running-agents/durable-agents.md +5 -7
- package/.docs/docs/long-running-agents/goals.md +5 -7
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +1 -3
- package/.docs/docs/long-running-agents/signals.md +12 -23
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/github.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +5 -1
- package/.docs/docs/mcp/mcp-apps.md +3 -3
- package/.docs/docs/mcp/overview.md +6 -10
- package/.docs/docs/memory/memory-processors.md +67 -0
- package/.docs/docs/memory/message-history.md +56 -2
- package/.docs/docs/memory/observational-memory.md +5 -4
- package/.docs/docs/memory/overview.md +8 -6
- package/.docs/docs/memory/semantic-recall.md +36 -2
- package/.docs/docs/memory/working-memory.md +3 -3
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -3
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +1 -1
- package/.docs/docs/rag/vector-databases.md +7 -2
- package/.docs/docs/server/auth/auth0.md +1 -1
- package/.docs/docs/server/auth/better-auth.md +2 -2
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/firebase.md +1 -1
- package/.docs/docs/server/auth/google.md +3 -3
- package/.docs/docs/server/auth/jwt.md +2 -2
- package/.docs/docs/server/auth/okta.md +2 -2
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/pubsub.md +1 -1
- package/.docs/docs/server/request-context.md +4 -4
- package/.docs/docs/server/server-adapters.md +8 -8
- package/.docs/docs/storage/overview.md +214 -0
- package/.docs/docs/studio/auth.md +1 -3
- package/.docs/docs/studio/overview.md +1 -1
- package/.docs/docs/voice/livekit.md +101 -4
- package/.docs/docs/workflows/agents-and-tools.md +3 -5
- package/.docs/docs/workflows/control-flow.md +1 -3
- package/.docs/docs/workflows/overview.md +6 -7
- package/.docs/docs/workflows/snapshots.md +1 -1
- package/.docs/docs/workspace/overview.md +2 -1
- package/.docs/docs/workspace/sandbox.md +2 -0
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit/channels.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +2 -2
- package/.docs/guides/build-your-ui/copilotkit/overview.md +1 -1
- package/.docs/guides/concepts/streaming.md +3 -3
- package/.docs/guides/getting-started/quickstart.md +4 -2
- package/.docs/guides/guide/chef-michel.md +0 -2
- package/.docs/guides/guide/slack-assistant.md +2 -2
- package/.docs/guides/guide/stock-agent.md +0 -2
- package/.docs/models/embeddings.md +119 -0
- package/.docs/models/environment-variables.md +7 -0
- package/.docs/models/gateways/netlify.md +4 -1
- package/.docs/models/gateways/openrouter.md +10 -7
- package/.docs/models/gateways/vercel.md +8 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/abacus.md +44 -14
- package/.docs/models/providers/crossmodel.md +109 -0
- package/.docs/models/providers/empiriolabs.md +106 -0
- package/.docs/models/providers/google.md +2 -1
- package/.docs/models/providers/llmgateway.md +185 -181
- package/.docs/models/providers/meta.md +101 -0
- package/.docs/models/providers/model-oracle-ai.md +87 -0
- package/.docs/models/providers/nano-gpt.md +2 -2
- package/.docs/models/providers/neon.md +40 -29
- package/.docs/models/providers/nvidia.md +1 -3
- package/.docs/models/providers/openai.md +6 -1
- package/.docs/models/providers/opencode.md +6 -2
- package/.docs/models/providers/pioneer.md +148 -0
- package/.docs/models/providers/poolside.md +6 -5
- package/.docs/models/providers/routing-run.md +23 -34
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/unorouter.md +95 -0
- package/.docs/models/providers/wandb.md +21 -14
- package/.docs/models/providers/xai.md +2 -1
- package/.docs/models/providers/zenifra.md +73 -0
- package/.docs/models/providers.md +7 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +3 -3
- package/.docs/reference/agent-controller/session.md +4 -4
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +3 -3
- package/.docs/reference/auth/google.md +5 -5
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +3 -3
- package/.docs/reference/cli/mastra.md +119 -12
- package/.docs/reference/code-sdk/mount-agent-controller.md +76 -0
- package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/evals/checks.md +4 -4
- package/.docs/reference/evals/create-scorer.md +8 -0
- package/.docs/reference/file-based-agents/config.md +97 -0
- package/.docs/reference/file-based-agents/instructions.md +54 -0
- package/.docs/reference/file-based-agents/logger.md +26 -0
- package/.docs/reference/file-based-agents/memory.md +58 -0
- package/.docs/reference/file-based-agents/observability.md +32 -0
- package/.docs/reference/file-based-agents/processors.md +56 -0
- package/.docs/reference/file-based-agents/scorers.md +54 -0
- package/.docs/reference/file-based-agents/server.md +37 -0
- package/.docs/reference/file-based-agents/skills.md +56 -0
- package/.docs/reference/file-based-agents/storage.md +30 -0
- package/.docs/reference/file-based-agents/studio.md +56 -0
- package/.docs/reference/file-based-agents/subagents.md +123 -0
- package/.docs/reference/file-based-agents/tools.md +63 -0
- package/.docs/reference/file-based-agents/workflows.md +52 -0
- package/.docs/reference/file-based-agents/workspace.md +74 -0
- package/.docs/reference/index.md +18 -0
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/observational-memory.md +1 -1
- package/.docs/reference/memory/serialized-memory-config.md +1 -1
- package/.docs/reference/memory/summarizeConversation.md +99 -0
- package/.docs/reference/memory/summarizeThread.md +93 -0
- package/.docs/{docs/getting-started → reference}/project-structure.md +3 -10
- package/.docs/reference/pubsub/lease-provider.md +5 -5
- package/.docs/reference/server/express-adapter.md +1 -3
- package/.docs/reference/server/fastify-adapter.md +1 -3
- package/.docs/reference/server/hono-adapter.md +1 -3
- package/.docs/reference/server/koa-adapter.md +1 -3
- package/.docs/reference/server/nestjs-adapter.md +1 -3
- package/.docs/reference/signals/task-signal-provider.md +1 -1
- package/.docs/reference/storage/clickhouse.md +34 -2
- package/.docs/reference/storage/cloudflare-d1.md +1 -1
- package/.docs/reference/storage/composite.md +64 -6
- package/.docs/reference/storage/convex.md +1 -1
- package/.docs/reference/storage/dynamodb.md +1 -1
- package/.docs/reference/storage/mongodb.md +46 -46
- package/.docs/reference/storage/retention.md +74 -6
- package/.docs/reference/tools/create-tool.md +2 -2
- package/.docs/reference/tools/mcp-client.md +22 -0
- package/.docs/reference/tools/mcp-server.md +161 -4
- package/.docs/reference/vectors/mongodb.md +93 -4
- package/.docs/reference/voice/livekit.md +272 -8
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +1 -3
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -3
- package/.docs/reference/workspace/apple-container-sandbox.md +6 -8
- package/.docs/reference/workspace/archil-filesystem.md +1 -3
- package/.docs/reference/workspace/azure-blob-filesystem.md +1 -3
- package/.docs/reference/workspace/blaxel-sandbox.md +1 -3
- package/.docs/reference/workspace/daytona-sandbox.md +1 -3
- package/.docs/reference/workspace/docker-sandbox.md +1 -3
- package/.docs/reference/workspace/e2b-sandbox.md +1 -3
- package/.docs/reference/workspace/files-sdk-filesystem.md +1 -3
- package/.docs/reference/workspace/gcs-filesystem.md +1 -3
- package/.docs/reference/workspace/google-drive-filesystem.md +1 -3
- package/.docs/reference/workspace/local-filesystem.md +1 -3
- package/.docs/reference/workspace/local-sandbox.md +1 -3
- package/.docs/reference/workspace/mesa-filesystem.md +4 -4
- package/.docs/reference/workspace/modal-sandbox.md +1 -3
- package/.docs/reference/workspace/railway-sandbox.md +2 -4
- package/.docs/reference/workspace/s3-filesystem.md +1 -3
- package/.docs/reference/workspace/vercel-sandbox.md +5 -7
- package/.docs/reference/workspace/vercel-serverless.md +2 -4
- package/CHANGELOG.md +36 -0
- package/package.json +5 -5
- package/.docs/docs/agents/channels.md +0 -225
- package/.docs/docs/agents/file-based-agents.md +0 -297
- package/.docs/docs/memory/storage.md +0 -267
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.1.0`
|
|
6
6
|
|
|
7
|
-
Stores files in a directory on the local filesystem.
|
|
8
|
-
|
|
9
|
-
> **Info:** For interface details, see [WorkspaceFilesystem Interface](https://mastra.ai/reference/workspace/filesystem).
|
|
7
|
+
Stores files in a directory on the local filesystem. For interface details, see [WorkspaceFilesystem Interface](https://mastra.ai/reference/workspace/filesystem).
|
|
10
8
|
|
|
11
9
|
## Usage
|
|
12
10
|
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.1.0`
|
|
6
6
|
|
|
7
|
-
Executes commands on the local system.
|
|
8
|
-
|
|
9
|
-
> **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
7
|
+
Executes commands on the local system. For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
10
8
|
|
|
11
9
|
## Usage
|
|
12
10
|
|
|
@@ -8,7 +8,7 @@ Use `MesaFilesystem` when agents need versioned file storage. For a local direct
|
|
|
8
8
|
|
|
9
9
|
> **Info:** `MesaFilesystem` runs in the Mastra process.
|
|
10
10
|
>
|
|
11
|
-
> [Mesa's POSIX mount](https://docs.mesa.dev/content/mesafs/posix-mount) (for using a Mesa filesystem within a sandbox)
|
|
11
|
+
> [Mesa's POSIX mount](https://docs.mesa.dev/content/mesafs/posix-mount) (for using a Mesa filesystem within a sandbox) isn't yet part of the `@mastra/mesa` package. Support is coming soon.
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -252,14 +252,14 @@ Methods expect absolute paths. For `MesaFilesystem`, paths are rooted at the Mes
|
|
|
252
252
|
await filesystem.readFile('/acme/docs/README.md')
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
Don't omit the leading slash:
|
|
256
256
|
|
|
257
257
|
```typescript
|
|
258
258
|
await filesystem.readFile('acme/docs/README.md') // Incorrect
|
|
259
259
|
await filesystem.readFile('/acme/docs/README.md') // Correct
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
The org comes from `org` in the constructor, or from the Mesa SDK's default org inference when `org` is omitted. It
|
|
262
|
+
The org comes from `org` in the constructor, or from the Mesa SDK's default org inference when `org` is omitted. It remains the first path segment.
|
|
263
263
|
|
|
264
264
|
When you mount multiple repos, each repo is available under the org segment:
|
|
265
265
|
|
|
@@ -311,7 +311,7 @@ Read operations still work. Write operations throw `WorkspaceReadOnlyError`.
|
|
|
311
311
|
|
|
312
312
|
## Concurrency
|
|
313
313
|
|
|
314
|
-
`overwrite: false` and `expectedMtime` use preflight checks before writing. These checks
|
|
314
|
+
`overwrite: false` and `expectedMtime` use preflight checks before writing. These checks aren't atomic unless Mesa adds native conditional writes for app mounts.
|
|
315
315
|
|
|
316
316
|
## Related
|
|
317
317
|
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# ModalSandbox
|
|
4
4
|
|
|
5
|
-
Executes commands in isolated [Modal](https://modal.com) cloud sandboxes. Provides secure, ephemeral environments backed by Modal's infrastructure.
|
|
6
|
-
|
|
7
|
-
> **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
5
|
+
Executes commands in isolated [Modal](https://modal.com) cloud sandboxes. Provides secure, ephemeral environments backed by Modal's infrastructure. For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# RailwaySandbox
|
|
4
4
|
|
|
5
|
-
Executes commands in ephemeral, isolated [Railway](https://docs.railway.com/sandboxes) sandboxes. Each sandbox is an isolated Debian Linux VM provisioned on demand through the Railway TypeScript SDK. Supports command execution with streaming output, command timeouts, configurable idle timeout, `ISOLATED`/`PRIVATE` network isolation, custom base images via the Railway template builder, forking a running sandbox, and reattaching to an existing sandbox by ID.
|
|
6
|
-
|
|
7
|
-
> **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
5
|
+
Executes commands in ephemeral, isolated [Railway](https://docs.railway.com/sandboxes) sandboxes. Each sandbox is an isolated Debian Linux VM provisioned on demand through the Railway TypeScript SDK. Supports command execution with streaming output, command timeouts, configurable idle timeout, `ISOLATED`/`PRIVATE` network isolation, custom base images via the Railway template builder, forking a running sandbox, and reattaching to an existing sandbox by ID. For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
@@ -213,7 +211,7 @@ console.log(handle.stdout)
|
|
|
213
211
|
await handle.kill()
|
|
214
212
|
```
|
|
215
213
|
|
|
216
|
-
Railway's `exec` API
|
|
214
|
+
Railway's `exec` API doesn't stream stdin, so `sendStdin()` isn't supported.
|
|
217
215
|
|
|
218
216
|
See [`SandboxProcessManager` reference](https://mastra.ai/reference/workspace/process-manager) for the full API.
|
|
219
217
|
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# S3Filesystem
|
|
4
4
|
|
|
5
|
-
Stores files in Amazon S3 or S3-compatible storage services like Cloudflare R2, MinIO, DigitalOcean Spaces, and Tigris.
|
|
6
|
-
|
|
7
|
-
> **Info:** For interface details, see [WorkspaceFilesystem Interface](https://mastra.ai/reference/workspace/filesystem).
|
|
5
|
+
Stores files in Amazon S3 or S3-compatible storage services like Cloudflare R2, MinIO, DigitalOcean Spaces, and Tigris. For interface details, see [WorkspaceFilesystem Interface](https://mastra.ai/reference/workspace/filesystem).
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# VercelSandbox
|
|
4
4
|
|
|
5
|
-
Executes commands inside [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) which is an ephemeral [Firecracker](https://firecracker-microvm.github.io/) MicroVM running Amazon Linux 2023. Provides a persistent in-session filesystem, `sudo` access, exposed ports, and background processes.
|
|
6
|
-
|
|
7
|
-
> **Info:** For interface details, see the [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
5
|
+
Executes commands inside [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) which is an ephemeral [Firecracker](https://firecracker-microvm.github.io/) MicroVM running Amazon Linux 2023. Provides a persistent in-session filesystem, `sudo` access, exposed ports, and background processes. For interface details, see the [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
8
6
|
|
|
9
7
|
> **Note:** This is distinct from [`VercelServerlessSandbox`](https://mastra.ai/reference/workspace/vercel-serverless), which runs commands as stateless Vercel serverless **Functions**. `VercelSandbox` runs a full Linux MicroVM with a persistent filesystem and long-running processes.
|
|
10
8
|
|
|
@@ -148,7 +146,7 @@ Both callbacks are optional and can be used independently.
|
|
|
148
146
|
|
|
149
147
|
**resources** (`{ vcpus?: number }`): Resource allocation. Each vCPU comes with 2048 MB of memory.
|
|
150
148
|
|
|
151
|
-
**ports** (`number[]`): Ports to expose from the sandbox (up to
|
|
149
|
+
**ports** (`number[]`): Ports to expose from the sandbox (up to 15). Public HTTPS domains are available via getInfo().metadata.domains.
|
|
152
150
|
|
|
153
151
|
**env** (`Record<string, string>`): Default environment variables inherited by all commands. (Default: `{}`)
|
|
154
152
|
|
|
@@ -199,9 +197,9 @@ See the [`SandboxProcessManager` reference](https://mastra.ai/reference/workspac
|
|
|
199
197
|
|
|
200
198
|
## Limits
|
|
201
199
|
|
|
202
|
-
- Up to
|
|
203
|
-
- Up to
|
|
200
|
+
- Up to 32 vCPUs, with 2048 MB of memory per vCPU.
|
|
201
|
+
- Up to 15 exposed ports.
|
|
204
202
|
- The filesystem is ephemeral — persisted only within the session and lost when the sandbox stops.
|
|
205
|
-
- Maximum runtime is plan-dependent (45 minutes on Hobby, up to
|
|
203
|
+
- Maximum runtime is plan-dependent (45 minutes on Hobby, up to 24 hours on Pro and Enterprise), with a default of 5 minutes.
|
|
206
204
|
|
|
207
205
|
See the [Vercel Sandbox documentation](https://vercel.com/docs/vercel-sandbox) for current limits and pricing.
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# VercelServerlessSandbox
|
|
4
4
|
|
|
5
|
-
Executes commands as [Vercel](https://vercel.com) serverless functions. Provides globally distributed, zero-infrastructure execution with automatic scaling.
|
|
5
|
+
Executes commands as [Vercel](https://vercel.com) serverless functions. Provides globally distributed, zero-infrastructure execution with automatic scaling. For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
6
6
|
|
|
7
|
-
> **
|
|
8
|
-
|
|
9
|
-
> **Warning:** VercelServerlessSandbox is stateless. It doesn't provide a persistent filesystem, interactive shell, or long-running background processes. Only `/tmp` is writable, and it is ephemeral between invocations.
|
|
7
|
+
> **Warning:** VercelServerlessSandbox is stateless. It doesn't provide a persistent filesystem, interactive shell, or long-running background processes. Only `/tmp` is writable, and it's ephemeral between invocations.
|
|
10
8
|
|
|
11
9
|
> **Note:** For a full Linux MicroVM with a persistent filesystem, `sudo` access, exposed ports, and background processes, use [`VercelSandbox`](https://mastra.ai/reference/workspace/vercel-sandbox), which is backed by the [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) product.
|
|
12
10
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.7-alpha.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`fb8aea3`](https://github.com/mastra-ai/mastra/commit/fb8aea384291e77311be3a64ee1717320d5c3c73), [`4ce0163`](https://github.com/mastra-ai/mastra/commit/4ce0163dc86e675a86809685c8ce6c49f1aeb87e)]:
|
|
8
|
+
- @mastra/core@1.51.0-alpha.5
|
|
9
|
+
|
|
10
|
+
## 1.2.7-alpha.9
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`a5c6337`](https://github.com/mastra-ai/mastra/commit/a5c6337d23c7686c81a32ce62f550f610543a240), [`eb70da9`](https://github.com/mastra-ai/mastra/commit/eb70da98e1007b18e1463d75121bc07db55f8e09), [`8b97958`](https://github.com/mastra-ai/mastra/commit/8b979589f9aa59ba67cac565949475f2ffeb4ac3), [`8410541`](https://github.com/mastra-ai/mastra/commit/84105412c60ecd3bb33a9838146f59c4b588228f), [`01b338c`](https://github.com/mastra-ai/mastra/commit/01b338c56271f0219606710e3e8b26dee27ac6c2), [`8b7361d`](https://github.com/mastra-ai/mastra/commit/8b7361d35de68b80d05d30a74e0c69e7218fd612), [`85fb642`](https://github.com/mastra-ai/mastra/commit/85fb642f4d112d0da9f39808617397f7e47fe622), [`481c112`](https://github.com/mastra-ai/mastra/commit/481c1125b752489673ec671fcb7ca80f9c86ffb1), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3)]:
|
|
15
|
+
- @mastra/core@1.51.0-alpha.4
|
|
16
|
+
- @mastra/mcp@1.14.0-alpha.0
|
|
17
|
+
|
|
18
|
+
## 1.2.7-alpha.7
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`177010f`](https://github.com/mastra-ai/mastra/commit/177010ff096d2e4b28d89803be5b1a4cad2a0d6b), [`54a51e0`](https://github.com/mastra-ai/mastra/commit/54a51e0a484fe1ebad3fb1f7ef5282a075709eb7)]:
|
|
23
|
+
- @mastra/core@1.51.0-alpha.3
|
|
24
|
+
|
|
25
|
+
## 1.2.7-alpha.5
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`e955965`](https://github.com/mastra-ai/mastra/commit/e955965dce575a903e37cf054d28ea99aa48785e), [`860ef7e`](https://github.com/mastra-ai/mastra/commit/860ef7e77d92b63469cbe5857aa1e626197e43e9), [`17e818c`](https://github.com/mastra-ai/mastra/commit/17e818c51a958ba90641b1a959dc38faf8c034e9), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`1d39058`](https://github.com/mastra-ai/mastra/commit/1d39058e548efd691799985d5c8af2737f1c3bd2)]:
|
|
30
|
+
- @mastra/core@1.51.0-alpha.2
|
|
31
|
+
|
|
32
|
+
## 1.2.7-alpha.2
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies:
|
|
37
|
+
- @mastra/core@1.50.2-alpha.1
|
|
38
|
+
|
|
3
39
|
## 1.2.7-alpha.0
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.7-alpha.
|
|
3
|
+
"version": "1.2.7-alpha.12",
|
|
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/mcp": "^1.14.0-alpha.0",
|
|
32
|
+
"@mastra/core": "1.51.0-alpha.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.11",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.9",
|
|
48
48
|
"@internal/lint": "0.0.113",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
49
|
+
"@internal/types-builder": "0.0.88",
|
|
50
|
+
"@mastra/core": "1.51.0-alpha.5"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Channels
|
|
4
|
-
|
|
5
|
-
**Added in:** `@mastra/core@1.22.0`
|
|
6
|
-
|
|
7
|
-
Channels connect your agents to messaging platforms like Slack, Discord, and Telegram. When a user sends a message on a platform, the agent receives it, processes it through the normal agent pipeline, and streams the response back to the conversation.
|
|
8
|
-
|
|
9
|
-
## When to use channels
|
|
10
|
-
|
|
11
|
-
Use channels when you want your agent to:
|
|
12
|
-
|
|
13
|
-
- Respond to messages in Slack workspaces, Discord servers, or Telegram chats
|
|
14
|
-
- Handle both direct messages and mentions in group conversations
|
|
15
|
-
|
|
16
|
-
## Quickstart
|
|
17
|
-
|
|
18
|
-
Configure channels directly on your agent using adapters from the [Chat SDK](https://chat-sdk.dev/adapters):
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import { Agent } from '@mastra/core/agent'
|
|
22
|
-
import { createSlackAdapter } from '@chat-adapter/slack'
|
|
23
|
-
|
|
24
|
-
export const supportAgent = new Agent({
|
|
25
|
-
id: 'support-agent',
|
|
26
|
-
name: 'Support Agent',
|
|
27
|
-
instructions: 'You are a helpful support assistant.',
|
|
28
|
-
model: 'openai/gpt-5.5',
|
|
29
|
-
channels: {
|
|
30
|
-
adapters: {
|
|
31
|
-
slack: createSlackAdapter(),
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Register the agent in your Mastra instance with storage so channel state persists across restarts:
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
import { Mastra } from '@mastra/core'
|
|
41
|
-
import { LibSQLStore } from '@mastra/libsql'
|
|
42
|
-
import { supportAgent } from './agents/support-agent'
|
|
43
|
-
|
|
44
|
-
export const mastra = new Mastra({
|
|
45
|
-
agents: { supportAgent },
|
|
46
|
-
storage: new LibSQLStore({
|
|
47
|
-
url: process.env.DATABASE_URL,
|
|
48
|
-
}),
|
|
49
|
-
})
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Each adapter reads credentials from environment variables by default.
|
|
53
|
-
|
|
54
|
-
## Platform setup
|
|
55
|
-
|
|
56
|
-
Each platform requires credentials and event configuration. See the Chat SDK adapter docs for full setup: [Slack](https://chat-sdk.dev/adapters/slack), [Discord](https://chat-sdk.dev/adapters/discord), [Telegram](https://chat-sdk.dev/adapters/telegram).
|
|
57
|
-
|
|
58
|
-
Mastra generates a webhook route for each platform at:
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
/api/agents/{agentId}/channels/{platform}/webhook
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
For example: `/api/agents/support-agent/channels/slack/webhook`
|
|
65
|
-
|
|
66
|
-
Point your platform's webhook or interactions URL to this path.
|
|
67
|
-
|
|
68
|
-
### Local development
|
|
69
|
-
|
|
70
|
-
Platform webhooks need a public URL to reach your local server. Use a tunnel to expose `localhost:4111`:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# ngrok
|
|
74
|
-
ngrok http 4111
|
|
75
|
-
|
|
76
|
-
# cloudflared
|
|
77
|
-
npx cloudflared tunnel --url http://localhost:4111
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Copy the generated URL and use it as the base for your webhook paths (e.g. `https://abc123.ngrok.io/api/agents/support-agent/channels/slack/webhook`).
|
|
81
|
-
|
|
82
|
-
## Thread context
|
|
83
|
-
|
|
84
|
-
When a user mentions the agent mid-conversation in a channel thread, the agent may not have prior context. By default, Mastra fetches the last 10 messages from the platform on the first mention.
|
|
85
|
-
|
|
86
|
-
1. On the **first mention** in a thread, the agent fetches recent messages from the platform.
|
|
87
|
-
2. These messages are prepended to the user's message as conversation context.
|
|
88
|
-
3. After responding, the agent subscribes to the thread and has full history via Mastra's memory.
|
|
89
|
-
4. Subsequent messages in that thread **don't** re-fetch from the platform.
|
|
90
|
-
|
|
91
|
-
Set `threadContext: { maxMessages: 0 }` to disable this behavior. This only applies to non-DM threads.
|
|
92
|
-
|
|
93
|
-
Mastra also adds a short system message telling the agent which channel and platform the request came from (DM vs public channel, platform name, bot display name). Set `threadContext: { addSystemMessage: false }` to skip it.
|
|
94
|
-
|
|
95
|
-
## Tool approval
|
|
96
|
-
|
|
97
|
-
Tools with `requireApproval: true` render as interactive cards with Approve and Deny buttons:
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
import { createTool } from '@mastra/core/tools'
|
|
101
|
-
import { z } from 'zod'
|
|
102
|
-
|
|
103
|
-
const deleteFile = createTool({
|
|
104
|
-
id: 'delete-file',
|
|
105
|
-
description: 'Delete a file from the system',
|
|
106
|
-
inputSchema: z.object({
|
|
107
|
-
path: z.string().describe('Path to the file to delete'),
|
|
108
|
-
}),
|
|
109
|
-
requireApproval: true,
|
|
110
|
-
execute: async ({ path }) => {
|
|
111
|
-
await fs.unlink(path)
|
|
112
|
-
return { deleted: path }
|
|
113
|
-
},
|
|
114
|
-
})
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
When the agent calls this tool, users see a card with the tool name, arguments, and Approve/Deny buttons. The tool only executes after approval.
|
|
118
|
-
|
|
119
|
-
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode the agent uses `autoResumeSuspendedTools` to let the LLM decide based on the conversation context, since hidden mode doesn't post approval buttons.
|
|
120
|
-
|
|
121
|
-
## Multi-user awareness
|
|
122
|
-
|
|
123
|
-
In group conversations, Mastra automatically prefixes each message with the sender's name and platform ID so the agent can distinguish between speakers:
|
|
124
|
-
|
|
125
|
-
```text
|
|
126
|
-
[Alice (@U123ABC)]: Can you help me with this?
|
|
127
|
-
[Bob (@U456DEF)]: I have a question too.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Multimodal content
|
|
131
|
-
|
|
132
|
-
Models like Gemini can natively process images, video, and audio. Combine `inlineMedia` and `inlineLinks` to let users share rich content with your agent across platforms:
|
|
133
|
-
|
|
134
|
-
```typescript
|
|
135
|
-
import { Agent } from '@mastra/core/agent'
|
|
136
|
-
import { createDiscordAdapter } from '@chat-adapter/discord'
|
|
137
|
-
import { google } from '@ai-sdk/google'
|
|
138
|
-
|
|
139
|
-
export const visionAgent = new Agent({
|
|
140
|
-
id: 'vision-agent',
|
|
141
|
-
name: 'Vision Agent',
|
|
142
|
-
instructions: 'You can see images, watch videos, and listen to audio.',
|
|
143
|
-
model: google('gemini-3.1-flash-image-preview'),
|
|
144
|
-
channels: {
|
|
145
|
-
adapters: {
|
|
146
|
-
discord: createDiscordAdapter(),
|
|
147
|
-
},
|
|
148
|
-
inlineMedia: ['image/*', 'video/*', 'audio/*'],
|
|
149
|
-
inlineLinks: [
|
|
150
|
-
// Gemini treats YouTube URLs as native video file parts
|
|
151
|
-
{ match: 'youtube.com', mimeType: 'video/*' },
|
|
152
|
-
{ match: 'youtu.be', mimeType: 'video/*' },
|
|
153
|
-
'imgur.com', // HEAD-check imgur links; inline as file part if mimeType matches inlineMedia
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
})
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
With this configuration:
|
|
160
|
-
|
|
161
|
-
- A user uploads a screenshot and the agent describes what it sees
|
|
162
|
-
- A user uploads an `.mp4` clip and the agent summarizes the video
|
|
163
|
-
- A user pastes a YouTube link and the agent watches and discusses the video
|
|
164
|
-
- A user pastes an imgur link and the agent sees the image directly
|
|
165
|
-
|
|
166
|
-
By default, only images are sent inline (`inlineMedia: ['image/*']`). Unsupported types are described as text summaries so the agent knows about the file without crashing models that reject them.
|
|
167
|
-
|
|
168
|
-
> **Note:** See [Channels reference](https://mastra.ai/reference/agents/channels) for all `inlineMedia` patterns and [inlineLinks reference](https://mastra.ai/reference/agents/channels) for domain matching, HEAD detection, and forced mime types.
|
|
169
|
-
|
|
170
|
-
## Serverless deployment
|
|
171
|
-
|
|
172
|
-
On serverless platforms like Vercel, each request runs in a separate, short-lived instance. Channels need two things to work reliably in that environment: a way to keep the function alive while the agent responds, and a shared pub/sub so instances can coordinate.
|
|
173
|
-
|
|
174
|
-
### Keep the function alive with `waitUntil`
|
|
175
|
-
|
|
176
|
-
A channel webhook returns a `200` response right away, then the agent runs in the background to post its reply. On most serverless platforms the function is frozen as soon as it responds, which kills the run before the agent answers. Pass a `waitUntil` function so the platform keeps the instance alive until the run finishes.
|
|
177
|
-
|
|
178
|
-
On Vercel, pass `waitUntil` from `@vercel/functions`:
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { Agent } from '@mastra/core/agent'
|
|
182
|
-
import { createSlackAdapter } from '@chat-adapter/slack'
|
|
183
|
-
import { waitUntil } from '@vercel/functions'
|
|
184
|
-
|
|
185
|
-
export const agent = new Agent({
|
|
186
|
-
id: 'agent',
|
|
187
|
-
channels: {
|
|
188
|
-
adapters: {
|
|
189
|
-
slack: createSlackAdapter(),
|
|
190
|
-
},
|
|
191
|
-
waitUntil,
|
|
192
|
-
},
|
|
193
|
-
})
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Vercel and AWS Lambda require `waitUntil`, since they freeze the function as soon as the response is sent. Cloudflare Workers and Netlify Functions are detected automatically from the request context, so they don't need it. For runtimes where `waitUntil` lives on the request context but isn't detected automatically, use `resolveWaitUntil`. See the [Channels reference](https://mastra.ai/reference/agents/channels) for details.
|
|
197
|
-
|
|
198
|
-
### Coordinate instances with a shared pub/sub
|
|
199
|
-
|
|
200
|
-
Channels route messages through the agent's signal pipeline, and each run acquires a lease on its thread so a single run owns the conversation at a time. The default in-memory pub/sub can't cross instance boundaries, so on serverless a follow-up message can land on a different instance than the one running the agent. Without a shared pub/sub, that instance can't reach the active run and starts its own, leaving the original run untouched and the thread processed twice.
|
|
201
|
-
|
|
202
|
-
Configure a shared pub/sub backed by Redis Streams on the `Mastra` instance so leases and signals coordinate across instances:
|
|
203
|
-
|
|
204
|
-
```typescript
|
|
205
|
-
import { Mastra } from '@mastra/core'
|
|
206
|
-
import { RedisStreamsPubSub } from '@mastra/redis-streams'
|
|
207
|
-
|
|
208
|
-
export const mastra = new Mastra({
|
|
209
|
-
agents: { agent },
|
|
210
|
-
pubsub: new RedisStreamsPubSub({
|
|
211
|
-
url: process.env.REDIS_URL,
|
|
212
|
-
keyPrefix: 'mastra:my-app',
|
|
213
|
-
}),
|
|
214
|
-
})
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Vercel's one-click Redis integration and Upstash Redis both work well. For more on when a distributed pub/sub is needed, see the [PubSub guide](https://mastra.ai/docs/server/pubsub) and the [`RedisStreamsPubSub` reference](https://mastra.ai/reference/pubsub/redis-streams).
|
|
218
|
-
|
|
219
|
-
## Related
|
|
220
|
-
|
|
221
|
-
- [Guide: Building a Slack assistant](https://mastra.ai/guides/guide/slack-assistant)
|
|
222
|
-
- [Agent overview](https://mastra.ai/docs/agents/overview)
|
|
223
|
-
- [Tool approval](https://mastra.ai/docs/agents/agent-approval)
|
|
224
|
-
- [Channels reference](https://mastra.ai/reference/agents/channels)
|
|
225
|
-
- [Chat SDK adapters](https://chat-sdk.dev/adapters)
|