How can I use mcp in cursor CLI

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

how to use mcp in cursor-agent -p mode,currentely,I tried to use mcp in cursor-agent -p mode,but it’s always stuck.it seems like I can only use mcp in Cursor IDE,hope to fix this problem in the future,ths a lot!!!

Steps to Reproduce

use cursor-agent -p execute mcp

Expected Behavior

use cursor-agent,execute any MCP with cursor-agent -p

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.43
VSCode Version: 1.105.1
Commit: 32cfbe848b35d9eb320980195985450f244b3030
Date: 2025-12-19T06:06:44.644Z (1 wk ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report.

This is a known limitation. MCP approvals aren’t fully implemented for cursor-agent in non-interactive mode yet.

Try this workaround:

cursor-agent -p "your prompt" --approve-mcps --force

Using --approve-mcps and --force together should fix the hang.

Let me know if it worked.

thks a lot!!! I also want to use hooks in cursor-agent, can you give me some examples.