Cursor
EditorAnysphere
The AI code editor. Agent, Tab, and Inline Edit backed by frontier models.
MCP
SupportedConfigure MCP servers via mcp.json. Supports stdio, SSE, and Streamable HTTP, with OAuth and config interpolation.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cursor/mcp.json | Project | json | mcpServers |
~/.cursor/mcp.json | Global | json | mcpServers |
Fields
| Field | Type | Description |
|---|---|---|
type | "stdio" | Server connection type for local command servers. |
command | string | Command to start a stdio server executable (e.g. npx, node, python, docker). |
args | string[] | Arguments passed to the command. |
env | record<string, string> | Environment variables for the server. Supports ${env:NAME} interpolation. |
envFile | string | Path to an environment file to load (stdio servers only). |
url | string | Endpoint URL for a remote HTTP or SSE server. |
headers | record<string, string> | HTTP headers for remote servers (e.g. Authorization). |
auth | { CLIENT_ID: string, CLIENT_SECRET?: string, scopes?: string[] } | Static OAuth client credentials for remote servers. |
Capabilities
Examples
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "mcp-server"],
"env": { "API_KEY": "value" }
}
}
}{
"mcpServers": {
"server-name": {
"url": "http://localhost:3000/mcp",
"headers": { "API_KEY": "value" }
}
}
}Skills
SupportedSKILL.md skills loaded from .cursor/skills and .agents/skills, invoked with / or @. Also reads Claude and Codex skill dirs.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cursor/skills/<name>/SKILL.md | Project | markdown | — |
.agents/skills/<name>/SKILL.mdShared agent-skills directory (cross-tool standard). | Project | markdown | — |
~/.cursor/skills/<name>/SKILL.md | Global | markdown | — |
~/.agents/skills/<name>/SKILL.md | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
name | string | Skill name. Defaults to the containing folder name. |
description | string | What the skill does; helps Agent decide when to load it. |
paths | string | string[] | Glob patterns that scope the skill to matching files. |
Examples
---
name: react-component-patterns
description: Conventions for writing React components.
paths:
- "**/*.tsx"
---
# React component patterns
...- •For compatibility, Cursor also loads skills from .claude/skills, .codex/skills, ~/.claude/skills, and ~/.codex/skills.
- •Skills in nested project dirs (e.g. apps/web/.cursor/skills/) are scoped to files in that dir.
Rules
SupportedProject rules as .mdc files with frontmatter, plus plain-markdown AGENTS.md (root and nested).
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cursor/rules/*.mdcVersion-controlled, scoped via path patterns. Organize in subfolders. | Project | mdc | — |
AGENTS.mdPlain-markdown instructions in project root and any subdirectory (nested). | Project | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
description | string | When set with alwaysApply false, Agent pulls the rule in when relevant. |
globs | string | Comma-separated glob patterns; auto-attaches the rule for matching files. |
alwaysApply | boolean | When true, the rule is included in every chat session. |
Examples
---
alwaysApply: true
---
- All source files must include the company copyright header
- Never modify generated files in dist/ or build/Hooks
Supportedhooks.json defines scripts that observe, block, or modify the agent loop. Command and prompt hook types. Claude Code hook compatible.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cursor/hooks.json | Project | json | hooks |
~/.cursor/hooks.json | Global | json | hooks |
/Library/Application Support/Cursor/hooks.jsonmacOS MDM path. Linux/WSL: /etc/cursor/hooks.json; Windows: C:\ProgramData\Cursor\hooks.json. | Enterprise | json | hooks |
Fields
| Field | Type | Description |
|---|---|---|
version* | number | Config schema version (currently 1). |
command* | string | Script path or shell command (for command hooks). |
type | "command" | "prompt" | Hook execution type. Defaults to command. |
timeout | number | Execution timeout in seconds. |
loop_limit | number | null | Per-script loop limit for stop/subagentStop hooks. Default 5 for Cursor. |
failClosed | boolean | When true, hook failures block the action instead of failing open. |
matcher | string | Filter criteria (tool name, subagent type, or command pattern) for when the hook runs. |
Examples
{
"version": 1,
"hooks": {
"afterFileEdit": [{ "command": ".cursor/hooks/format.sh" }]
}
}Commands
DeprecatedCursor merged slash commands into Skills. Existing user- and workspace-level commands can be converted with /migrate-to-skills; author new workflows as Skills.
- •Both user-level and workspace-level commands are convertible to skills (Cursor 2.4+).
- •Use the Skills surface for new reusable workflows.
Settings
PartialMost settings live in the Cursor Settings UI. permissions.json controls Run Mode allowlists (MCP tools, terminal commands) and steers the Auto-review classifier.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cursor/permissions.jsonApplies to one project directory. Commit it to share guidance with the team. | Project | json | — |
~/.cursor/permissions.jsonApplies to all project directories on the machine. | Global | json | — |
Fields
| Field | Type | Description |
|---|---|---|
mcpAllowlist | string[] | MCP tools that run without approval, as server:tool patterns (wildcards supported, e.g. *:search). Overrides the in-app MCP allowlist when set. |
terminalAllowlist | string[] | Terminal commands that run without approval. Overrides the in-app terminal allowlist when set. |
autoRun | { allow_instructions?: string[], block_instructions?: string[] } | Natural-language guidance for the Auto-review classifier: actions to lean toward allowing or blocking. |
- •permissions.json only takes effect when a Run Mode is enabled in Cursor Settings (Auto-review, Allowlist, or Run Everything).
- •When a key is defined in permissions.json it overrides the corresponding in-app allowlist, which becomes read-only.
- •Arrays from the global and project files are concatenated before being applied.
- •autoRun instructions steer the Auto-review classifier; they have no effect in Allowlist or Run Everything modes.