You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensure MCP server names are validated, improve detection of errors due to invalid MCP server names #110
PS C:\Users\satem> copilot -p "hello world"
\× Model call failed: "400 400 Bad Request\n"
\× Model call failed: "400 400 Bad Request\n"
× Model call failed: "400 400 Bad Request\n"
× Model call failed: "400 400 Bad Request\n"
× Model call failed: "400 400 Bad Request\n"
× Model call failed: "400 400 Bad Request\n"
× Execution failed: Failed to get response from the AI model; retried 5 times (total retry wait
time: 90.0143845786254 seconds)
PS C:\Users\satem>
@jazzbearz you are God sent. Yes MCP names with space caused the problem. I fixed it and it worked. see below:
Welcome to GitHub Copilot CLI
Version 0.0.331 · Commit eb0ae04
Copilot can write, test and debug code right from your terminal. Describe a
task to get started or enter ?for help. Copilot uses AI, check for mistakes.
Windows support is experimental. If you encounter issues, consider running
Copilot inside Windows Subsystem for Linux (WSL). Please report any issues
using /feedback.
● Logged in as user: ...
● Configured MCP servers: Chrome DevTools
● Connected to GitHub MCP Server
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > hello │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
× Model call failed: "400 400 Bad Request\n"
× Model call failed: "400 400 Bad Request\n"
● Operation cancelled by user
● MCP configuration saved successfully! Changes will take effect immediately.
● Configured MCP servers: ChromeDevTools
● Connected to GitHub MCP Server
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > hello │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
● Hello! 👋 I'm GitHub Copilot CLI,
Outside of improving the /mcp add and /mcp edit commands to validate server name doesn't contain spaces, I'm going to see if we can improve detecting errors raised being due to the server name in cases where people modify their MCP configuration.
changed the title [-]Model call failed: "400 400 Bad Request\n"[/-][+]Ensure MCP server names are validated, improve detection of errors due to invalid MCP server names[/+]on Oct 8, 2025
I'd be grateful for any help examining your local logs for any additional insights into errors or what else might have arose to indicate why it was failing if name only contained a-zA-Z0-9_-. Also, any request IDs you'd share. 🤔
Activity
yanskun commentedon Sep 29, 2025
I had the same problem, but updating to the latest version fixed it.
Try running
yanskun commentedon Sep 29, 2025
I'm sorry.
After communicating with copilot several times, the problem recurred,
so it seems the above alone is not enough.
kukirokuk commentedon Oct 1, 2025
same stuff
jazzbearz commentedon Oct 1, 2025
For me, mcp name with a space caused the problem. Fixed by removing the space.
ekolawole commentedon Oct 1, 2025
@jazzbearz you are God sent. Yes MCP names with space caused the problem. I fixed it and it worked. see below:
andyfeller commentedon Oct 7, 2025
@ekolawole @yanskun @kukirokuk @jazzbearz : first, thank you all for opening helping one another understand the problem and arriving at a workaround! 🫶 🙇
Outside of improving the
/mcp addand/mcp editcommands to validate server name doesn't contain spaces, I'm going to see if we can improve detecting errors raised being due to the server name in cases where people modify their MCP configuration.[-]Model call failed: "400 400 Bad Request\n"[/-][+]Ensure MCP server names are validated, improve detection of errors due to invalid MCP server names[/+]yanskun commentedon Oct 8, 2025
@andyfeller
Thank you for letting us know that there seems to be a problem with the naming of the MCP Server.
I'm not sure if this will help, but I thought I'd share.
My MCP Server name didn't appear to have spaces.
Also,
after getting 400,
you can exit the session,
then use
copilot --continueto open the same prompt and it will be successful.andyfeller commentedon Oct 8, 2025
That is verify interesting; thank you, @yanskun 🙇
I'd be grateful for any help examining your local logs for any additional insights into errors or what else might have arose to indicate why it was failing if name only contained
a-zA-Z0-9_-. Also, any request IDs you'd share. 🤔RyanHecht commentedon Oct 8, 2025
This has shipped in 0.0.337! http://github.com/github/copilot-cli/releases/tag/v0.0.337