Cursor IDE Setup
Complete guide to configuring Cursor for optimal AI-assisted development.
Cursor rules/skills for this repo are already set up. Daily workflow and / slash playbooks: AI Development Workflow (Cursor-first; Claude Code uses root AGENTS.md). How skills are versioned and updated: Cursor Skills. Do the steps below once.
Step 1: Add Documentation Sites
Cursor can index external docs (Fastify, Next.js, Viem, …) under Settings → Indexing & Docs. Indexed docs are advisory; repository rules and source win. Add:
- 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) - 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 MCP (names are historical; they map to
apps/docu,apps/api,apps/web)
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