stack/docs/package.json
Mantra e831972c4c
Move internal MCP server to backend, use Mintlify MCP for docs tools (#1389)
## Summary
- Move the `/api/internal/[transport]` MCP route from the docs app to
the backend, so the public `ask_stack_auth` MCP tool is served from the
same origin as the AI query API it proxies to.
- Replace the bespoke docs-tools HTTP client in
`apps/backend/src/lib/ai/tools/docs.ts` with an `@ai-sdk/mcp` client
that talks to Mintlify's generated MCP server. The backend AI agent now
consumes Mintlify's lower-level search/fetch tools directly instead of
going through the docs app.
- Swap `STACK_DOCS_INTERNAL_BASE_URL` for `STACK_MINTLIFY_MCP_URL`
(defaults to the Mintlify-hosted MCP URL).
- Move the `@vercel/mcp-adapter` dependency from `docs` to
`apps/backend`.

## Test plan
- [ ] `pnpm typecheck`
- [ ] `pnpm lint`
- [ ] e2e: new
`apps/e2e/tests/backend/endpoints/api/v1/internal/mcp.test.ts` covers
`tools/list` and validation on `tools/call`
- [ ] Manual: hit `POST /api/internal/mcp` on the backend and confirm
`ask_stack_auth` is listed and callable
- [ ] Manual: confirm backend AI agent docs tools resolve via the
Mintlify MCP URL

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Backend docs tooling now uses a Mintlify MCP server for documentation
tools and discovery.

* **Chores**
* Development environment variables updated to point to the Mintlify MCP
endpoint.
* Backend dependency added to support MCP integration; docs package
dependency removed.

* **Tests**
* Added end-to-end tests for the internal MCP endpoint and tool
validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-29 09:45:52 -07:00

75 lines
2.2 KiB
JSON

{
"name": "@stackframe/stack-docs",
"version": "2.8.86",
"repository": "https://github.com/stack-auth/stack-auth",
"description": "",
"main": "index.js",
"private": true,
"type": "module",
"scripts": {
"build": "next build",
"dev": "next dev --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}26",
"start": "next start --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}26",
"typecheck": "tsc --noEmit",
"lint": "next lint",
"lint:fix": "next lint --fix",
"postinstall": "fumadocs-mdx",
"generate-openapi-docs": "node scripts/generate-functional-api-docs.mjs",
"clear-docs": "node scripts/clear-docs.js"
},
"dependencies": {
"@ai-sdk/react": "^3.0.0",
"@modelcontextprotocol/sdk": "^1.17.2",
"@phosphor-icons/react": "^2.1.10",
"@radix-ui/react-collapsible": "^1.1.11",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-presence": "^1.1.4",
"@radix-ui/react-scroll-area": "^1.2.9",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.12",
"@stackframe/stack": "workspace:^",
"@stackframe/stack-shared": "workspace:^",
"ai": "^6.0.0",
"class-variance-authority": "^0.7.1",
"fumadocs-core": "15.3.3",
"fumadocs-mdx": "11.6.4",
"fumadocs-openapi": "^8.1.12",
"fumadocs-typescript": "^4.0.5",
"fumadocs-ui": "15.3.3",
"jose": "^6.1.3",
"js-yaml": "^4.1.0",
"lucide-react": "^0.511.0",
"mermaid": "^11.6.0",
"minimatch": "^10.0.1",
"next": "15.5.10",
"next-themes": "^0.4.6",
"posthog-js": "^1.336.1",
"posthog-node": "^4.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-medium-image-zoom": "^5.4.0",
"react-remove-scroll": "^2.7.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-mdx": "^3.1.0",
"shiki": "^3.4.2",
"2027-track": "^0.1.9",
"tailwind-merge": "^3.3.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.7",
"@types/mdx": "^2.0.13",
"@types/node": "22.15.18",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.0",
"eslint": "^8.57.0",
"eslint-config-next": "15.3.2",
"glob": "^11.0.0",
"postcss": "^8.5.3",
"tailwindcss": "^4.1.7",
"typescript": "5.9.3"
},
"packageManager": "pnpm@10.23.0"
}