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.
At a glance
Section titled “At a glance”| Artifact | Global | Per-project | Format |
|---|---|---|---|
| Rules | User Rules (in-app settings, not a file) | .cursor/rules/**/*.mdc | MDC (Markdown + frontmatter) |
| Legacy rules | — | .cursorrules (project root) | plain text/Markdown |
| Cross-tool rules | — | AGENTS.md (project root and nested) | Markdown |
| Skills | ~/.cursor/skills/<name>/SKILL.md | .cursor/skills/<name>/SKILL.md | Markdown + YAML frontmatter |
| Commands | ~/.cursor/commands/*.md | .cursor/commands/*.md | Markdown |
| MCP servers | ~/.cursor/mcp.json | .cursor/mcp.json | JSON |
Project rules: .cursor/rules/*.mdc
Section titled “Project rules: .cursor/rules/*.mdc”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 hereglobs: ["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.descriptiononly → 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.
The legacy .cursorrules file
Section titled “The legacy .cursorrules file”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.
AGENTS.md
Section titled “AGENTS.md”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.
Skills
Section titled “Skills”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.
Commands
Section titled “Commands”Reusable slash-style commands are Markdown files in .cursor/commands/
(project) or ~/.cursor/commands/ (global) — the filename becomes the command
name.
MCP servers
Section titled “MCP servers”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.
Seeing all of it at once
Section titled “Seeing all of it at once”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.