Skip to content

Conversation

@GeekTrainer
Copy link

@GeekTrainer GeekTrainer commented Jan 27, 2026

Description

Add GitHub Copilot CLI as a supported MCP client with auto-configuration support.

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Documentation update

Changes Made

  • Added GitHub Copilot CLI to prerequisites in README.md and README-zh.md
  • Added GitHub Copilot CLI to MCP_CLIENT_CONFIGURATORS.md client lists
  • Created CopilotCliConfigurator.cs for auto-configuration support (config path: ~/.copilot/mcp-config.json)

Testing/Screenshots/Recordings

Configurator follows the same pattern as existing JSON-file configurators (Cursor, VSCode, etc.)

Documentation Updates

  • I have added/removed/modified tools or resources
  • If yes, I have updated all documentation files using:
    • Manual updates following the guide at tools/UPDATE_DOCS.md

Related Issues

N/A

Additional Notes

Config path sourced from official GitHub documentation: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli

Summary by Sourcery

Add GitHub Copilot CLI as a supported MCP client with JSON-file auto-configuration and update docs to list it as a recommended client.

New Features:

  • Introduce CopilotCliConfigurator to auto-configure GitHub Copilot CLI via its mcp-config.json file.

Documentation:

  • Document GitHub Copilot CLI as a supported MCP client in the main README, Chinese README, and MCP client configurators guide.

Summary by CodeRabbit

  • New Features

    • Added support for GitHub Copilot CLI as an MCP client with platform-specific configuration options and detailed setup instructions.
  • Documentation

    • Updated client prerequisites and guides to include GitHub Copilot CLI availability.
    • Extended documentation to multiple language versions.

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 27, 2026

Reviewer's Guide

Adds GitHub Copilot CLI as a first-class, auto-configured MCP client by introducing a dedicated JSON-file configurator and updating the documentation/prerequisite lists to include it alongside other supported MCP clients.

Class diagram for new CopilotCliConfigurator JSON-file client

classDiagram
    class JsonFileMcpConfigurator {
        <<abstract>>
        - McpClient client
        + JsonFileMcpConfigurator(McpClient client)
        + IList~string~ GetInstallationSteps()
    }

    class CopilotCliConfigurator {
        + CopilotCliConfigurator()
        + IList~string~ GetInstallationSteps()
    }

    class McpClient {
        + string name
        + string windowsConfigPath
        + string macConfigPath
        + string linuxConfigPath
    }

    JsonFileMcpConfigurator <|-- CopilotCliConfigurator
    McpClient o-- JsonFileMcpConfigurator

    CopilotCliConfigurator --> McpClient : config
Loading

File-Level Changes

Change Details Files
Introduce a Copilot CLI JSON-file configurator wired into the standard MCP client configuration flow.
  • Add CopilotCliConfigurator class that derives from JsonFileMcpConfigurator.
  • Configure McpClient with GitHub Copilot CLI display name and per-OS config path at ~/.copilot/mcp-config.json using Environment.UserProfile.
  • Override GetInstallationSteps() with CLI-specific setup instructions including installing Copilot CLI and editing mcp-config.json.
MCPForUnity/Editor/Clients/Configurators/CopilotCliConfigurator.cs
Document GitHub Copilot CLI as a supported JSON-file MCP client and prerequisite option.
  • List GitHub Copilot CLI in the typical JSON-file clients section and describe it as using JsonFileMcpConfigurator with standard HTTP transport.
  • Add GitHub Copilot CLI to the MCP client prerequisite list in the main README.
  • Mirror the prerequisite update in the Chinese README to keep localized docs in sync.
docs/guides/MCP_CLIENT_CONFIGURATORS.md
README.md
docs/i18n/README-zh.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

This PR adds GitHub Copilot CLI as a new supported MCP client. A new CopilotCliConfigurator class is introduced that configures Copilot CLI with platform-specific config file paths. Documentation files are updated to reflect this new client option.

Changes

Cohort / File(s) Summary
CopilotCliConfigurator Implementation
MCPForUnity/Editor/Clients/Configurators/CopilotCliConfigurator.cs
Adds new configurator class extending JsonFileMcpConfigurator with platform-specific config paths (Windows, macOS, Linux) pointing to .copilot/mcp-config.json. Includes 4-step installation guide override in GetInstallationSteps().
English Documentation
README.md, docs/guides/MCP_CLIENT_CONFIGURATORS.md
Updates prerequisite and client lists to include GitHub Copilot CLI alongside existing clients (Claude Desktop, Cursor, VS Code Copilot, Windsurf).
Localized Documentation
docs/i18n/README-zh.md
Updates Chinese language documentation to include GitHub Copilot CLI in the client list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • msanatan

Poem

🐰 A new copilot joins the fold,
GitHub's CLI, clever and bold!
Through Windows, Mac, and Linux wide,
Configuration paths align with pride,
One more choice for users to hold! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add GitHub Copilot CLI support' clearly and concisely describes the main change—introducing GitHub Copilot CLI as a supported MCP client.
Description check ✅ Passed The pull request description comprehensively follows the template with all required sections completed: Description, Type of Change, Changes Made, Testing, Documentation Updates (with checkboxes marked), Related Issues, and Additional Notes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In CopilotCliConfigurator, consider factoring the shared Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".copilot", "mcp-config.json") expression into a local variable or helper to avoid repeating the same path logic for each OS field.
  • Double-check whether GitHub Copilot CLI uses the same ~/.copilot/mcp-config.json path on native Windows as on Unix-like systems; if it differs (e.g., uses %APPDATA%), you may want to set a Windows-specific path instead of reusing the user-profile path for all three platforms.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `CopilotCliConfigurator`, consider factoring the shared `Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".copilot", "mcp-config.json")` expression into a local variable or helper to avoid repeating the same path logic for each OS field.
- Double-check whether GitHub Copilot CLI uses the same `~/.copilot/mcp-config.json` path on native Windows as on Unix-like systems; if it differs (e.g., uses `%APPDATA%`), you may want to set a Windows-specific path instead of reusing the user-profile path for all three platforms.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@MCPForUnity/Editor/Clients/Configurators/CopilotCliConfigurator.cs`:
- Around line 10-24: The linuxConfigPath currently hardcodes
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".copilot", "mcp-config.json"); update CopilotCliConfigurator (the McpClient
initializer) to check Environment.GetEnvironmentVariable("XDG_CONFIG_HOME") and,
if non-empty, use Path.Combine(xdg, "copilot", "mcp-config.json") as
linuxConfigPath; otherwise fall back to the existing
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".copilot", "mcp-config.json") behavior so Linux honors XDG_CONFIG_HOME while
keeping windowsConfigPath and macConfigPath unchanged.

Comment on lines +10 to +24
public CopilotCliConfigurator() : base(new McpClient
{
name = "GitHub Copilot CLI",
windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".copilot", "mcp-config.json"),
macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".copilot", "mcp-config.json"),
linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".copilot", "mcp-config.json")
})
{ }

public override IList<string> GetInstallationSteps() => new List<string>
{
"Install GitHub Copilot CLI (https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli)",
"Open or create mcp-config.json at the path above",
"Paste the configuration JSON (or use /mcp add in the CLI)",
"Restart your Copilot CLI session"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

GitHub Copilot CLI mcp-config.json configuration path location documentation

💡 Result:

GitHub Copilot CLI stores MCP server definitions in mcp-config.json in your Copilot config directory:

  • Default location: ~/.copilot/mcp-config.json (macOS/Linux; Windows typically via WSL uses the same ~/.copilot/ path) [1]
  • If you set XDG_CONFIG_HOME: the config directory moves under that location (and mcp-config.json moves with it) [1]

Official documentation: GitHub Docs “Using GitHub Copilot CLI” → “Add an MCP server” notes both the filename and default directory, and the XDG_CONFIG_HOME override [1].

Sources
[1] GitHub Docs — “Using GitHub Copilot CLI” (section “Add an MCP server”) (docs.github.com)

Citations:


Consider handling XDG_CONFIG_HOME for Linux users.

The path ~/.copilot/mcp-config.json is correct per official GitHub Copilot CLI documentation. However, on Linux, users with XDG_CONFIG_HOME set should have the config read from $XDG_CONFIG_HOME/copilot/mcp-config.json instead. The current implementation ignores this environment variable, which may prevent auto-configuration for users with custom config directories.

🤖 Prompt for AI Agents
In `@MCPForUnity/Editor/Clients/Configurators/CopilotCliConfigurator.cs` around
lines 10 - 24, The linuxConfigPath currently hardcodes
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".copilot", "mcp-config.json"); update CopilotCliConfigurator (the McpClient
initializer) to check Environment.GetEnvironmentVariable("XDG_CONFIG_HOME") and,
if non-empty, use Path.Combine(xdg, "copilot", "mcp-config.json") as
linuxConfigPath; otherwise fall back to the existing
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".copilot", "mcp-config.json") behavior so Linux honors XDG_CONFIG_HOME while
keeping windowsConfigPath and macConfigPath unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant