promptgarten ๐ŸŒฑ

Command reference ยท Cursor CLI

agent mcp enable <identifier>

Adds an MCP server to the locally approved list.

agent mcp enable <identifier> is a subcommand from the "agent mcp" category (MCP server management) and, according to the Cursor docs, permanently adds an already configured MCP server to the locally approved list, so it loads in future without another approval prompt. <identifier> refers to a server that was previously entered in a .cursor/mcp.json (project) or ~/.cursor/mcp.json (global). Sibling subcommands are agent mcp list (shows configured servers and their status), agent mcp list-tools <identifier> (shows a server's available tools), agent mcp login <identifier> (authenticates against a server), and agent mcp disable <identifier> as the counterpart to enable. According to the changelog, an enable/disable also takes immediate effect on the available tools from within a running session (via /mcp), with no restart needed.

โœ… WHEN TO USE IT?

Permanently approve an already trusted server

agent mcp enable github

Check which servers are even configured before approving

Run agent mcp list, note the relevant identifier, then call agent mcp enable <identifier>

โ›” WHEN NOT TO?

Approve all configured servers at once for a single script run

agent mcp enable only takes effect per server and permanently, not for a single run.

Better: Set --approve-mcps as a global flag on the respective agent call, e.g. agent --approve-mcps "..."

The server isn't entered in an mcp.json yet

enable only unlocks already configured servers, it doesn't create a new server.

Better: First enter the server in .cursor/mcp.json or ~/.cursor/mcp.json, then use agent mcp enable

SOURCES

MORE COMMANDS ยท Cursor CLI

agent mcp disable <identifier>agent sandbox enableagent sandbox disableagent sandbox resetagent sandbox run <cmd> [args...]agent sandbox help [command]agent worker startagent worker debugagent worker help [command]agent bedrockGlobal Options (Flags)/opus

All commands ยท Cursor CLI โ†’

Share:๐•in๐Ÿ’ฌ