@mastra/mcp-docs-server 1.1.35-alpha.0 → 1.1.35-alpha.2

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.
@@ -141,7 +141,7 @@ export const mastra = new Mastra({
141
141
  host: '0.0.0.0',
142
142
  apiRoutes: [
143
143
  {
144
- path: '/api/inngest',
144
+ path: '/inngest/api',
145
145
  method: 'ALL',
146
146
  createHandler: async ({ mastra }) => {
147
147
  return serve({ mastra, inngest })
@@ -153,6 +153,8 @@ export const mastra = new Mastra({
153
153
  })
154
154
  ```
155
155
 
156
+ > **Note:** The path is `/inngest/api`, not `/api/inngest`. Mastra reserves the `/api` prefix for built-in routes (agents, workflows, memory). Custom `apiRoutes` paths that start with the server's `apiPrefix` (default `/api`) throw at startup. See [#15743](https://github.com/mastra-ai/mastra/pull/15743) for context, or skip to [Using a custom `apiPrefix`](#using-a-custom-apiprefix) if you need to keep `/api/inngest`.
157
+
156
158
  ## Running workflows
157
159
 
158
160
  ### Running locally
@@ -162,10 +164,10 @@ export const mastra = new Mastra({
162
164
  2. Start the Inngest Dev Server. In a new terminal, run:
163
165
 
164
166
  ```bash
165
- npx inngest-cli@latest dev -u http://localhost:4111/api/inngest
167
+ npx inngest-cli@latest dev -u http://localhost:4111/inngest/api
166
168
  ```
167
169
 
168
- > **Note:** The URL after `-u` tells the Inngest dev server where to find your Mastra `/api/inngest` endpoint
170
+ > **Note:** The URL after `-u` tells the Inngest dev server where to find your Mastra `/inngest/api` endpoint
169
171
 
170
172
  3. Open the Inngest Dashboard at <http://localhost:8288> and go to the **Apps** section in the sidebar to verify your Mastra workflow is registered
171
173
 
@@ -229,6 +231,8 @@ Before you begin, make sure you have:
229
231
 
230
232
  5. Sync with the [Inngest dashboard](https://app.inngest.com/env/production/apps) by selecting **Sync new app with Vercel** and following the instructions
231
233
 
234
+ > **Warning:** Inngest's auto-discover convention assumes `/api/inngest`. Because this guide uses `/inngest/api`, set the **URL** field on the Inngest app to your deployed origin plus `/inngest/api` (for example `https://your-app.vercel.app/inngest/api`). If you leave it on the default, the Inngest dashboard will not find your app's functions.
235
+
232
236
  6. Invoke the workflow by going to **Functions**, selecting `workflow.increment-workflow`, selecting **All actions** > **Invoke**, and providing the following input:
233
237
 
234
238
  ```json
@@ -294,7 +298,7 @@ export const mastra = new Mastra({
294
298
  host: '0.0.0.0',
295
299
  apiRoutes: [
296
300
  {
297
- path: '/api/inngest',
301
+ path: '/inngest/api',
298
302
  method: 'ALL',
299
303
  createHandler: async ({ mastra }) => {
300
304
  return serve({
@@ -316,7 +320,7 @@ When you include custom functions:
316
320
 
317
321
  1. Mastra workflows are automatically converted to Inngest functions with IDs like `workflow.${workflowId}`
318
322
  2. Custom functions retain their specified IDs (e.g., `send-welcome-email`, `process-webhook`)
319
- 3. All functions are served together on the same `/api/inngest` endpoint
323
+ 3. All functions are served together on the same `/inngest/api` endpoint
320
324
 
321
325
  This allows you to combine Mastra's workflow orchestration with your existing Inngest functions.
322
326
 
@@ -338,7 +342,7 @@ const app = express()
338
342
  app.use(express.json())
339
343
 
340
344
  const handler = createServe(expressAdapter)({ mastra, inngest })
341
- app.use('/api/inngest', handler)
345
+ app.use('/inngest/api', handler)
342
346
 
343
347
  app.listen(3000)
344
348
  ```
@@ -358,7 +362,7 @@ const handler = createServe(fastifyAdapter)({ mastra, inngest })
358
362
 
359
363
  fastify.route({
360
364
  method: ['GET', 'POST', 'PUT'],
361
- url: '/api/inngest',
365
+ url: '/inngest/api',
362
366
  handler,
363
367
  })
364
368
 
@@ -382,7 +386,7 @@ const router = new Router()
382
386
  app.use(bodyParser())
383
387
 
384
388
  const handler = createServe(koaAdapter)({ mastra, inngest })
385
- router.all('/api/inngest', handler)
389
+ router.all('/inngest/api', handler)
386
390
 
387
391
  app.use(router.routes())
388
392
  app.use(router.allowedMethods())
@@ -406,6 +410,33 @@ export { handler as GET, handler as POST, handler as PUT }
406
410
 
407
411
  The `createServe` function works with any Inngest adapter. See the [Inngest serve documentation](https://www.inngest.com/docs/reference/serve) for a complete list of available adapters including AWS Lambda, Cloudflare Workers, and more.
408
412
 
413
+ ## Using a custom `apiPrefix`
414
+
415
+ If you need to keep `/api/inngest` (for example to match Inngest's auto-discover convention without changing the dashboard URL), set `server.apiPrefix` to relocate Mastra's built-in routes:
416
+
417
+ ```ts
418
+ import { Mastra } from '@mastra/core'
419
+ import { serve } from '@mastra/inngest'
420
+ import { inngest } from './inngest'
421
+
422
+ export const mastra = new Mastra({
423
+ server: {
424
+ apiPrefix: '/_mastra',
425
+ apiRoutes: [
426
+ {
427
+ path: '/api/inngest',
428
+ method: 'ALL',
429
+ createHandler: async ({ mastra }) => serve({ mastra, inngest }),
430
+ },
431
+ ],
432
+ },
433
+ })
434
+ ```
435
+
436
+ Mastra's built-in routes now resolve under `/_mastra/agents`, `/_mastra/workflows`, and so on, freeing the `/api/inngest` path for your custom route.
437
+
438
+ > **Warning:** The default auth configuration protects `/api/*` and treats `/api`, `/api/auth/*` as public. When you change `apiPrefix`, those defaults no longer match and built-in routes fall outside the protected pattern. Update `server.auth.protected` and `server.auth.public` to reference the new prefix, and update any client code (including [`MastraClient`](https://mastra.ai/docs/server/mastra-client) `apiPrefix`) that hits `/api/*`.
439
+
409
440
  ## Flow control
410
441
 
411
442
  Inngest workflows support flow control features including concurrency limits, rate limiting, throttling, debouncing, and priority queuing. These options are configured in the `createWorkflow()` call and help manage workflow execution at scale.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.1.35-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ac47842`](https://github.com/mastra-ai/mastra/commit/ac478427aa7a5f5fdaed633a911218689b438c60)]:
8
+ - @mastra/core@1.33.0-alpha.0
9
+
3
10
  ## 1.1.34
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.35-alpha.0",
3
+ "version": "1.1.35-alpha.2",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "jsdom": "^26.1.0",
30
30
  "local-pkg": "^1.1.2",
31
31
  "zod": "^4.3.6",
32
- "@mastra/core": "1.32.1",
32
+ "@mastra/core": "1.33.0-alpha.0",
33
33
  "@mastra/mcp": "^1.7.0"
34
34
  },
35
35
  "devDependencies": {
@@ -48,7 +48,7 @@
48
48
  "vitest": "4.1.5",
49
49
  "@internal/lint": "0.0.92",
50
50
  "@internal/types-builder": "0.0.67",
51
- "@mastra/core": "1.32.1"
51
+ "@mastra/core": "1.33.0-alpha.0"
52
52
  },
53
53
  "homepage": "https://mastra.ai",
54
54
  "repository": {