-
Notifications
You must be signed in to change notification settings - Fork 843
Closed
Labels
bugduplicateThis issue or pull request already existsThis issue or pull request already existssdk/python
Description
I'm developing a web app that use Copilot SDK as a backend AI engine. However, while configuring the MCP server. I'm facing an issue that the environment variables that aren't recognized and passed into the MCP process. It's weird because my MCP server is functioning properly with the native Copilot CLI. I traced the source code and found that Copilot SDK is just passing all the configuration to the Copilot CLI instance through JsonRPC. So, I think there should be either an interface mismatch or Copilot CLI issue.
mcp_servers: dict[str, MCPLocalServerConfig] = {
"gerrit-mcp": {
"type": "local",
"command": "python",
"tools": ["*"],
"args": [
"<path_to_mcp>/mcp-gerrit/src/server.py",
"--log-file",
"./gerrit_mcp.log",
"--log-level",
"DEBUG",
],
"env": {
"GERRIT_URL": "<url>",
"GERRIT_USERNAME": "<user>",
"GERRIT_PASSWORD": "<password>",
}
}
}
client = CopilotClient()
await client.start()
session = await client.create_session(
{"model": "gpt-4.1", "streaming": True, "mcp_servers": mcp_servers}
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugduplicateThis issue or pull request already existsThis issue or pull request already existssdk/python