GO
MCP server mode (/fixes #275)
golemcloud/golem-cli#290

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:

    • Introduces a new command-line interface for the Golem CLI to run in a “MCP” mode, launching an MCP server.
    • This server will listen on a specified port, use specified transport (e.g., golem-cli mcp-server run --port <PORT> --transport <Sse|StreamableHttp>), exposing the CLI’s capabilities.
    • For more details on how to use tun this command golem-cli mcp-server
  • Commands as MCP Tools:

    • All relevant Golem CLI commands are now exposed as distinct MCP “tools.”
    • Each tool comes with precise JSON Schema definitions for its inputs and expected structured outputs.
  • Manifest Files as MCP Resources:

    • The MCP server exposes manifest files (e.g., 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:

    • This foundational work makes it possible for agents like Claude Code to programmatically invoke Golem CLI operations, achieving anything the CLI can do, but with structured communication.
  • Leveraging rmcp:

    • The implementation utilizes the rmcp Rust library, for building the MCP server and defining tools. It recently has a release and its official rust sdk from @modelcontextprotocol

Important 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:

  • Other than manual testing(which tried with gemini cli, i say its ok(starting is difficult, as we use gemini cli tends to learn). We can also improve on tool descriptions to make it even good. Let me know how its in Calude Code.
  • I currently have no clear idea how to make out test cases and run it automatically. Advise needed.

Thank you very much for reading.

Claim

Total prize pool $3,500
Total paid $0
Status Pending
Submitted July 04, 2025
Last updated July 04, 2025

Contributors

BA

Balaram

@webbdays

100%

Sponsors

GO

Golem Cloud

@golemcloud

$3,500