copilot cli fails to read config from working directory which isn't a repo root
Describe the bug
I've got a project which is not a monorepo, but instead has several repos in a workspace directory which itself isn't a git repo.
The copilot cli harness in this case fails to read .mcp.json or hook files (and probably other config I've not tested) which is in the project directory.
Creating an empty git repo at the root fixes this, but this shouldn't be necessary.
For reference to similar harnesses, Claude CLI reads workspace level files.
Affected version
No response
Steps to reproduce the behavior
Create a directory containing a simple .mcp.json.
Within this create a git repo.
Launch copilot cli from the directory.
Expected behavior
Copilot reads config files such as .mcp.json and files in .github.
Additional context
Windows
Note that the behaviour doesn't quite match what the docs say:
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers
This says: "When you start Copilot CLI inside a Git repository, the CLI walks from your current working directory up to the repository root, loading MCP configuration files along the way."
Though it doesn't say exactly what happens if you are not in a repo, this does sort of imply that it should be reading the files from the working directory.
Hello! Can you give it a try with the newly released 1.0.85 version of the Copilot CLI? It includes some fixes that address .mcp.json loading behavior. The workspace must be trusted through for it to work (either tmp in a session opened by the CLI or permanently to use CLI commands without launching the interactive TUI).
Let me know what you find!
Hello! Can you give it a try with the newly released 1.0.85 version of the Copilot CLI? It includes some fixes that address
.mcp.jsonloading behavior. The workspace must be trusted through for it to work (either tmp in a session opened by the CLI or permanently to use CLI commands without launching the interactive TUI).Let me know what you find!
From a quick test, it looks like it does work. Thanks!
Feel free to close the issue to mark this as being done!
This does seem to be fixed now (thanks all), so will close.
مننون
Describe the bug
I've got a project which is not a monorepo, but instead has several repos in a workspace directory which itself isn't a git repo.
The copilot cli harness in this case fails to read .mcp.json or hook files (and probably other config I've not tested) which is in the project directory.
Creating an empty git repo at the root fixes this, but this shouldn't be necessary.
For reference to similar harnesses, Claude CLI reads workspace level files.
Affected version
No response
Steps to reproduce the behavior
Create a directory containing a simple .mcp.json.
Within this create a git repo.
Launch copilot cli from the directory.
Expected behavior
Copilot reads config files such as .mcp.json and files in .github.
Additional context
Windows
Describe the bug
I've got a project which is not a monorepo, but instead has several repos in a workspace directory which itself isn't a git repo.
The copilot cli harness in this case fails to read .mcp.json or hook files (and probably other config I've not tested) which is in the project directory.
Creating an empty git repo at the root fixes this, but this shouldn't be necessary.
For reference to similar harnesses, Claude CLI reads workspace level files.
Affected version
No response
Steps to reproduce the behavior
Create a directory containing a simple .mcp.json.
Within this create a git repo.
Launch copilot cli from the directory.
Expected behavior
Copilot reads config files such as .mcp.json and files in .github.
Additional context
Windows