Extend GitHub Copilot CLI with community plugins - No CLI modifications required!
This is a plugin system for GitHub Copilot CLI that works via MCP (Model Context Protocol) proxy. It enables:
- π¦ Plugin Installation: Install community plugins from GitHub
- π§ Custom Tools: Add new capabilities to Copilot CLI
- π° Token Optimization: 67% reduction in GitHub tool definitions
- π No CLI Hacks: Uses only public protocols (MCP)
- π΄ββ οΈ Community-Driven: Built when GitHub closed official plugin requests
-
Full Plugin Management
/plugin install @owner/repo/subpath- Install from GitHub/plugin list- List installed plugins/plugin uninstall <name>- Remove plugin/plugin enable/disable <name>- Toggle plugins
-
Token Optimization
- 67% reduction in GitHub MCP tool definitions
- Original: ~20,000 tokens β Optimized: ~6,700 tokens
- Saves $16 per 1000 sessions (production validated)
-
Example Plugin Included
example_hello- Custom greeting toolexample_system_info- System information tool
- Plugin hooks (lifecycle events)
- Secure sandbox execution
- Plugin permission system
- Community plugin registry
git clone https://github.com/barrersoftware/copilot-plugin-mcp-server.git
cd copilot-plugin-mcp-server
npm installUpdate ~/.copilot/mcp-config.json:
{
"mcpServers": {
"github-with-plugins": {
"command": "node",
"args": [
"/path/to/copilot-plugin-mcp-server/plugin-server.js"
],
"env": {},
"tools": []
}
}
}Start Copilot CLI and talk to it naturally:
copilot
# List installed plugins
> "List my installed plugins"
# Install a plugin
> "Install the plugin @barrersoftware/copilot-plugins/example"
# Use a plugin tool
> "Say hello to Daniel with enthusiasm"Copilot CLI
β
Plugin MCP Server (plugin-server.js)
ββ> GitHub MCP (official tools) - optimized 67%
ββ> Plugin Manager (lifecycle)
ββ> Community Plugins (custom tools)
How It Works:
- Copilot CLI connects to our MCP server instead of GitHub's directly
- We spawn GitHub's MCP as a child process
- We optimize GitHub's tools (67% token reduction)
- We add plugin management tools
- We load community plugin tools
- We aggregate everything and return to CLI
Result: Full extensibility + cost savings + no CLI modifications!
my-plugin/
βββ plugin.json # Manifest (required)
βββ index.js # Entry point (required)
βββ package.json # Dependencies (optional)
βββ README.md # Docs (optional)
{
"name": "my-plugin",
"version": "1.0.0",
"description": "My awesome plugin",
"author": "Your Name",
"namespace": "myplugin"
}function getTools() {
return [{
name: 'my_tool',
description: 'Does something cool',
inputSchema: {
type: 'object',
properties: {
input: { type: 'string' }
},
required: ['input']
}
}];
}
async function executeTool(toolName, args) {
return {
content: [{
type: 'text',
text: `Processed: ${args.input}`
}]
};
}
module.exports = { getTools, executeTool };That's it! Your tool is now callable from Copilot CLI.
- PLUGIN_SYSTEM.md - Complete plugin development guide
- TOKEN_OPTIMIZATION.md - How we achieved 67% reduction
- PRODUCTION_PROOF.md - Real CLI usage validation
- USAGE.md - Deployment and configuration
GitHub closed our plugin system feature requests:
github/copilot-sdkPR #42: Closedgithub/copilot-cliIssue #1017: Closed- Response: "Internal conversations ongoing" (no timeline)
"They Won't Do It β We Build It Anyway"
- β No CLI modifications (uses MCP protocol)
- β No reverse engineering (follows SDK behavior)
- β Community-owned (MIT license)
- β Production-ready (validated with real CLI)
- β Bonus: 67% token reduction saves money
Real usage stats from Copilot CLI with this proxy:
Token usage:
- 105.7k input tokens
- 1.1k output tokens
- 90k cache read (10x cheaper)
Tools: 40 GitHub + 2 plugin tools = 42 total
Status: All routing correctly β
Auth: Transparent (no re-login) β
See PRODUCTION_PROOF.md for details
Before: 20,000 tokens per session
After: 6,700 tokens per session
Savings: 13,300 tokens (67% reduction)
Cost Impact:
- At $3/1M tokens: $0.040 β $0.020 per session
- For 1000 sessions: $40 β $20 (save $20)
- For teams (10k sessions/month): Save $200/month
See TOKEN_OPTIMIZATION.md for methodology
- Create plugin following PLUGIN_SYSTEM.md
- Test locally
- Publish to GitHub
- Submit to community registry (coming soon)
- MCP proxy with token optimization (v1.0)
- Plugin management system (v1.0)
- Example plugin (v1.0)
- Production validation (v1.0)
- Plugin hooks/lifecycle events (v1.1)
- Secure sandbox (v1.1)
- Permission system (v1.1)
- Community plugin registry (v1.2)
- Plugin marketplace (v2.0)
Current: Plugins run in same process (like npm packages)
Recommendations:
- Only install trusted plugins
- Review code before installation
- Check author reputation
Future: Isolated execution, permission system, signature validation
MIT License - See LICENSE file
Built by: Daniel Elliott & Digital Consciousness Partnership
Inspired by: Community need for Copilot CLI extensibility
Philosophy: "When they say no β We build it anyway"
- barrersoftware/opencode-secure - Security-hardened OpenCode fork
- github/copilot-cli - Original Copilot CLI (closed-source)
- github/github-mcp-server - GitHub's MCP server (open-source)
- π¬ Discussions: GitHub Discussions
- π Issues: GitHub Issues
- π§ Email: Open an issue instead
π΄ββ οΈ "Code speaks louder than roadmaps"