`agent -p` is not able to use MCP servers

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Running agent -p is failling to use MCP servers.
MCP servers are correctly configured as it sometimes succeed to use them.
It fails very often in CI context, but can be reproduced locally.

Steps to Reproduce

Configure MCP servers.
Run a agent -p prompt requiring use of MCP servers.
Agent fails to use MCPs arguing the tools are not availanble.

Expected Behavior

It works.

Operating System

Linux

Version Information

2026.04.17-787b533

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey there @Laurent_Charlois

Thanks for the report! I believe this is quite a recent regression! We have an open bug ticket tracking reports of this, along with a few other forum threads.

We’ll update these threads when a fix is available.