Resolve local environment variables in MCP server definitions

I am using cursor-agent cli version 2025.10.22-f894c2.

in mcp.json of the project i define my custom mcp server (stdio) and trying to pass my env variable

```
“custom-mcp”: {
“command”: “custom”,
“args”: [ “mcp”, “start” ],
“env”: {
“INTERNAL_TOKEN”: “${env:INTERNAL_TOKEN}”
}
},
```

while executing tools from this mcp server - token is not passed and I get auth error.

What i am doing wrong?

PS: I’ve tried both “INTERNAL_TOKEN”: “${env:INTERNAL_TOKEN}” and “INTERNAL_TOKEN”: “${INTERNAL_TOKEN}”
Does not work

1 Like