Skip to main content
Glama
Copilot MCP Server

Copilot MCP Server

by ohaiibuzzle

Copilot MCP Server

This (horrible horrible) project provides MCP servers that wrap the copilot CLI so third-party MCP clients can invoke Copilot through tools.

Exposed tools

  • copilot_prompt: Runs copilot -p "<prompt>" in non-interactive mode.

    • Supports session continuity:

      • session_id -> --session-id <id>

      • resume_session -> --resume=<id-or-name>

      • continue_session=true -> --continue

    • Exactly one session mode can be selected per call.

  • copilot_command: Runs general copilot ... commands (interactive/server flags are blocked).

Tool return structured output with:

  • ok

  • command

  • exit_code (when executed)

  • stdout

  • stderr

Related MCP server: GitHub Copilot MCP Server

Requirements

  • copilot CLI installed and authenticated

  • Python 3.10+ (for Python server)

Optionally set COPILOT_BIN if copilot is not in PATH.

Python setup

git clone ...
uv init .
uv --directory . run copilot_mcp_server.py 

Run:

copilot-mcp-server

Example MCP client config

Python server:

{
  "mcpServers": {
    "copilot-as-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "~/Copilot-as-MCP",
        "run",
        "copilot_mcp_server.py"
      ]
    }
  }
}

Session examples

  • Continue with a known session ID:

    • copilot_prompt(prompt="Refine the previous answer", session_id="...")

  • Resume by session/task identifier:

    • copilot_prompt(prompt="Continue this task", resume_session="...")

  • Continue most recent session:

    • copilot_prompt(prompt="Continue", continue_session=true)

Available Tools

2 tools
copilot_commandB

Run a general Copilot command. Use args exactly like the shell command after copilot.

Inputs: args (required), cwd, timeout_seconds. Returns: object

copilot_promptA

Run a non-interactive Copilot prompt (copilot -p ...) and return stdout/stderr/exit code.

Inputs: prompt (required), cwd, model, allow_all, +3 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 2 tools

    Disambiguation2/5

    copilot_prompt and copilot_command overlap significantly since copilot_command can also run prompts, making it unclear which tool to use for a prompt task. The descriptions provide some clarity but do not fully resolve the boundary.

    Naming Consistency5/5

    Both tool names follow a consistent 'copilot_<mode>' pattern with snake_case, which is predictable and easy to remember. The naming is uniform and well-aligned with the server's purpose.

    Tool Count3/5

    With only 2 tools, the server is minimal but matches the narrow scope of wrapping the Copilot CLI. However, the presence of a general command makes the prompt-specific tool feel somewhat redundant, and the count is at the low end of reasonable.

    Completeness3/5

    The general copilot_command covers all CLI operations, avoiding dead ends, but the server lacks specialized tools for common Copilot workflows such as auth, session management, or structured prompt handling. The surface is functional yet sparse.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers