Command reference ยท Cursor CLI
agent mcp login <identifier>
Authenticates with an MCP server configured in mcp.json.
agent mcp login <identifier> starts a login flow with automatic callback handling for an MCP server configured in .cursor/mcp.json or ~/.cursor/mcp.json. Once login succeeds, the agent immediately has access to the server's authenticated tools.
โ WHEN TO USE IT?
Make an MCP server with its own authentication (e.g. OAuth) usable for the first time
agent mcp login linear
โ WHEN NOT TO?
The server is already configured but just needs to be approved locally
agent mcp login handles authentication, not approving the server.
Better: Use agent mcp enable <identifier>
SOURCES
- Cursor Docs โ CLI Reference: Parameters โ cursor.com
- Cursor Docs โ CLI MCP โ cursor.com