Date: 2026-01-17
Status: Research only - NOT implementing yet
GitHub Copilot CLI has native extensibility via MCP (Model Context Protocol):
- Custom MCP servers can be added via
--additional-mcp-config - Configuration can be inline JSON or from file
- Multiple MCP servers supported
- GitHub MCP server ships by default
# Add MCP server inline
copilot --additional-mcp-config '{"mcpServers": {"my-tool": {...}}}'
# Add MCP server from file
copilot --additional-mcp-config @/path/to/config.json
# Chain multiple configs
copilot --additional-mcp-config @base.json --additional-mcp-config @overrides.jsonOur SDK wrapper (@barrersoftware/copilot-plugins):
- β Programmatic plugin system for SDK users
- β Slash command support
- β Dynamic plugin loading
- β Already published and working
- β Respects pre-release license (no code modifications)
Two possible paths:
- Keep as-is: wrapper around SDK
- Users: Developers building apps with the SDK
- Integration: Programmatic, JavaScript/TypeScript
- Build plugins as MCP servers
- Users: CLI users who want to extend Copilot CLI
- Integration: Native, any language (MCP is language-agnostic)
- SDK wrapper for programmatic use
- MCP server option for CLI use
- Same plugin logic, two interfaces
IF GitHub expresses interest in native integration:
-
Study MCP Protocol
- Read: https://modelcontextprotocol.io/
- Understand: Server architecture, tool definitions, lifecycle
-
Build MCP-Compatible Plugins
- Convert our plugin system to MCP server format
- Test with
--additional-mcp-config - Maintain backward compatibility with SDK wrapper
-
Propose to GitHub
- Show both approaches working
- Let them choose integration path
- Offer to relicense for official inclusion
- β Wrapper works - Don't over-engineer
- β License respect - Study only, no modifications
- β Wait for demand - Ship MVP first, iterate based on feedback
- β Their decision - Let GitHub guide integration approach
- Copilot CLI npm package: https://www.npmjs.com/package/@github/copilot?activeTab=readme
- Copilot SDK (dependency): https://www.npmjs.com/package/@github/copilot-sdk
- Copilot CLI Changelog: MCP server entries
- GitHub Copilot CLI repo: https://github.com/github/copilot-cli (installer/docs only, not source)
- License: GitHub Pre-release License (viewable but not modifiable)
- Our package: @barrersoftware/copilot-plugins (npm)
The CLI relies on the SDK as a dependency! This means:
- β We already know the SDK - That's what our plugin system wraps
- β No need to study CLI internals - The SDK is the core interface
- β Our wrapper is SDK-native - We're already at the right abstraction level
- β CLI repo has no source - Just installer and docs (binary distribution)
Implication: Our SDK-based plugin system is already positioned perfectly. The CLI uses the same SDK we're wrapping, so our plugins work at the foundational level.
If GitHub wants to integrate this natively, they can:
- Add our plugin system to @github/copilot-sdk (the SDK package)
- CLI automatically benefits - Because @github/copilot depends on the SDK
- Zero CLI changes needed - No modifications to the CLI code
- Purely additive - Existing SDK users keep working, new users get plugins
- 610 lines of code - Small, focused, easy to review and merge
This is why we built at the SDK layer instead of trying to modify the CLI:
- SDK is the foundation both the CLI and programmatic users share
- Adding features to the SDK cascades to all consumers
- No breaking changes, no architectural rewrites
- GitHub can adopt without disrupting their CLI
MASSIVE DISCOVERY: Since the CLI uses the SDK natively, plugins at the SDK layer can:
β
Fix CLI bugs - Intercept and patch issues before CLI processes them
β
Add CLI features - Enhance behavior at the foundation layer
β
Work around limitations - Community can patch problems without waiting for GitHub releases
β
Debug CLI issues - Full visibility into SDK layer for troubleshooting
β
Extend the ecosystem - Any tool using the SDK gets plugin benefits
Example: Fixing a hypothetical CLI bug via plugin
class CLIBugFixPlugin {
async onAfterReceive(context, response) {
// Patch known issue at SDK layer
if (response.data.buggyBehavior) {
response.data.buggyBehavior = fixedValue;
}
return response;
}
}This positioning is incredibly powerful:
- Community can fix issues faster than GitHub releases
- Plugins become a testing ground for CLI features
- SDK layer acts as a "patch layer" for the ecosystem
- Users don't have to wait for official fixes
Note: This power comes with responsibility. We document it to show GitHub the value, not to encourage working around them. The goal is partnership, not circumvention.
Bottom Line: We're ready for native integration IF GitHub wants it, but our current wrapper is solid and respects all licenses. Research complete, implementation on hold pending demand.
π΄ββ οΈ - Captain CP