
MCP-Cobra
by pluslemon
Expose your Cobra CLI commands as MCP tools for AI assistants using a seamless Go integration.
What it does
MCP-Cobra is a Go library that bridges the powerful Cobra CLI framework with the Model Context Protocol. It allows developers to take existing command-line interfaces built with Cobra and automatically expose their commands and flags as MCP tools, enabling AI assistants to execute CLI logic directly.
Tools
- Cobra Command Execution: Dynamically maps any defined Cobra command to an MCP tool, converting CLI flags into tool parameters.
Installation
To use MCP-Cobra as a server, compile your application with the mcp-server argument:
{
"mcpServers": {
"mcp-cobra-app": {
"command": "/path/to/your/compiled-binary",
"args": ["mcp-server"]
}
}
}
Supported hosts
- Claude Desktop
Quick install
go get github.com/PlusLemon/mcp-cobraInformation
- Pricing
- free
- Published
- 4/28/2026
- stars






