@mastra/mcp-docs-server 1.1.33-alpha.6 → 1.1.33-alpha.7

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.
@@ -33,4 +33,26 @@ The CLI reads from `.env` and `.env.local` files in your project directory durin
33
33
  You can set environment variables like so:
34
34
 
35
35
  - **Studio**: Environment variables are read from your local `.env` files and bundled into the deploy artifact. To update them, redeploy.
36
- - **Server**: On the first deploy, the CLI automatically seeds environment variables from your local `.env` files. After that, manage them per-project through the dashboard or API.
36
+ - **Server**: On the first deploy, the CLI automatically seeds environment variables from your local `.env` files. After that, manage them per-project through the dashboard or API.
37
+
38
+ To pin the deploy to a specific env file (instead of relying on the default selection), pass `--env-file`:
39
+
40
+ ```bash
41
+ mastra studio deploy --env-file .env.production --yes
42
+ ```
43
+
44
+ ## Multiple environments
45
+
46
+ A platform project maps to a single deployed instance with one set of env vars. There is no built-in concept of `staging` vs `production` slots within a project. To run the same codebase across multiple environments, create one project per environment and override `.mastra-project.json` per deploy.
47
+
48
+ ```bash
49
+ # Create-and-deploy each environment (first time only)
50
+ mastra studio deploy --project "my-app-staging" --env-file .env.staging --yes
51
+ mastra studio deploy --project "my-app-production" --env-file .env.production --yes
52
+
53
+ # Subsequent deploys — set MASTRA_PROJECT_ID per environment
54
+ MASTRA_PROJECT_ID="<staging-id>" mastra studio deploy --env-file .env.staging --yes
55
+ MASTRA_PROJECT_ID="<production-id>" mastra studio deploy --env-file .env.production --yes
56
+ ```
57
+
58
+ Each project has its own Studio URL and its own observability data. When using [`CloudExporter`](https://mastra.ai/docs/observability/tracing/exporters/cloud), set `MASTRA_PROJECT_ID` and `MASTRA_CLOUD_ACCESS_TOKEN` per environment so traces route to the matching Studio project.
@@ -75,7 +75,29 @@ This builds your project (compiling `src/mastra/` into `.mastra/output`), packag
75
75
 
76
76
  If this is your first deploy, the CLI will prompt you to create a new project or select an existing one. The `.mastra-project.json` file is written automatically.
77
77
 
78
- A deploy transitions through **queued → uploading → starting → running** (or **failed** if something goes wrong). If a sandbox is already running for your project, the platform hot-updates it in place with no downtime. Otherwise it creates a fresh sandbox. Your instance URL is assigned per project slug and remains stable across deploys. Environment variables from `.env`, `.env.local`, and `.env.production` are included automatically.
78
+ A deploy transitions through **queued → uploading → starting → running** (or **failed** if something goes wrong). If a sandbox is already running for your project, the platform hot-updates it in place with no downtime. Otherwise it creates a fresh sandbox. Your instance URL is assigned per project slug and remains stable across deploys.
79
+
80
+ ### Env file requirement
81
+
82
+ The deploy bundles environment variables from a `.env` or `.env.*` file in the project directory. If no env file is present, the deploy errors with `No env file found for deploy.` after the build step. Add at least an empty `.env` file before running the command.
83
+
84
+ When multiple env files are present, the CLI prompts you to pick one. To select non-interactively, pass `--env-file`:
85
+
86
+ ```bash
87
+ mastra studio deploy --env-file .env.production --yes
88
+ ```
89
+
90
+ This is also how you target multiple environments from a single codebase: maintain one env file per environment (for example `.env.staging`, `.env.production`) and pass the right one to each deploy. Each environment still requires its own Mastra platform project — see [Configuration](https://mastra.ai/docs/mastra-platform/configuration) for the multi-environment pattern.
91
+
92
+ ### Create a new project non-interactively
93
+
94
+ `mastra studio deploy` can create a project on first run. If `--project <name>` does not match an existing project, the CLI uses the value as the new project name and creates it after confirmation. Combined with `--yes`, this is fully scriptable:
95
+
96
+ ```bash
97
+ mastra studio deploy --project "my-new-project" --yes
98
+ ```
99
+
100
+ Use this from CI or AI coding agents instead of `mastra studio projects create`, which is interactive only.
79
101
 
80
102
  ## Running a server
81
103
 
@@ -269,8 +269,34 @@ mastra studio deploy
269
269
 
270
270
  The CLI builds your project, uploads the artifact, and deploys it. On first deploy, a `.mastra-project.json` file is created to link your local project to the platform. Commit this file to your repository.
271
271
 
272
+ The deploy requires a `.env` or `.env.*` file in the project directory. If none exists the CLI errors with `No env file found for deploy.` after the build completes — add at least an empty `.env` before running the command.
273
+
274
+ To create a new platform project in one non-interactive step (instead of running `mastra studio projects create` separately), pass a name with `--project` and accept defaults with `--yes`:
275
+
276
+ ```bash
277
+ mastra studio deploy --project "my-new-project" --yes
278
+ ```
279
+
272
280
  See [Studio deployment](https://mastra.ai/docs/studio/deployment) for details.
273
281
 
282
+ ### Multiple environments
283
+
284
+ Mastra platform projects do not have a built-in concept of named environments (for example `staging` vs `production`). To deploy the same codebase to multiple environments, create one project per environment and pair each deploy with the matching env file using `--env-file`.
285
+
286
+ The pattern below uses one `.env.<env>` file per environment, deploys to a project named `my-app-<env>`, and overrides `.mastra-project.json` per deploy with `MASTRA_ORG_ID` and `MASTRA_PROJECT_ID`:
287
+
288
+ ```bash
289
+ # First deploy of each environment — creates the project
290
+ mastra studio deploy --project "my-app-staging" --env-file .env.staging --yes
291
+ mastra studio deploy --project "my-app-production" --env-file .env.production --yes
292
+
293
+ # Subsequent deploys (CI/CD) — target the existing project
294
+ MASTRA_PROJECT_ID="<staging-id>" mastra studio deploy --env-file .env.staging --yes
295
+ MASTRA_PROJECT_ID="<production-id>" mastra studio deploy --env-file .env.production --yes
296
+ ```
297
+
298
+ Each environment ends up with its own Studio URL and its own observability data. Send `MASTRA_CLOUD_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` per environment so `CloudExporter` routes traces to the correct project.
299
+
274
300
  ## Deploy Server (optional)
275
301
 
276
302
  If you need a production API endpoint, deploy a Server:
@@ -8,6 +8,10 @@ This guide provides a comprehensive overview of breaking changes when upgrading
8
8
 
9
9
  > **Need help?:** Need help with the migration? Join our [Discord community](https://discord.gg/BTYqqHKUrf) to ask questions.
10
10
 
11
+ > **Coming from Mastra Cloud?:** The legacy Mastra Cloud product has been replaced by the [Mastra platform](https://mastra.ai/docs/mastra-platform/overview), which splits hosting into two separate products: **Studio** (visual environment, observability) and **Server** (production API). Old Mastra Cloud access tokens do not work with Mastra platform — you must create new ones with `mastra auth tokens create`.
12
+ >
13
+ > If you upgrade to v1 packages without also migrating your `telemetry:` config to `observability:` and creating a Studio project, observability data will stop flowing. Follow the [Mastra Cloud migration guide](https://mastra.ai/guides/migrations/mastra-cloud) end to end.
14
+
11
15
  ## Migration strategy
12
16
 
13
17
  ### Update all Mastra packages to `latest` tag
@@ -2,6 +2,10 @@
2
2
 
3
3
  The observability system has been restructured in v1 with a dedicated `@mastra/observability` package. This guide covers two migration paths depending on which version you're upgrading from.
4
4
 
5
+ > **Observability data stops flowing on upgrade:** If you upgrade Mastra packages to v1 without migrating your `telemetry:` config to `observability:`, the old config is ignored at runtime. Your service will start cleanly with no error, but **no traces, logs, or metrics will be sent anywhere**. If you were sending data to Mastra Cloud, the dashboard will go empty.
6
+ >
7
+ > Complete this migration in the same change that bumps your Mastra packages, and verify traces appear in [Mastra Studio](https://mastra.ai/docs/studio/observability) before considering the upgrade complete. If you previously hosted on Mastra Cloud, also follow the [Mastra Cloud migration guide](https://mastra.ai/guides/migrations/mastra-cloud) — the new platform requires a new access token and a Studio project before `CloudExporter` can route data to it.
8
+
5
9
  ## Migration paths
6
10
 
7
11
  ### From OTEL-based Telemetry (0.x)
@@ -199,10 +199,18 @@ Builds and deploys your project to Mastra platform. Requires authentication via
199
199
  mastra studio deploy
200
200
  ```
201
201
 
202
- The command runs `mastra build`, zips the output, reads environment variables from `.env`, `.env.local`, and `.env.production`, and uploads everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
202
+ The command runs `mastra build`, zips the output, reads an env file from the project directory, and uploads everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
203
+
204
+ The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`); pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
203
205
 
204
206
  Organization and project are resolved in order from: Environment variable flag, `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
205
207
 
208
+ If `--project <value>` does not match an existing project (by ID or slug), the CLI treats `<value>` as a new project name and creates it after confirmation. Combined with `--yes`, this creates and deploys a new project in one non-interactive command:
209
+
210
+ ```bash
211
+ mastra studio deploy --project "my-new-project" --yes
212
+ ```
213
+
206
214
  ### Arguments
207
215
 
208
216
  #### `[dir]`
@@ -217,7 +225,7 @@ Organization ID. Can also be set via the `MASTRA_ORG_ID` environment variable.
217
225
 
218
226
  #### `--project`
219
227
 
220
- Project ID or slug. Can also be set via the `MASTRA_PROJECT_ID` environment variable.
228
+ Project ID or slug. Can also be set via the `MASTRA_PROJECT_ID` environment variable. If no project matches, the value is used as the name of a new project to create on deploy.
221
229
 
222
230
  #### `-y, --yes`
223
231
 
@@ -227,6 +235,14 @@ Auto-accept defaults without confirmation prompts.
227
235
 
228
236
  Path to the project config file. Defaults to `.mastra-project.json`.
229
237
 
238
+ #### `--env-file`
239
+
240
+ Path to the env file to bundle with the deploy (relative to the project directory). Use this to deploy the same project to multiple environments by pointing at different env files (for example `.env.staging`, `.env.production`).
241
+
242
+ ```bash
243
+ mastra studio deploy --env-file .env.staging --yes
244
+ ```
245
+
230
246
  #### `--skip-build`
231
247
 
232
248
  Skip the build step and deploy the existing `.mastra/output` directory.
@@ -271,13 +287,23 @@ Stream logs in real time.
271
287
 
272
288
  Number of recent log lines to show.
273
289
 
290
+ ### `mastra studio deploy suggestions`
291
+
292
+ Shows diagnosis results and suggested fixes for a failed Studio deploy.
293
+
294
+ ```bash
295
+ mastra studio deploy suggestions [deploy-id]
296
+ ```
297
+
298
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis does not exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
299
+
274
300
  ### `mastra studio projects`
275
301
 
276
302
  Lists all projects in the current organization.
277
303
 
278
304
  ### `mastra studio projects create`
279
305
 
280
- Creates a new project through an interactive prompt.
306
+ Creates a new project through an interactive prompt. This command does not accept a `--name` flag; for non-interactive project creation, use [`mastra studio deploy --project <name> --yes`](#mastra-studio-deploy) instead, which creates the project and deploys to it in one step.
281
307
 
282
308
  ## `mastra server deploy`
283
309
 
@@ -287,6 +313,16 @@ Builds and deploys your project to Server on Mastra platform. Works the same as
287
313
  mastra server deploy [dir]
288
314
  ```
289
315
 
316
+ ### `mastra server deploy suggestions`
317
+
318
+ Shows diagnosis results and suggested fixes for a failed Server deploy.
319
+
320
+ ```bash
321
+ mastra server deploy suggestions [deploy-id]
322
+ ```
323
+
324
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis does not exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
325
+
290
326
  ## `mastra server pause`
291
327
 
292
328
  Pauses the running server instance for the linked project. Organization and project resolution work the same as [`mastra server deploy`](#mastra-server-deploy).
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.33-alpha.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ca28c23`](https://github.com/mastra-ai/mastra/commit/ca28c232a2f18801a6cf20fe053479237b4d4fb0)]:
8
+ - @mastra/core@1.32.0-alpha.3
9
+
3
10
  ## 1.1.33-alpha.5
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.1.33-alpha.6",
3
+ "version": "1.1.33-alpha.7",
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.32.0-alpha.2",
33
- "@mastra/mcp": "^1.6.1-alpha.1"
32
+ "@mastra/mcp": "^1.6.1-alpha.1",
33
+ "@mastra/core": "1.32.0-alpha.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@hono/node-server": "^1.19.11",
@@ -46,9 +46,9 @@
46
46
  "tsx": "^4.21.0",
47
47
  "typescript": "^6.0.3",
48
48
  "vitest": "4.1.5",
49
- "@internal/lint": "0.0.90",
50
49
  "@internal/types-builder": "0.0.65",
51
- "@mastra/core": "1.32.0-alpha.2"
50
+ "@internal/lint": "0.0.90",
51
+ "@mastra/core": "1.32.0-alpha.3"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {