Mcp.json config-interpolation

Describe the Bug

I saw in the docs config-interpolation (Model Context Protocol (MCP) | Cursor Docs) but I cannot seem to get an env variable from my ~/.zshrc to get picked the interpollation, replacing the variable with my actual PAT works, and echoing that env variable also results in the expected PAT, any wisdom here would be appreciated.

Steps to Reproduce

mcp.json

  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${env:GH_PAT}"
      }
    },
    "test-server": {
      "url": "http://localhost:3001/echo",
      "headers": {
        "Authorization": "Bearer ${env:GH_PAT}"
      }
    }
  }
}

### Expected Behavior
the pat should be parsed and used in the request.

### Screenshots / Screen Recordings
![server.png|1526x664](upload://fNhPFsuxFYAIuWQB9PsOfpkaMMt.png)

### Operating System
MacOS

### Current Cursor Version (Menu -> About Cursor -> Copy)
Version: 1.7.28
VSCode Version: 1.99.3
Commit: adb0f9e3e4f184bba7f3fa6dbfd72ad0ebb8cfd0
Date: 2025-10-01T02:45:21.769Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0







### Does this stop you from using Cursor
No - Cursor works, but with this issue
2 Likes

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.