vscode: Error starting github: CodeExpectedError: Variable 'github_token'
Error starting github: CodeExpectedError: Variable ‘github_token’ must be defined in an ‘inputs’ section of the debug or task configuration.
cc @digitarald
Here is my config:
{
"@azure.argTenant": "",
"mcp": {
"servers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
}
}
},
"inputs": [
{
"id": "github_token",
"type": "promptString",
"description": "GitHub Personal Access Token",
"password": true
}
]
},
}
My version:
Version: 1.100.0-insider (Universal)
Commit: c7ea9f8f6c08db68cd63dabe8edfc8555904ee42
Date: 2025-04-04T05:04:35.646Z (12 hrs ago)
Electron: 34.4.1
ElectronBuildId: 11317338
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.3.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- config: allow asking for input even in an empty workspace This behavior dates from when inputs were first added (#63910). I don't think this does much anymore -- if a config is not found in the reque... — committed to microsoft/vscode by connor4312 2 years ago
- config: allow asking for input even in an empty workspace (#246927) * config: allow asking for input even in an empty workspace This behavior dates from when inputs were first added (#63910). I don'... — committed to saschazepter/vscode by connor4312 2 years ago
AHA! Not sure if this is everyone’s experience, but I was trying to launch the MCP server without an open workspace/folder.
Repro:
~/Library/Application Support/Code - Insiders/User/settings.jsonResults:
Error starting github: CodeExpectedError: Variable ‘github_token’ must be defined in an ‘inputs’ section of the debug or task configuration.
Cause:
You have to open a workspace or folder for this to work. This error message is misleading.