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. 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:

  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 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:

  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