Cursor IDE Setup
Complete guide to configuring Cursor for optimal AI-assisted development.
Cursor rules/skills for this repo are already set up. Do the steps below once to get the best AI context and tooling.
Step 1: Add Documentation Sites
Cursor can index external documentation sites (Fastify, Next.js, Viem, etc.) by crawling and embedding them as scoped AI reference, separate from your workspace code index and managed via the Cursor settings UI. Cursor re-crawls these sources periodically on its own schedule (not configurable), so the content can change as upstream docs evolve; treat the results as helpful, current guidance for planning, reasoning, and API suggestions, but not as behavioral constraints—repository rules and source code remain the final authority, and indexed docs may conflict with each other or repo conventions.
Add these in Cursor Settings → Indexing & Docs:
- Open Cursor Settings (Cmd/Ctrl + ,)
- Go to Indexing & Docs
- Add:
- Basilic Docs (
https://basilic-docs.vercel.app/docs) - Cursor (
https://docs.cursor.com/) - Next.js (
https://nextjs.org/docs) - Fastify (
https://fastify.dev/docs) - Drizzle ORM (
https://orm.drizzle.team/docs) - TanStack Query (
https://tanstack.com/query/latest/docs) - Fumadocs (
https://fumadocs.dev/docs) - OpenAPI-TS (Hey API) (
https://heyapi.dev/openapi-ts/) - shadcn/ui (
https://ui.shadcn.com/docs) - v0 (
https://vercel.com/docs/v0) - Vercel AI SDK (
https://sdk.vercel.ai/docs) - Viem (
https://viem.sh/docs) - Wagmi (
https://wagmi.sh/react/getting-started) - Ponder (
https://ponder.sh/docs/) - Dynamic (
https://docs.dynamic.xyz/) - Alchemy (
https://docs.alchemy.com/) - React Email (
https://react.email/docs) - ahooks (
https://ahooks.js.org/) - Turborepo (
https://turbo.build/docs) - Biome (
https://biomejs.dev/guides/getting-started/) - ESLint (
https://eslint.org/docs/latest)
- Basilic Docs (
Step 2: Configure MCP Servers
This repo ships an MCP config in .cursor/mcp.json (no edits needed). You only need to provide a GitHub token and restart Cursor.
Included servers:
- GitHub: repo operations
- CodeRabbit: PR/review insights
- shadcnui-official: canonical components
- shadcnui-jpisnice-react: blocks/templates
- shadcnui-jpisnice-react-native: future RN blocks/templates
- next-devtools: Next.js runtime diagnostics (errors, routes, logs) and migration tools
- docu, fastify, next: Vercel project context
next-devtools provides live diagnostics when pnpm dev is running (errors, page metadata, Server Actions). Docs search and migration tools work without a dev server. For richer agent context when working on Next.js, agents can call the init tool at the start of a session.
API key
Set GITHUB_TOKEN (used by GitHub/CodeRabbit and some shadcn MCP tools), then restart Cursor:
export GITHUB_TOKEN="your_github_token_here"Get one here: GitHub Personal Access Tokens (use repo scope for private repos; public_repo for public).
Verify MCP setup
After restart:
- Restart Cursor
- Cursor Settings → MCP Servers
- Confirm servers show Connected
Step 3: Plugins
Recommended extensions are listed in .vscode/extensions.json.
Troubleshooting
MCP Servers Not Connecting
- Ensure
GITHUB_TOKENis exported in the shell that launched Cursor - Fully restart Cursor (not just the window)
CodeRabbit MCP Not Working
If CodeRabbit fails to connect:
- Ensure your token scopes are correct (
repo/public_repo) - Quick sanity check:
GITHUB_PAT="$GITHUB_TOKEN" pnpm dlx coderabbitai-mcp@latest --help