Having the same issue.
Authorizing Self-Hosted Agent with Personal Cursor API key.
I do have My Secrets populated with proper keys and naming convention is correct. Agent also has instructions about each key in AGENTS.md file as well as team MCPs are configured correctly with ${env:FOO_BAR} keys.
Hi Andrew, and Artur, thanks for the detailed reports, and apologies for the long wait on an answer here.
Short version: you’re not missing a setting. The secrets you add under My Secrets in the Cloud Agents dashboard are injected into Cursor-hosted Cloud Agent environments. A machine you connect with agent worker start (My Machines) works differently: the agent’s terminal commands, file edits, and other tool calls run on your machine, in the environment your machine already has. Cursor doesn’t push dashboard secrets onto personal machines, so there’s nothing in the dashboard or the CLI that will make them appear there today.
The way to get secrets to a My Machines worker is to provide them in the environment of the process that runs agent worker start. Anything the agent runs on that machine inherits it. For example:
export FOO_BAR=...
agent worker start
If the worker runs as a service or in a container, use whatever your platform provides: an EnvironmentFile in a systemd unit, -e or --env-file for Docker, a Kubernetes Secret exposed as env vars, and so on.
Artur, on the MCP side: command-based (stdio) MCP servers do start on your machine, but ${env:FOO_BAR} placeholders in the MCP config are resolved against secrets Cursor injected into the run, not against your machine’s shell environment. On a My Machines worker there are no injected secrets, so those placeholders won’t resolve. Set FOO_BAR in the worker’s environment as above and leave that key out of the MCP server’s env block; on a current CLI the MCP process inherits the worker’s environment. HTTP MCP servers are a separate case: they run on Cursor’s side, so they never see your machine’s environment either way.
One more note for anyone finding this later: Enterprise self-hosted pools do have an opt-in that syncs dashboard secrets to pool workers at run start (a team admin enables Secret sync in the Cloud Agents dashboard, and the worker is started with --sync-dashboard-secrets). That only applies to pool workers, not My Machines. Details are in the Self-Hosted Pool docs ( Pools | Cursor Docs ), and the My Machines docs ( My Machines | Cursor Docs ) cover the personal worker setup.