# Secure secret handing for MCPs

**URL:** <https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638>\
**Category:** Help\
**Tags:** mcp, security\
**Created:** [March 23, 2026, 1:58pm UTC](https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638 "2026-03-23T13:58:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piotr\_Olchawa](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@Piotr\_Olchawa](https://forum.cursor.com/u/Piotr_Olchawa)\
**Post date:** [March 23, 2026, 1:58pm UTC](https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638/1 "2026-03-23T13:58:09Z")

</div>

Hey,

Trying to prepare secure config for the [official Github MCP server](https://github.com/github/github-mcp-server), the remote version (HTTP). Infosec asked me to find a way where we would not paste secrets into `mcp.json` file. VSCode has the function to pass `inputs`

```auto
  "inputs": [
    {
      "type": "promptString",
      "id": "github_mcp_pat",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ]

```

[source](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration#_input-variables-for-sensitive-data)

I tried that with Cursor, no luck. Any ideas how to make it work?

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [March 24, 2026, 8:04am UTC](https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638/4 "2026-03-24T08:04:27Z")

</div>

Hi @Piotr_Olchawa,

The `inputs` feature from VS Code’s `launch.json`/`tasks.json` isn’t supported in Cursor’s `mcp.json` format. Specifically, if you add an `inputs` array to `mcp.json`, it won’t cause an error, but it will be silently ignored – the parser only reads `mcpServers` and discards everything else. Similarly, `${input:...}` variable references in your server config values won’t be resolved.

For your use case (keeping a GitHub PAT out of plaintext config), here are two approaches that work today:

Option 1: Environment variable interpolation (recommended)

Store your token in an environment variable and reference it in your config:

```auto
{
"mcpServers": {
"github": {

"url": "https://api.githubcopilot.com/mcp/",

"headers": {
"Authorization": "Bearer ${env:GITHUB_TOKEN}"
}
}
}
}

```

Then set `GITHUB_TOKEN` in your shell profile (`.zshrc`, `.bashrc`, etc.) or use a secrets manager to inject it into your environment. This keeps the token out of version-controlled files. Cursor resolves `${env:...}` variables at startup.

More details: [Config Interpolation](https://cursor.com/docs/mcp#config-interpolation)

Option 2: OAuth authentication

If you’d prefer not to manage a PAT at all, Cursor supports OAuth for remote MCP servers. If the GitHub MCP remote server supports the MCP OAuth flow, you can configure it with just the URL and let Cursor handle the authentication interactively. You may need to register a GitHub OAuth App and provide the `CLIENT_ID` (which is public, not a secret) in the config:

```auto
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/", 
"auth": {
"CLIENT_ID": "your_github_oauth_app_client_id"
}
}
}
}

```

For STDIO-based servers, there’s also the `envFile` option, which loads environment variables from a `.env` file:

```auto
{
"mcpServers": {
"my-server": {
"command": "my-mcp-server",
"envFile": "${workspaceFolder}/.env"
}
}
}

```

Just make sure to add `.env` to your `.gitignore`.

---

<div class="post-metadata">

**Author:** ![Piotr\_Olchawa](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@Piotr\_Olchawa](https://forum.cursor.com/u/Piotr_Olchawa)\
**Post date:** [April 15, 2026, 11:47am UTC](https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638/6 "2026-04-15T11:47:53Z")

</div>

Thank you, Mohit. Do you know it if there are any plans to support `input` in Cursor’s MCP config?

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [April 16, 2026, 5:20am UTC](https://forum.cursor.com/t/secure-secret-handing-for-mcps/155638/7 "2026-04-16T05:20:56Z")

</div>

The `inputs` / `promptString` feature isn’t currently supported in Cursor’s `mcp.json` format, and I don’t have a timeline to share on that. For now, environment variable interpolation (`${env:...}`) and OAuth authentication for remote servers remain the recommended approaches for keeping secrets out of your config.
