Skip to content

Where Cursor stores rules, skills, commands, and MCP servers

Cursor’s context lives in per-project .cursor/ folders, a global ~/.cursor/ folder, and one legacy file at the project root. ~ is your home directory; paths starting with .cursor/ are relative to a project root.

ArtifactGlobalPer-projectFormat
RulesUser Rules (in-app settings, not a file).cursor/rules/**/*.mdcMDC (Markdown + frontmatter)
Legacy rules.cursorrules (project root)plain text/Markdown
Cross-tool rulesAGENTS.md (project root and nested)Markdown
Skills~/.cursor/skills/<name>/SKILL.md.cursor/skills/<name>/SKILL.mdMarkdown + YAML frontmatter
Commands~/.cursor/commands/*.md.cursor/commands/*.mdMarkdown
MCP servers~/.cursor/mcp.json.cursor/mcp.jsonJSON

The modern rule format is one .mdc file per rule under .cursor/rules/ — Markdown with a small frontmatter block that controls when the rule activates:

---
description: How to write database migrations here
globs: ["db/migrations/**"]
alwaysApply: false
---
Always use the migration helper, never raw SQL files...
  • alwaysApply: true → attached to every request in this project.
  • globs → auto-attached when matching files are in context.
  • description only → the agent decides when it’s relevant.

Subdirectories work: a monorepo can keep packages/api/.cursor/rules/ next to the code those rules govern, and Cursor picks up the nested folder when working there.

A single .cursorrules file at the project root still works but is deprecated in favor of .cursor/rules/. If both exist, you have two sources of truth — worth consolidating, or at least knowing which one a teammate actually edited.

Cursor also reads AGENTS.md from the project root (and nested directories) — the same cross-tool convention Codex uses and Claude Code understands. If you work across several tools, this is the one rules file they all share.

Cursor supports Agent Skills in the same SKILL.md folder convention as Claude Code: a folder per skill containing SKILL.md with name and description frontmatter, under ~/.cursor/skills/ (all projects) or .cursor/skills/ (one project). Skills written for one tool usually run in the other with minor frontmatter differences — which is exactly the kind of copy conversion automates.

Reusable slash-style commands are Markdown files in .cursor/commands/ (project) or ~/.cursor/commands/ (global) — the filename becomes the command name.

MCP server configs are JSON maps of server name → launch spec:

  • Global: ~/.cursor/mcp.json — available in every project.
  • Project: .cursor/mcp.json — committed with the repo.

Entries carry command/args/env for stdio servers or url/headers for HTTP ones. The env and headers blocks are where API keys end up, so treat these files as secret-adjacent even when the rest is shareable.

Quartermaster’s scanner indexes every location on this page — including nested .mdc rules and the legacy .cursorrules — into one searchable registry alongside Claude Code, Codex, and 8 more tools. It can convert a .cursorrules file to CLAUDE.md or AGENTS.md (and back), and flags when the same rule drifted between copies. Secrets are never indexed — env/header key names kept, values dropped. See the full discovery map or the quickstart.