Local MCP server is not working as expected
Describe the bug
Starting with version 0.0.359, locally configured MCP servers are no longer being detected. I am currently using version 0.0.358, which is working correctly. I also recommend adding a command or status check to verify whether the MCP server is actually running. At the moment, the status only shows Configured when it should indicate Connected or Running.
Affected version
0.0.359 and later
Steps to reproduce the behavior
- Configure MCP in
~/.copilot/mcp-config.json
{
"mcpServers": {
"jira": {
"type": "local",
"tools": [
"*"
],
"command": "node",
"args": ["/absolute/path/to/jira_mcp_server/dist/index.js"],
"env": {
"JIRA_HOST": "your-domain.atlassian.net",
"JIRA_EMAIL": "[email protected]",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
- Restart Copilot CLI and enter a prompt.
Expected behavior
It should be able to use the MCP tools.
Additional context
No response
@garylparas The report says 0.0.359 and later but could you confirm the highest version number you've hit this issue with? We did a fix related to this in version 0.0.363.
I don't have a Jira instance to repro this against, but could you try to reproduce this issue with the following MCP server config?
{
"mcpServers": {
"everything": {
"type": "local",
"tools": ["*"],
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-everything"]
}
}
}
This is working for me in the current version (0.0.365):
Note: one possibility is that your MCP server just takes a long time to load and start up. The CLI behaves as if the tools don't exist until it's loaded (because it has no way to know they are going to exist). If this turns out to be the problem we'll have to rethink the UX options.
Hi there.
I've created an MCP recently. It works well with any AI client like Claude Desktop, Claude Code, and OpenCode. But when it comes to using GitHub Copilot CLI, it's impossible to make it work: https://github.com/kud/mcp-jenkins
I've tested via environment variables, via parameters, and via Node directly locally instead of using npx. I've tried all the methods directly in my shell, and it works well, but Copilot is incapable of listing those tools. And I don't see how to debug the output from Copilot.
Any ideas?
"jenkins": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@kud/mcp-jenkins@latest",
"--url=https://pipeline.xxx.io",
"--user=xxx",
"--api-token=xxx"
],
"tools": [
"*"
]
}
It works well if I run it directly to my shell.
@kud Just for clarity, could you try the @modelcontextprotocol/server-everything example I've given above and see if that works for you? I'm trying to distinguish whether for some reason your build of Copilot CLI or your environment means MCP doesn't work at all, or if we have an issue with specific MCP servers (perhaps using an MCP feature we don't yet support).
@SteveSandersonMS
@SteveSandersonMS
If I use for instance opencode
If I use copilot
Some of the MCP servers I use work but not the ones I created, and the ones I've created work on opencode, claude code, claude desktop and directly using npx so I'm questionniong if copilot is stricter about the response of the MCP server?
This is my opencode config:
{
"$schema": "https://opencode.ai/config.json",
"theme": "tokyonight",
"model": "github-copilot/gpt-5.1",
"autoupdate": true,
"mcp": {
"notion": {
"type": "local",
"enabled": true,
"command": [
"mise",
"exec",
"node@latest",
"--",
"npx",
"-y",
"mcp-remote@latest",
"https://mcp.notion.com/mcp"
]
},
"basic-memory": {
"type": "local",
"enabled": true,
"command": [
"uvx",
"basic-memory",
"mcp"
]
},
"context7": {
"type": "remote",
"enabled": true,
"url": "https://mcp.context7.com/mcp"
},
"atlassian": {
"type": "local",
"enabled": true,
"command": [
"mise",
"exec",
"node@latest",
"--",
"npx",
"-y",
"mcp-remote@latest",
"https://mcp.atlassian.com/v1/sse"
]
},
"sentry": {
"type": "local",
"enabled": false,
"command": [
"mise",
"exec",
"node@latest",
"--",
"npx",
"-y",
"mcp-remote@latest",
"https://mcp.sentry.dev/mcp"
]
},
"figma": {
"type": "local",
"enabled": false,
"command": [
"mise",
"exec",
"node@latest",
"--",
"npx",
"-y",
"mcp-remote@latest",
"https://mcp.figma.com/mcp"
]
},
"jenkins": {
"type": "local",
"enabled": true,
"command": [
"npx",
"--yes",
"@kud/mcp-jenkins@latest"
],
"environment": {
"JENKINS_URL": "XXXX",
"JENKINS_USER": "XXXX",
"JENKINS_API_TOKEN": "XXXX"
}
}
}
}
Another test
Local MCP Server (mcp-node-mssql) Configured but Not Connecting/Listing Tools in CLI v0.0.365
Hi team,
I'm running into the same issue: Local MCP server is detected as "Configured" on startup, but it doesn't connect fully, and its tools (e.g., query for MSSQL) aren't exposed or usable. Only GitHub's built-in tools appear in lists. This prevents DB queries via prompts like "run a query using the query tool to test the connection to the db".
Environment Details:
- CLI Version: 0.0.365 (Commit: 76d0881)
- OS: Linux (VS Code Dev Container:
/workspaces/matrixmd-legacy-service) - User: Logged in as CJavierSaldana
- MCP Package:
[email protected](via npx)
CLI Config (~/.copilot/mcp-config.json):
{
"mcpServers": {
"database": {
"type": "local",
"command": "npx",
"tools": [
"*"
],
"args": [
"-y",
"[email protected]"
],
"env": {
"DB_HOST": "legacy-db",
"DB_PORT": "1433",
"DB_USERNAME": "sa",
"DB_PASSWORD": "test",
"DB_DATABASE": "test"
}
}
}
}
Symptoms in CLI Logs:
- Startup:
● Configured MCP servers: databaseand● Connected to GitHub MCP Server /mcp listor tool prompts: Only GitHub tools (e.g.,github-mcp-server-get_commit); no MSSQL tools.- Example response: "I don't have access to an MSSQL MCP server. There is no mssql-mcp-server tool available in my current toolset."
- Fallback: CLI greps project files (e.g.,
appsettings.json,DataAccess.cs) but ignores MCP. - Manual test:
npx -y [email protected]with env vars starts successfully (MCP handshake passes), and DB connects viasqlcmd -S legacy-db -U sa -P P@ssw0rd -Q "SELECT 1". Package and DB are operational.
Works in VSCode Copilot
Same package/DB setup succeeds in VSCode (v1.85+). Prompts like "run a query using the query tool" run query and return results (e.g., SELECT 1 AS ConnectionTest).
VSCode Config (.vscode/mcp.json):
{
"servers": {
"matrixmd-pahsalud": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"DB_HOST": "${input:db_host}",
"DB_PORT": "${input:db_port}",
"DB_USERNAME": "${input:db_username}",
"DB_PASSWORD": "${input:db_password}",
"DB_DATABASE": "${input:db_database}"
},
"type": "stdio"
}
},
"inputs": [
{
"id": "db_host",
"type": "promptString",
"description": "MSSQL Hostname"
},
{
"id": "db_port",
"type": "promptString",
"description": "MSSQL Port"
},
{
"id": "db_username",
"type": "promptString",
"description": "MSSQL Username"
},
{
"id": "db_password",
"type": "promptString",
"description": "MSSQL Password"
},
{
"id": "db_database",
"type": "promptString",
"description": "MSSQL Database Name"
}
]
}
- VSCode output: "Ran
queryCompleted with input: { "query": "SELECT 1 AS ConnectionTest" } The database connection is working."
Workaround: Running CLI from VSCode integrated terminal loads .vscode/mcp.json and works.
using a old version without any change is working
I thought it was because of an issue with ENV config but I've updated my local mcp server to accept parameters and I've got the same issue actually.
It would be nice to be able to have some logs/being able to debug.
I also ran into a similar issue with one of my MCP servers that no longer works as expected starting from version 0.0.359. Certain tools within the MCP server are only made discoverable if the required environment variables for their underlying API calls are set with a non-empty value. Starting from that version, all the tools that are conditionally discoverable based on environment variables were no longer available to Copilot CLI, while the remaining tools that are always loaded continued to be discovered and function (unless they rely on environment variables). I confirmed that there's no issues with the MCP server when all the expected environment variables are set by inspecting the server, as well as trying Copilot IDE and previous Copilot CLI versions that also discovered all the tools. It appears to be a similar scenario to a previous issue that was reported.
The configuration for my mcp-config.json looks like:
{
"mcpServers": {
"mymcp": {
"type": "local",
"command": "C:\\\\Users\\\\MYUSER\\\\.mymcp\\\\my-mcp.exe",
"tools": [
"*"
],
"args": [],
"env": {
"ENV_VAR_REQUIRED_FOR_SOME_TOOLS_TO_LOAD": "SECRET_VALUE"
}
}
}
}
I also ran into a similar issue with one of my MCP servers that no longer works as expected starting from version 0.0.359. Certain tools within the MCP server are only made discoverable if the required environment variables for their underlying API calls are set with a non-empty value. Starting from that version, all the tools that are conditionally discoverable based on environment variables were no longer available to Copilot CLI, while the remaining tools that are always loaded continued to be discovered and work correctly. I confirmed that there's no issue with the underlying MCP server when all the expected environment variables are set by inspecting the server, as well as trying Copilot IDE and previous Copilot CLI versions that also discovered all the tools. It appears to be a similar scenario to a previous issue that was reported.
The configuration for my
mcp-config.jsonlooks like:{ "mcpServers": { "mymcp": { "type": "local", "command": "C:\\\\Users\\\\MYUSER\\\\.mymcp\\\\my-mcp.exe", "tools": [ "*" ], "args": [], "env": { "ENV_VAR_REQUIRED_FOR_SOME_TOOLS_TO_LOAD": "SECRET_VALUE" } } } }
install a previous version. I did that and avoided all problems
npm install -g @github/[email protected]
Thanks! I've been able to reproduce this. We don't yet have a specific ETA for a fix but it's now a known issue that we'll address as soon as we can.
@SteveSandersonMS Out of curiosity, do you have any idea of the issue? What do you recommend in the meantime?
@kud The issue is that we're not passing through environment variables correctly. If you can somehow make your MCP server not require any env vars, then it would work. We are looking into it and hopefully will deal with it quickly.
@SteveSandersonMS It's exactly what I thought about env not being well passed, and that's why I've developed a "parameter" mode where you actually pass the environment variables via parameters in order to avoid using env vars, but it still doesn't work.
https://github.com/kud/mcp-jenkins#-github-copilot-cli