> rules & mcp

Rules give the agent standing project context; MCP gives it external tools and data. The CLI reads the same .cursor/rules directory as the editor, plus an AGENTS.md or CLAUDE.md at the project root. It also shares the editor's mcp.json, so servers you configure once are available in the terminal, and mcp subcommands manage them.

// rules & mcp

5 commands

// faq

Does the Cursor CLI read AGENTS.md?

Yes. Along with the .cursor/rules directory, the CLI reads an AGENTS.md or CLAUDE.md at the project root and applies it as rules. So instructions you already keep for other agents — build commands, conventions, do-nots — carry over to Cursor with no extra setup.

Where does the CLI look for MCP configuration?

In mcp.json files, resolved in precedence order: project (.cursor/mcp.json), then global (~/.cursor/mcp.json), then nested directories. This mirrors the editor, so the same servers and tools you configured there work in the CLI. Run cursor-agent mcp list to see what is loaded and its connection status.

How do I add an MCP server to the CLI?

Add it to ~/.cursor/mcp.json or .cursor/mcp.json. A stdio server needs command, args, and optional env; an HTTP or SSE server needs a url. Then cursor-agent mcp enable <id> approves it, mcp login <id> authenticates if required, and mcp list-tools <id> shows what it exposes.

How do I stop MCP prompts from blocking a headless run?

Pass --approve-mcps to auto-approve all MCP servers for that run so tool calls do not stall waiting for confirmation. For finer control, add Mcp(server:tool) tokens to permissions.allow, or disable servers you do not need with cursor-agent mcp disable <id>.