@mastra/mcp-docs-server 1.1.9-alpha.2 → 1.1.10-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.
@@ -1,6 +1,6 @@
1
1
  # Storage
2
2
 
3
- For agents to remember previous interactions, Mastra needs a database. Use a storage adapter for one of the [supported databases](#supported-providers) and pass it to your Mastra instance.
3
+ For agents to remember previous interactions, Mastra needs a storage adapter. Use one of the [supported providers](#supported-providers) and pass it to your Mastra instance.
4
4
 
5
5
  ```typescript
6
6
  import { Mastra } from '@mastra/core'
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
24
24
 
25
25
  This configures instance-level storage, which all agents share by default. You can also configure [agent-level storage](#agent-level-storage) for isolated data boundaries.
26
26
 
27
- Mastra automatically creates the necessary tables on first interaction. See the [core schema](https://mastra.ai/reference/storage/overview) for details on what gets created, including tables for messages, threads, resources, workflows, traces, and evaluation datasets.
27
+ Mastra automatically initializes the necessary storage structures on first interaction. See [Storage Overview](https://mastra.ai/reference/storage/overview) for domain coverage and the schema used by the built-in database-backed domains.
28
28
 
29
29
  ## Supported providers
30
30
 
@@ -35,7 +35,7 @@ Each provider page includes installation instructions, configuration parameters,
35
35
  - [MongoDB](https://mastra.ai/reference/storage/mongodb)
36
36
  - [Upstash](https://mastra.ai/reference/storage/upstash)
37
37
  - [Cloudflare D1](https://mastra.ai/reference/storage/cloudflare-d1)
38
- - [Cloudflare Durable Objects](https://mastra.ai/reference/storage/cloudflare)
38
+ - [Cloudflare KV & Durable Objects](https://mastra.ai/reference/storage/cloudflare)
39
39
  - [Convex](https://mastra.ai/reference/storage/convex)
40
40
  - [DynamoDB](https://mastra.ai/reference/storage/dynamodb)
41
41
  - [LanceDB](https://mastra.ai/reference/storage/lance)
@@ -49,7 +49,7 @@ Storage can be configured at the instance level (shared by all agents) or at the
49
49
 
50
50
  ### Instance-level storage
51
51
 
52
- Add storage to your Mastra instance so all agents, workflows, observability traces and scores share the same memory provider:
52
+ Add storage to your Mastra instance so all agents, workflows, observability traces, and scores share the same storage backend:
53
53
 
54
54
  ```typescript
55
55
  import { Mastra } from '@mastra/core'
@@ -71,7 +71,7 @@ This is useful when all primitives share the same storage backend and have simil
71
71
 
72
72
  #### Composite storage
73
73
 
74
- [Composite storage](https://mastra.ai/reference/storage/composite) is an alternative way to configure instance-level storage. Use `MastraCompositeStore` to set the `memory` domain (and any other [domains](https://mastra.ai/reference/storage/composite) you need) to different storage providers.
74
+ [Composite storage](https://mastra.ai/reference/storage/composite) is an alternative way to configure instance-level storage. Use `MastraCompositeStore` to route `memory` and any other [supported domains](https://mastra.ai/reference/storage/composite) to different storage providers.
75
75
 
76
76
  ```typescript
77
77
  import { Mastra } from '@mastra/core'
@@ -372,6 +372,9 @@ interface MCPToolCallAttributes {
372
372
  /** MCP server version */
373
373
  serverVersion?: string
374
374
 
375
+ /** Tool description */
376
+ toolDescription?: string
377
+
375
378
  /** Whether tool execution was successful */
376
379
  success?: boolean
377
380
  }
@@ -1,8 +1,11 @@
1
1
  # Cloudflare storage
2
2
 
3
- The Cloudflare KV storage implementation provides a globally distributed, serverless key-value store solution using Cloudflare Workers KV.
3
+ Mastra provides two Cloudflare storage implementations:
4
4
 
5
- > **Observability Not Supported:** Cloudflare KV storage **doesn't support the observability domain**. Traces from the `DefaultExporter` can't be persisted to KV, and Mastra Studio's observability features won't work with Cloudflare KV as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
5
+ - **Cloudflare KV** (`CloudflareKVStorage`) - A globally distributed, eventually consistent key-value store
6
+ - **Cloudflare Durable Objects** (`CloudflareDOStorage`) - A strongly consistent, SQLite-based storage using Durable Objects
7
+
8
+ > **Observability Not Supported:** Cloudflare storage **does not support the observability domain**. Traces from the `DefaultExporter` cannot be persisted, and Mastra Studio's observability features won't work with Cloudflare as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse or PostgreSQL.
6
9
 
7
10
  ## Installation
8
11
 
@@ -30,13 +33,17 @@ yarn add @mastra/cloudflare@latest
30
33
  bun add @mastra/cloudflare@latest
31
34
  ```
32
35
 
33
- ## Usage
36
+ ## Cloudflare KV Storage
37
+
38
+ The KV storage implementation provides a globally distributed, serverless key-value store solution using Cloudflare Workers KV.
39
+
40
+ ### Usage
34
41
 
35
42
  ```typescript
36
- import { CloudflareStore } from '@mastra/cloudflare'
43
+ import { CloudflareKVStorage } from '@mastra/cloudflare/kv'
37
44
 
38
45
  // --- Example 1: Using Workers Binding ---
39
- const storageWorkers = new CloudflareStore({
46
+ const storageWorkers = new CloudflareKVStorage({
40
47
  id: 'cloudflare-workers-storage',
41
48
  bindings: {
42
49
  threads: THREADS_KV, // KVNamespace binding for threads table
@@ -47,7 +54,7 @@ const storageWorkers = new CloudflareStore({
47
54
  })
48
55
 
49
56
  // --- Example 2: Using REST API ---
50
- const storageRest = new CloudflareStore({
57
+ const storageRest = new CloudflareKVStorage({
51
58
  id: 'cloudflare-rest-storage',
52
59
  accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, // Cloudflare Account ID
53
60
  apiToken: process.env.CLOUDFLARE_API_TOKEN!, // Cloudflare API Token
@@ -55,7 +62,7 @@ const storageRest = new CloudflareStore({
55
62
  })
56
63
  ```
57
64
 
58
- ## Parameters
65
+ ### Parameters
59
66
 
60
67
  **id** (`string`): Unique identifier for this storage instance.
61
68
 
@@ -85,4 +92,68 @@ Cloudflare KV is an eventually consistent store, meaning that data may not be im
85
92
 
86
93
  ### Key Structure & Namespacing
87
94
 
88
- Keys in Cloudflare KV are structured as a combination of a configurable prefix and a table-specific format (e.g., `threads:threadId`). For Workers deployments, `keyPrefix` is used to isolate data within a namespace; for REST API deployments, `namespacePrefix` is used to isolate entire namespaces between environments or applications.
95
+ Keys in Cloudflare KV are structured as a combination of a configurable prefix and a table-specific format (e.g., `threads:threadId`). For Workers deployments, `keyPrefix` is used to isolate data within a namespace; for REST API deployments, `namespacePrefix` is used to isolate entire namespaces between environments or applications.
96
+
97
+ ## Cloudflare Durable Objects Storage
98
+
99
+ The Durable Objects storage implementation provides strongly consistent, SQLite-based storage using Cloudflare Durable Objects. This is ideal for applications that require transactional consistency and SQL query capabilities.
100
+
101
+ ### Usage
102
+
103
+ ```typescript
104
+ import { DurableObject } from 'cloudflare:workers'
105
+ import { CloudflareDOStorage } from '@mastra/cloudflare/do'
106
+
107
+ class AgentDurableObject extends DurableObject<Env> {
108
+ private storage: CloudflareDOStorage
109
+
110
+ constructor(ctx: DurableObjectState, env: Env) {
111
+ super(ctx, env)
112
+ this.storage = new CloudflareDOStorage({
113
+ sql: ctx.storage.sql,
114
+ tablePrefix: 'mastra_', // Optional: prefix for table names
115
+ })
116
+ }
117
+
118
+ async run() {
119
+ const memory = await this.storage.getStore('memory')
120
+ await memory?.saveThread({
121
+ thread: { id: 'thread-1', resourceId: 'user-1', title: 'Chat', metadata: {} },
122
+ })
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### Parameters
128
+
129
+ **sql** (`SqlStorage`): SqlStorage instance from Durable Objects ctx.storage.sql
130
+
131
+ **tablePrefix** (`string`): Optional prefix for table names (only letters, numbers, and underscores allowed)
132
+
133
+ **disableInit** (`boolean`): When true, automatic table creation/migrations are disabled. Useful for CI/CD pipelines where migrations run separately.
134
+
135
+ ### Strong Consistency
136
+
137
+ Unlike KV, Durable Objects provide strong consistency guarantees. All reads and writes within a Durable Object are serialized, making it very suitable for fast, long-running agents.
138
+
139
+ ### SQL Capabilities
140
+
141
+ Durable Objects storage uses SQLite under the hood, enabling efficient queries, filtering, and pagination that aren't possible with key-value storage.
142
+
143
+ ## Schema Management
144
+
145
+ Both storage implementations handle schema creation and updates automatically. They create the following tables:
146
+
147
+ - `threads`: Stores conversation threads
148
+ - `messages`: Stores individual messages
149
+ - `workflow_snapshot`: Stores workflow run state
150
+
151
+ ## Deprecated Aliases
152
+
153
+ For backwards compatibility, the following aliases are available:
154
+
155
+ ```typescript
156
+ // These are deprecated - use CloudflareKVStorage and CloudflareDOStorage instead
157
+ import { CloudflareStore } from '@mastra/cloudflare/kv' // alias for CloudflareKVStorage
158
+ import { DOStore } from '@mastra/cloudflare/do' // alias for CloudflareDOStorage
159
+ ```
@@ -58,7 +58,7 @@ bun add @mastra/pg@latest @mastra/libsql@latest
58
58
 
59
59
  ## Storage domains
60
60
 
61
- Mastra organizes storage into five specialized domains, each handling a specific type of data. Each domain can be backed by a different storage adapter, and domain classes are exported from each storage package.
61
+ Mastra organizes storage into domains, each handling a specific type of data. Each domain can be backed by a different storage adapter, and domain classes are exported from each storage package.
62
62
 
63
63
  | Domain | Description |
64
64
  | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -67,6 +67,10 @@ Mastra organizes storage into five specialized domains, each handling a specific
67
67
  | `scores` | Evaluation results from Mastra's evals system. Scores and metrics are persisted here for analysis and comparison over time. |
68
68
  | `observability` | Telemetry data including traces and spans. Agent interactions, tool calls, and LLM requests generate spans collected into traces for debugging and performance analysis. |
69
69
  | `agents` | Agent configurations for stored agents. Enables agents to be defined and updated at runtime without code deployments. |
70
+ | `datasets` | Evaluation datasets used for experiment runs. Stores dataset definitions, schemas, and versioned items. |
71
+ | `experiments` | Experiment runs and per-item experiment results linked to datasets and targets. |
72
+
73
+ > **Note:** `MastraCompositeStore` accepts all of the domain keys above, but storage adapter support varies by package. You can mix adapters per domain, but only for domains implemented and exported by those adapters. For example, `memory: new MemoryLibSQL(...)` and `workflows: new WorkflowsPG(...)` is valid because both packages export those domain classes.
70
74
 
71
75
  ## Usage
72
76
 
@@ -124,7 +128,9 @@ export const mastra = new Mastra({
124
128
 
125
129
  **default** (`MastraCompositeStore`): Default storage adapter. Domains not explicitly specified in \`domains\` will use this storage's domains as fallbacks.
126
130
 
127
- **domains** (`object`): Individual domain overrides. Each domain can come from a different storage adapter. These take precedence over the default storage.
131
+ **disableInit** (`boolean`): When true, automatic initialization is disabled. You must call init() explicitly.
132
+
133
+ **domains** (`object`): Individual domain overrides. Each domain can come from a different storage adapter. These take precedence over both \`editor\` and \`default\` storage.
128
134
 
129
135
  **domains.memory** (`MemoryStorage`): Storage for threads, messages, and resources.
130
136
 
@@ -136,7 +142,9 @@ export const mastra = new Mastra({
136
142
 
137
143
  **domains.agents** (`AgentsStorage`): Storage for stored agent configurations.
138
144
 
139
- **disableInit** (`boolean`): When true, automatic initialization is disabled. You must call init() explicitly.
145
+ **domains.datasets** (`DatasetsStorage`): Storage for dataset metadata, dataset items, and dataset versions.
146
+
147
+ **domains.experiments** (`ExperimentsStorage`): Storage for experiment runs and per-item experiment results.
140
148
 
141
149
  ## Initialization
142
150
 
@@ -1,6 +1,23 @@
1
1
  # Storage overview
2
2
 
3
- Mastra requires the following tables to be present in the database.
3
+ Mastra storage is organized into domains. Each domain owns a set of tables or collections. Depending on your adapter and configuration, you may use all domains or only a subset.
4
+
5
+ ## Storage domains
6
+
7
+ `MastraCompositeStore` can route the following domain keys:
8
+
9
+ Not every storage adapter implements every domain. Composite storage lets you mix adapters per domain when the adapter packages export the corresponding domain classes.
10
+
11
+ | Domain | Description |
12
+ | --------------- | -------------------------------------------------------------------------------------- |
13
+ | `memory` | Conversation persistence: messages, threads, and resources (including working memory). |
14
+ | `workflows` | Workflow run snapshots used for suspend and resume. |
15
+ | `scores` | Evaluation score records from eval runs. |
16
+ | `observability` | Traces and spans used by observability exporters and Studio. |
17
+ | `datasets` | Dataset records, versioned items, and dataset versions used by experiments. |
18
+ | `experiments` | Experiment runs and per-item experiment results. |
19
+
20
+ The schema definitions below cover the built-in database-backed tables documented for `memory`, `workflows`, `scores`, and `observability`. Other domains, and non-database adapters, use implementation-specific storage structures.
4
21
 
5
22
  ## Core schema
6
23
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.10-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`cddf895`](https://github.com/mastra-ai/mastra/commit/cddf895532b8ee7f9fa814136ec672f53d37a9ba), [`aede3cc`](https://github.com/mastra-ai/mastra/commit/aede3cc2a83b54bbd9e9a54c8aedcd1708b2ef87), [`c4c7dad`](https://github.com/mastra-ai/mastra/commit/c4c7dadfe2e4584f079f6c24bfabdb8c4981827f), [`b9a77b9`](https://github.com/mastra-ai/mastra/commit/b9a77b951fa6422077080b492cce74460d2f8fdd), [`45c3112`](https://github.com/mastra-ai/mastra/commit/45c31122666a0cc56b94727099fcb1871ed1b3f6), [`45c3112`](https://github.com/mastra-ai/mastra/commit/45c31122666a0cc56b94727099fcb1871ed1b3f6), [`5e7c287`](https://github.com/mastra-ai/mastra/commit/5e7c28701f2bce795dd5c811e4c3060bf2ea2242), [`7e17d3f`](https://github.com/mastra-ai/mastra/commit/7e17d3f656fdda2aad47c4beb8c491636d70820c)]:
8
+ - @mastra/core@1.12.0-alpha.0
9
+ - @mastra/mcp@1.2.0-alpha.0
10
+
11
+ ## 1.1.9
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`4f71b43`](https://github.com/mastra-ai/mastra/commit/4f71b436a4a6b8839842d8da47b57b84509af56c), [`a070277`](https://github.com/mastra-ai/mastra/commit/a07027766ce195ba74d0783116d894cbab25d44c), [`b628b91`](https://github.com/mastra-ai/mastra/commit/b628b9128b372c0f54214d902b07279f03443900), [`332c014`](https://github.com/mastra-ai/mastra/commit/332c014e076b81edf7fe45b58205882726415e90), [`6b63153`](https://github.com/mastra-ai/mastra/commit/6b63153878ea841c0f4ce632ba66bb33e57e9c1b), [`4246e34`](https://github.com/mastra-ai/mastra/commit/4246e34cec9c26636d0965942268e6d07c346671), [`b8837ee`](https://github.com/mastra-ai/mastra/commit/b8837ee77e2e84197609762bfabd8b3da326d30c), [`866cc2c`](https://github.com/mastra-ai/mastra/commit/866cc2cb1f0e3b314afab5194f69477fada745d1), [`5d950f7`](https://github.com/mastra-ai/mastra/commit/5d950f7bf426a215a1808f0abef7de5c8336ba1c), [`28c85b1`](https://github.com/mastra-ai/mastra/commit/28c85b184fc32b40f7f160483c982da6d388ecbd), [`e9a08fb`](https://github.com/mastra-ai/mastra/commit/e9a08fbef1ada7e50e961e2f54f55e8c10b4a45c), [`1d0a8a8`](https://github.com/mastra-ai/mastra/commit/1d0a8a8acf33203d5744fc429b090ad8598aa8ed), [`631ffd8`](https://github.com/mastra-ai/mastra/commit/631ffd82fed108648b448b28e6a90e38c5f53bf5), [`6bcbf8a`](https://github.com/mastra-ai/mastra/commit/6bcbf8a6774d5a53b21d61db8a45ce2593ca1616), [`aae2295`](https://github.com/mastra-ai/mastra/commit/aae2295838a2d329ad6640829e87934790ffe5b8), [`aa61f29`](https://github.com/mastra-ai/mastra/commit/aa61f29ff8095ce46a4ae16e46c4d8c79b2b685b), [`7ff3714`](https://github.com/mastra-ai/mastra/commit/7ff37148515439bb3be009a60e02c3e363299760), [`18c3a90`](https://github.com/mastra-ai/mastra/commit/18c3a90c9e48cf69500e308affeb8eba5860b2af), [`41d79a1`](https://github.com/mastra-ai/mastra/commit/41d79a14bd8cb6de1e2565fd0a04786bae2f211b), [`f35487b`](https://github.com/mastra-ai/mastra/commit/f35487bb2d46c636e22aa71d90025613ae38235a), [`6dc2192`](https://github.com/mastra-ai/mastra/commit/6dc21921aef0f0efab15cd0805fa3d18f277a76f), [`eeb3a3f`](https://github.com/mastra-ai/mastra/commit/eeb3a3f43aca10cf49479eed2a84b7d9ecea02ba), [`e673376`](https://github.com/mastra-ai/mastra/commit/e6733763ad1321aa7e5ae15096b9c2104f93b1f3), [`05f8d90`](https://github.com/mastra-ai/mastra/commit/05f8d9009290ce6aa03428b3add635268615db85), [`b2204c9`](https://github.com/mastra-ai/mastra/commit/b2204c98a42848bbfb6f0440f005dc2b6354f1cd), [`a1bf1e3`](https://github.com/mastra-ai/mastra/commit/a1bf1e385ed4c0ef6f11b56c5887442970d127f2), [`b6f647a`](https://github.com/mastra-ai/mastra/commit/b6f647ae2388e091f366581595feb957e37d5b40), [`0c57b8b`](https://github.com/mastra-ai/mastra/commit/0c57b8b0a69a97b5a4ae3f79be6c610f29f3cf7b), [`b081f27`](https://github.com/mastra-ai/mastra/commit/b081f272cf411716e1d6bd72ceac4bcee2657b19), [`4b8da97`](https://github.com/mastra-ai/mastra/commit/4b8da97a5ce306e97869df6c39535d9069e563db), [`0c09eac`](https://github.com/mastra-ai/mastra/commit/0c09eacb1926f64cfdc9ae5c6d63385cf8c9f72c), [`6b9b93d`](https://github.com/mastra-ai/mastra/commit/6b9b93d6f459d1ba6e36f163abf62a085ddb3d64), [`31b6067`](https://github.com/mastra-ai/mastra/commit/31b6067d0cc3ab10e1b29c36147f3b5266bc714a), [`797ac42`](https://github.com/mastra-ai/mastra/commit/797ac4276de231ad2d694d9aeca75980f6cd0419), [`0bc289e`](https://github.com/mastra-ai/mastra/commit/0bc289e2d476bf46c5b91c21969e8d0c6864691c), [`9b75a06`](https://github.com/mastra-ai/mastra/commit/9b75a06e53ebb0b950ba7c1e83a0142047185f46), [`4c3a1b1`](https://github.com/mastra-ai/mastra/commit/4c3a1b122ea083e003d71092f30f3b31680b01c0), [`256df35`](https://github.com/mastra-ai/mastra/commit/256df3571d62beb3ad4971faa432927cc140e603), [`85cc3b3`](https://github.com/mastra-ai/mastra/commit/85cc3b3b6f32ae4b083c26498f50d5b250ba944b), [`97ea28c`](https://github.com/mastra-ai/mastra/commit/97ea28c746e9e4147d56047bbb1c4a92417a3fec), [`d567299`](https://github.com/mastra-ai/mastra/commit/d567299cf81e02bd9d5221d4bc05967d6c224161), [`716ffe6`](https://github.com/mastra-ai/mastra/commit/716ffe68bed81f7c2690bc8581b9e140f7bf1c3d), [`8296332`](https://github.com/mastra-ai/mastra/commit/8296332de21c16e3dfc3d0b2d615720a6dc88f2f), [`4df2116`](https://github.com/mastra-ai/mastra/commit/4df211619dd922c047d396ca41cd7027c8c4c8e7), [`2219c1a`](https://github.com/mastra-ai/mastra/commit/2219c1acbd21da116da877f0036ffb985a9dd5a3), [`17c4145`](https://github.com/mastra-ai/mastra/commit/17c4145166099354545582335b5252bdfdfd908b)]:
16
+ - @mastra/core@1.11.0
17
+ - @mastra/mcp@1.1.0
18
+
3
19
  ## 1.1.9-alpha.2
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.9-alpha.2",
3
+ "version": "1.1.10-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",
@@ -29,8 +29,8 @@
29
29
  "jsdom": "^26.1.0",
30
30
  "local-pkg": "^1.1.2",
31
31
  "zod": "^4.3.6",
32
- "@mastra/core": "1.11.0-alpha.2",
33
- "@mastra/mcp": "^1.1.0"
32
+ "@mastra/mcp": "^1.2.0-alpha.0",
33
+ "@mastra/core": "1.12.0-alpha.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@hono/node-server": "^1.19.9",
@@ -46,9 +46,9 @@
46
46
  "tsx": "^4.21.0",
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "4.0.18",
49
- "@internal/lint": "0.0.66",
50
- "@mastra/core": "1.11.0-alpha.2",
51
- "@internal/types-builder": "0.0.41"
49
+ "@internal/types-builder": "0.0.42",
50
+ "@internal/lint": "0.0.67",
51
+ "@mastra/core": "1.12.0-alpha.0"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {