Title: Golem CLI: MCP Server mode (Resolves #275)
For algora: /claim #275
Body:
Hey team,
This PR addresses Issue #275, which outlines the need for the Golem CLI to expose its capabilities programmatically via an MCP (Model Context Protocol) server. The core goal is to enable seamless integration with AI agents like Claude Code, Gemini cli, allowing them to interact with the CLI’s functionality as structured “tools” and “resources.”
New golem-cli mcp-server
Command:
golem-cli mcp-server run --port <PORT> --transport <Sse|StreamableHttp>
), exposing the CLI’s capabilities.golem-cli mcp-server
Commands as MCP Tools:
Manifest Files as MCP Resources:
golem.yaml
) in the current, ancestor, and children directories as discoverable “resources.” This allows external agents to understand the project context.Enabling AI Agent Integration:
Leveraging rmcp
:
rmcp
Rust library, for building the MCP server and defining tools. It recently has a release and its official rust sdk from @modelcontextprotocolImportant notes:
Incremental output is supported by rmcp lib and i have added its support in prev commits, but currently claude code or gemini cli dont support incremental output. (Need a progress in MCP client ecosystem. MCP is relatively new).
This initial setup is designed for single-user, local machine environments. Didnt tested for any effects if used in async manner.
Some commands which are security sensitive that deals with token and passwords are disabled and not exposed as tools.
As this mcp mode is used with ai, proper security vetting need to be done like input validation and others before releasing.
Whats Pending:
Balaram
@webbdays
Golem Cloud
@golemcloud