Cursor Custom Plugin MCP cannot access Secret Environment Vars

Where does the bug appear (feature/product)?

Grok Bot

Describe the Bug

Cursor Custom Plugin MCP cannot access Secret Environment Vars. The Gork Plugin fails to start as it cannot access the Secret Environment variables defined.

Sample Custom MCP Plugin:

{
“mcpServers”: {
"my-plugin: {
“command”: “npx”,
“args”: [
“-y”,
“–package”,
“git+https://user:${GITHUB_TOKEN}@github.com/my-org/my-plugin.git”,
“my-plugin”,
“serve”
],
“env”: {
“GITHUB_TOKEN”: “${GITHUB_TOKEN}”,
“MY_KEY”: “${MY_KEY}”
}
}
}
}

Steps to Reproduce

When we configure the custom plugin, The GITHUB_TOKEN defined as Secret in the BOT configuration cannot be accessed when trying to start the plugin.

Expected Behavior

We want the plugin to start and serve the requests.

Operating System

MacOS

Version Information

Version 0.75.8

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @Vinayagam_Rajanbabu,

This setup won’t work as things stand, for two reasons.

The Secrets you add in the bot’s settings only go into the bot’s shell as environment variables. ${VAR} in a plugin’s MCP config isn’t filled from them, so the server gets the placeholder text as is.

Also, on a team bot a Command (stdio) server runs on the computer each conversation uses, teammates’ conversations included. So a Command server that carries secrets (env values, ${...} placeholders, or a token inside a URL) only starts in the bot owner’s own conversations, and it’s skipped when a teammate talks to the bot.

For a team bot connector that needs a token, the supported route is a Remote HTTPS MCP server with the token entered directly in its HTTP headers.

One small thing: the sample JSON is missing the closing quote after my-plugin, so double check that in the real config.