Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.72 KB

File metadata and controls

46 lines (31 loc) · 1.72 KB

Copilot CLI Setup Guide

This guide explains how to configure Copilot CLI to use the OpenClaude MCP server over stdio.

1. Prerequisites

  1. Node.js 20+ installed on your system.
  2. OpenClaude or Claude Code CLI installed and available in your PATH.
  3. Copilot CLI installed.
  4. This MCP server built locally (npm install && npm run build).

2. Configuration

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.

3. Selecting the Engine

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 claude

You only need to run this command once. The preference is saved in the server's configuration file.

4. Usage

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.