Bug
When passing type: "http" (or type: "sse") MCP servers via the mcp_servers parameter in create_session(), the CLI subprocess silently ignores them. Only stdio/local type servers are connected.
No error is raised — the HTTP servers simply don't appear as tools.
The same HTTP MCP servers work correctly in interactive CLI mode (where the CLI reads ~/.copilot/mcp-config.json directly) and via enableConfigDiscovery=True.
Versions
- Python SDK:
github-copilot-sdk 0.2.2
- CLI:
GitHub Copilot CLI 1.0.32-1
- Python: 3.14.0
- OS: Windows 11
Expected Behavior
HTTP MCP servers passed via mcp_servers should be connected and their tools made available to the model, matching the behavior documented in
mcp.md.
Actual Behavior
HTTP MCP servers are silently ignored. The model only sees CLI built-in tools. No error or warning is raised.
Repro Code
import asyncio
from copilot import CopilotClient
from copilot.session import PermissionHandler
async def main():
client = CopilotClient()
await client.start()
session = await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
mcp_servers={
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"tools": ["*"],
},
},
)
response = await session.send_and_wait(
"List every tool name you have access to. Output ONLY a comma-separated list.",
timeout=120.0,
)
print(response.data.content)
# Output: powershell, write_powershell, read_powershell, stop_powershell,
# list_powershell, view, create, edit, web_fetch, report_intent,
# show_file, skill, sql, task, read_agent, list_agents, write_agent, grep, glob
# ^^^ No github MCP tools appear
await client.stop()
asyncio.run(main())
What We Tested
| Approach |
Result |
mcp_servers with type: "http" |
❌ Silently ignored, 0 MCP tools |
mcp_servers with type: "sse" |
❌ Silently ignored, 0 MCP tools |
mcp_servers with stdio server |
✅ Works correctly |
enableConfigDiscovery=True (same HTTP servers in global config) |
✅ HTTP servers load, tools appear |
| Interactive CLI (reads config directly) |
✅ HTTP servers work |
Additional Context
enableConfigDiscovery=True proves the CLI CAN connect to HTTP MCP servers — it just doesn't when they're passed via the SDK's mcp_servers RPC parameter.
- The SDK correctly serializes HTTP server configs into the
mcpServers payload (verified via logging in client.py line ~1251).
- Tested with multiple HTTP MCP servers (GitHub MCP, ServiceTree, bluebird-mcp) — none work via
mcp_servers.
enableConfigDiscovery is not a viable workaround because it loads ALL servers from global config, easily exceeding the 128 tool limit.
Bug
When passing
type: "http"(ortype: "sse") MCP servers via themcp_serversparameter increate_session(), the CLI subprocess silently ignores them. Onlystdio/localtype servers are connected.No error is raised — the HTTP servers simply don't appear as tools.
The same HTTP MCP servers work correctly in interactive CLI mode (where the CLI reads
~/.copilot/mcp-config.jsondirectly) and viaenableConfigDiscovery=True.Versions
github-copilot-sdk 0.2.2GitHub Copilot CLI 1.0.32-1Expected Behavior
HTTP MCP servers passed via
mcp_serversshould be connected and their tools made available to the model, matching the behavior documented inmcp.md.
Actual Behavior
HTTP MCP servers are silently ignored. The model only sees CLI built-in tools. No error or warning is raised.
Repro Code
What We Tested
mcp_serverswithtype: "http"mcp_serverswithtype: "sse"mcp_serverswith stdio serverenableConfigDiscovery=True(same HTTP servers in global config)Additional Context
enableConfigDiscovery=Trueproves the CLI CAN connect to HTTP MCP servers — it just doesn't when they're passed via the SDK'smcp_serversRPC parameter.mcpServerspayload (verified via logging inclient.pyline ~1251).mcp_servers.enableConfigDiscoveryis not a viable workaround because it loads ALL servers from global config, easily exceeding the 128 tool limit.