Show HN: Golang: Transform Any Cobra CLI into an MCP Server for AI Assistants

2 njayp 0 7/11/2025, 12:10:02 PM github.com ↗
Ophis converts Cobra command trees into Model Context Protocol (MCP) servers. This means Claude Desktop (and other MCP clients) can call your CLI commands as structured tools with proper type checking and parameter validation. The user implements a command factory interface to create fresh command instances for each call, preventing state pollution while maintaining thread safety.

I have had success turning my own CLIs and other open source CLIs into mcp servers. Here are images showing Claude interacting with my Kubernetes cluster using helm and kubectl.

https://raw.githubusercontent.com/njayp/host/refs/heads/main... https://raw.githubusercontent.com/njayp/host/refs/heads/main...

This feels like where CLI tooling is headed - structured integration with AI rather than raw shell access. Would love feedback from the community.

GitHub: https://github.com/njayp/ophis

Comments (0)

No comments yet