Copilot MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Copilot MCP Serverexplain Python comprehensions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: Runscopilot -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 generalcopilot ...commands (interactive/server flags are blocked).
Tool return structured output with:
okcommandexit_code(when executed)stdoutstderr
Related MCP server: Copilot MCP Server
Requirements
copilotCLI installed and authenticatedPython 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-serverExample 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 toolscopilot_commandB
Run a general Copilot command. Use args exactly like the shell command after copilot.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| args | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only says it runs a command and how to format args, but does not mention potential side effects, output behavior, execution context, or safety implications of executing arbitrary Copilot commands.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no redundant information. It leads with the purpose ('Run a general Copilot command') and then provides the essential usage detail about args.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This tool executes arbitrary Copilot commands, yet the description is minimal. It does not explain how output is returned, how errors or timeouts are handled, or how `cwd` affects execution. The output schema exists but the description lacks enough detail to fully understand the tool's behavior in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful semantics for the `args` parameter by explaining its format, but it does not describe `cwd` or `timeout_seconds`. With 0% schema description coverage, the description only compensates for one of three parameters, leaving the other two to be inferred from their names and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Run a general Copilot command' with a specific verb and resource, and the guidance to use args exactly like the shell command after `copilot` distinguishes this tool from the sibling `copilot_prompt` by framing it as a CLI command runner.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a usage instruction for args format ('Use args exactly like the shell command after `copilot`'), but it does not explicitly state when to use this tool versus the alternative `copilot_prompt` or mention any exclusions. The usage context is implied rather than explicitly contrasted with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
copilot_promptA
Run a non-interactive Copilot prompt (copilot -p ...) and return stdout/stderr/exit code.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| model | No | ||
| prompt | Yes | ||
| allow_all | No | ||
| extra_args | No | ||
| output_format | No | text | |
| timeout_seconds | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that execution is non-interactive and that stdout/stderr/exit code are captured and returned. However, it does not mention potential side effects, prerequisites like authentication, or that the prompt may trigger external service calls. This is a moderate level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It clearly states the action and the return value, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description is too thin for a tool with 7 parameters and a sibling tool. It omits any information about when to use this over `copilot_command`, does not explain non-obvious parameters like `allow_all` or `extra_args`, and lacks any caveats about timeout or output format. The completeness is low.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for unannotated parameters. It only implicitly covers the 'prompt' parameter by mentioning the `copilot -p` command; no explanation is given for cwd, model, allow_all, extra_args, output_format, or timeout_seconds. This is insufficient for a 7-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs a non-interactive Copilot prompt via `copilot -p` and returns stdout/stderr/exit code. It identifies the specific verb ('run'), resource ('Copilot prompt'), and distinguishes itself from the sibling tool by emphasizing 'non-interactive'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by specifying 'non-interactive', which suggests using this tool when you want a one-shot prompt rather than an interactive session. However, it does not explicitly mention the sibling tool `copilot_command` or provide when-not-to-use guidance, so the usage guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
copilot_command - First observed
copilot_prompt
TDQS
Scored across 2 tools
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.
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.
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.
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
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
MCP-Native LLM Orchestration Agent
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceWraps the GitHub Copilot CLI to provide natural language command suggestions, explanations, and shell configuration for shell, git, and GitHub CLI commands through the Model Context Protocol.1MIT
- AlicenseBqualityDmaintenanceIntegrates GitHub Copilot with MCP-compatible tools to provide AI-powered code assistance, including chat, code explanation, and reviews. It leverages existing GitHub CLI authentication to support multiple models like GPT-4o and Claude 3.5 Sonnet.4422MIT
- AlicenseNot gradedqualityCmaintenanceIntegrates GitHub Copilot CLI with MCP clients to offer various coding assistance tools including asking questions, explaining code, suggesting commands, debugging, refactoring, generating tests, and reviewing code.148MIT
- AlicenseCqualityDmaintenanceConnects MCP-enabled editors to GitHub Copilot CLI for non-interactive code analysis, batch processing, and code review.10195MIT