How to use Cursor

AI-first code editor. Below: 3 workflows, each with the steps and prompt.

Cursor MCP: connect your first MCP servers

Create a .cursor/mcp.json in the project (or use Cursor Settings > MCP), add each server as a command-plus-args entry, restart Cursor and wait for the tools to show as connected. Start with a read-only server, approve tools one by one, and put secrets in environment variables, never in the JSON. Share the file via git so the team gets the same setup.

  1. Open the MCP settings
  2. Add a read-only server first
  3. Confirm the tools appear
  4. Smoke-test with a harmless call
  5. Gate write tools
  6. Commit the project config

Cursor rules: a .cursor/rules setup that keeps the agent consistent in your repo

Create .cursor/rules/ in your repo with a few short .mdc rule files: one always-applied core rule (stack, commands, conventions), scoped rules attached to file globs (e.g. **/*.tsx for UI conventions), and agent-requested rules for rare tasks like migrations. Keep each rule short and concrete, commit them, and test with a prompt that would break a rule if it weren't loaded.

  1. Collect what you keep repeating
  2. Create the core rule
  3. Add scoped rules
  4. Add on-demand rules
  5. Test that rules load
  6. Commit and maintain

Playwright MCP: set it up and have Claude Code test your web app

Add Microsoft's Playwright MCP server to your agent (for Claude Code: claude mcp add playwright npx @playwright/mcp@latest), point it at a local or staging URL, and ask it to walk a user flow step by step. It drives a real browser through accessibility snapshots, reports what broke, and can then write a regular Playwright test so the check runs in CI without the agent.

  1. Add the server to your agent
  2. Choose headed or headless
  3. Start your app and write the flow down
  4. Ask for a walkthrough, not a fix
  5. Check the evidence
  6. Fix, then re-run the same flow
  7. Turn it into a real test

Cursor: pricing, features and all use cases