I’m trying to use a custom MongoDB MCP server with Cursor Automations running on a My Machine worker, but the MCP server is not available inside the automation session.
Setup:
Cursor Automation runs on a My Machine worker hosted on EC2.
Worker is online and can run repo commands.
New Relic MCP works in the same automation (HTTP based).
MongoDB MCP is configured in Cursor UI as a custom MCP server.
MongoDB MCP is stdio/command-based using npx.
The EC2 machine has stable Atlas access; Mongo connectivity works from the machine.
This should work! I was able to get the MongoDB MCP server you mentioned running in an Automation on a My Machines worker.
MCP servers have to be configured in the Automation itself, not in a .cursor/mcp.json file. A My Machines automation session only loads the MCP servers listed in the Automation.
You add it under Tools → Add Tool or MCP → MCP Server → + New Connection → MongoDB (the below screenshot shows what it looks like after it has been added). Click on Manage to configure.
stdio MCP servers run on your My Machines worker. So a stdio server (like mongodb-mcp-server via npx) needs node/npx available and the database reachable from the worker machine, while an HTTP server needs to be reachable from Cursor’s backend.
If you run cursor-agent worker start --verbose, you can see logs about which MCP servers are making it to the automation (look for the Loaded session MCP servers line when a run starts).
I have everything set up like that, but the worker is reporting no available MCP servers (both chat thread & server logs using —verbose), and the automation reports the same in the chat thread.
I have verified:
npx & node installed and accessible on the worker machine
Mongo access via the connection string works from the worker machine
I have tried various configurations of the MCP environment variables (interpolating secrets and hardcoding credentials), and all have the same result
Ok, embarrassing honesty. I realised my EC2 instance had limited disc space remaining when I tried and failed to globally install the mcp server. Turns out that was the issue all along.
I’ve increased disc space, and the automation is now successfully dynamically loading the MongoDB MCP server configured in the automation.
Wonder if there’s a possibility of improving verbose logging if something like this fails whilst attempting to dynamically load an MCP server to the worker machine