-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Error starting github: CodeExpectedError: Variable 'github_token' #245707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which settings.json is that in? Workspace/remote/user? |
I'm experiencing the same issue. It's the user settings. |
UPDATE: it has resolved itself by restarting vscode. Then vscode asked me for the github token. |
This works for me in my user settings in the latest Insiders. @toby can you confirm what you're seeing / if you still repro? Kapture.2025-04-07.at.09.31.27.mp4 |
I know on user settings.json on windows (worked perfect on macOS) for 1.99.0 I still can't get inputs recognized. I also tried the reload of vscode and no change. |
@byjrack please share your config and its path |
Not a problem
|
Can you confirm the version of VS Code you're using? |
Can't grab the whole version, but 1.99.0 a fresh upgrade of stable. And the Chat extension was latest as well. ammended w complete version info Version: 1.99.0 (user setup) |
Thanks! Can you see if this repro's for you on Insiders? This seems to be fixed there.. |
So need to try a different MCP server in this case, but Insiders didn't seem to allow for I did create a
|
+1
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "github_token",
"description": "GitHub Personal Access Token",
"password": true
}
],
"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}"
}
}
}
}
} After running into this, I uninstalled vscode insiders, and deleted the following folder: EDIT: |
AHA! Not sure if this is everyone's experience, but I was trying to launch the MCP server without an open workspace/folder. Repro:
Results: 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. |
And used stable 1.99.2 and can confirm the same experience. I had just been testing w Files opened before when the error was firing. Selected "Open Folder" and the input popped w/o any issues. So guessing there is an unhandled case where folder/workspace is not in scope. |
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:
My version:
The text was updated successfully, but these errors were encountered: