This guide explains how to configure Copilot CLI to use the OpenClaude MCP server over stdio.
- Node.js 20+ installed on your system.
- OpenClaude or Claude Code CLI installed and available in your PATH.
- Copilot CLI installed.
- This MCP server built locally (
npm install&&npm run build).
Copilot CLI supports MCP servers through its extension mechanism. You can configure the MCP server by modifying the Copilot CLI configuration file.
Add the following to your configuration:
{
"mcpServers": {
"openclaude-mcp": {
"command": "node",
"args": ["/absolute/path/to/openclaude-gemini-mcp/dist/index.js"],
"transport": "stdio"
}
}
}Note: Replace /absolute/path/to/... with the actual absolute path to where you cloned and built this repository.
By default, the server uses openclaude. If you want to use the official Anthropic claude CLI instead, you must set the engine explicitly:
node /absolute/path/to/openclaude-gemini-mcp/dist/index.js --set-engine claudeYou only need to run this command once. The preference is saved in the server's configuration file.
Once configured, Copilot CLI will automatically detect the tools exposed by the MCP server (e.g., openclaude_run_sync, openclaude_run_async, openclaude_job_status).
When Copilot invokes openclaude_run_async, the underlying Claude process might request permission for destructive actions (like running shell commands). Copilot CLI will be able to poll openclaude_pending_action and use openclaude_approve_action or openclaude_deny_action to bridge these permissions seamlessly.