mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-16 21:08:38 +08:00
## 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 --> |
||
|---|---|---|
| .. | ||
| __snapshots__ | ||
| auth | ||
| contact-channels | ||
| emails | ||
| integrations | ||
| internal | ||
| payments | ||
| ai-query.test.ts | ||
| analytics-config.test.ts | ||
| analytics-events-batch.test.ts | ||
| analytics-events.test.ts | ||
| analytics-query.test.ts | ||
| api-keys.test.ts | ||
| auth-flows.test.ts | ||
| check-feature-support.test.ts | ||
| connected-accounts.test.ts | ||
| data-vault.test.ts | ||
| email-themes.test.ts | ||
| external-db-sync-advanced.test.ts | ||
| external-db-sync-basics.test.ts | ||
| external-db-sync-high-volume.test.ts | ||
| external-db-sync-race.test.ts | ||
| external-db-sync-utils.ts | ||
| index.test.ts | ||
| internal-metrics.test.ts | ||
| notification-preferences.test.ts | ||
| oauth-providers.test.ts | ||
| project-permission-definitions.test.ts | ||
| project-permissions.test.ts | ||
| projects.test.ts | ||
| render-email.test.ts | ||
| restricted-users.test.ts | ||
| risk-scores.test.ts | ||
| send-email.test.ts | ||
| session-replays.test.ts | ||
| stripe-webhooks.test.ts | ||
| team-invitations.test.ts | ||
| team-member-profiles.test.ts | ||
| team-memberships.test.ts | ||
| team-permission-definitions.test.ts | ||
| team-permissions.test.ts | ||
| teams.test.ts | ||
| token-refresh-events.test.ts | ||
| unsubscribe-link.test.ts | ||
| users-primary-email.test.ts | ||
| users.test.ts | ||