Basilic
Development

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:

  1. Open Cursor Settings (Cmd/Ctrl + ,)
  2. Go to Indexing & Docs
  3. Add:

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:

  1. Restart Cursor
  2. Cursor Settings → MCP Servers
  3. Confirm servers show Connected

Step 3: Plugins

Recommended extensions are listed in .vscode/extensions.json.

Troubleshooting

MCP Servers Not Connecting

  • Ensure GITHUB_TOKEN is exported in the shell that launched Cursor
  • Fully restart Cursor (not just the window)

CodeRabbit MCP Not Working

If CodeRabbit fails to connect:

  1. Ensure your token scopes are correct (repo / public_repo)
  2. Quick sanity check:
GITHUB_PAT="$GITHUB_TOKEN" pnpm dlx coderabbitai-mcp@latest --help

On this page