Incorporate MCP Server into Golem CLI
With a new command, Golem CLI enters serve mode:
%> golem-cli --serve --serve-port 1232
%> golem-cli running MCP Server at port 1232
In this mode, Golem CLI creates an MCP Server that exposes different commands as different tools, and exposes relevant resources (the manifest file in the current, ancestor, and children directories) as resources.
When this ticket is completed, it should be possible to use an agent such as Claude Code to perform anything that Golem CLI can do. Moreover, all individual tools and resources must be end-to-end tested with an MCP Client that interacts with the MCP Server.
This library looks like the one to use for Rust, but perhaps there are better options available.
/bounty $3500
π $3,500 bounty β’ Golem Cloud
Steps to solve:
- Start working: Comment
/attempt golemcloud/golem#1926with your implementation plan - Submit work: Create a pull request including
/claim golemcloud/golem#1926in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
β Important guidelines:
- To claim a bounty, you need to provide a short demo video of your changes in your pull request
- If anything is unclear, ask for clarification before starting as this will help avoid potential rework
- Low quality AI PRs will not receive review and will be closed
- Do not ask to be assigned unless you've contributed before
Thank you for contributing to golemcloud/golem-cli!
| Attempt | Started (UTC) | Solution | Actions |
|---|---|---|---|
| π’ @webbdays | Jul 04, 2025, 05:11:56 PM | golemcloud/golem-cli#290 | Reward |
| π’ @benya7 | Jun 05, 2025, 05:02:10 PM | WIP | |
| π’ @yarosz | Jun 05, 2025, 06:51:51 PM | WIP | |
| π’ @vishalpatil1899 | Jun 06, 2025, 12:25:44 AM | WIP | |
| π’ @saurabhhh777 | Aug 09, 2025, 06:31:54 AM | WIP | |
| π’ @Harsh9485 | Aug 11, 2025, 04:12:01 PM | WIP | |
| π’ @fjkiani | Aug 12, 2025, 11:03:09 PM | golemcloud/golem-cli#319 | Reward |
| π’ @kmr-ankitt | Jun 17, 2025, 07:29:28 AM | WIP | |
| π’ @Sethrollinsbah | Jun 19, 2025, 11:41:27 AM | WIP | |
| π’ @hoangbits | Jul 25, 2025, 08:51:50 AM | WIP | |
| π’ @harkam-pro | Jul 30, 2025, 09:15:01 AM | WIP | |
| π’ @Aditya-PS-05 | Jul 30, 2025, 09:38:31 AM | WIP |
Hi @jdegoes . I'd love to work on this one. Could you assign it to me?
Hi @jdegoes, I am interested
its like
- keeping cli (exlisting clap lib) in the loop. (simple approach, provide cli docs as context source to generate appropriate cli commands(like we humans do) based on user requirements.) (mcp has just a tool which pass this to clap parser) and another tool to read the manifest files in the app. may be another tool to read app context.
- or without clap: write custom tools/handler for actions for mcp like its was done for clap for each command.we need to write custom tool descriptions if we choose this approach.
Thanks.
@benya7 We cannot assign but feel free to work on, if you like. I don't know if someone else will work on it too, but it's a possibility.
@webbdays Any agent can be taught to figure out a CLI interface, that's not what I want for this issue. Bypassing clap and writing direct custom tools will provide the best agent experience. However, we can leverage existing command docs by tying into Clap metadata associated with commands, to reduce the maintenance burden for the MCP Server.
ok.
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926 π
@jdegoes Hey John π
First time contributor to Golem, but done a couple of bounties here on Algora before. I've got a few questions before I dive into a prototype:
1. Transport default: Should --serve expose an HTTP JSON-RPC endpoint on localhost:<port> by default, or should it speak MCP over stdio unless --serve-port is given?
2. Streaming expectations: For long-running CLI commands, do you want incremental output via MCP logging/notifications, or is returning only the final result acceptable?
3. Resource scope: Beyond the nearest manifest file, should resources/list expose additional project files (e.g. child manifests, logs), or keep scope to a single manifest for v1?
Thanks for taking the time.
@yarosz
-
I don't want to support stdio.
-
Incremental output is useful.
-
The hierarchy of manifest files (there is not, in general, a single one), as well as any file which could or should be referenced by a command. In order to learn what these are, you should study the CLI reference.
/attempt golemcloud/golem#1926
Hey @jdegoes Iβd like to ask: what exactly do you expect Golem CLI to support when it is running as an MCP server? What kinds of actions or commands should an agent like Claude Code be able to perform through the server?
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926
@Harsh9485 Claude Code should be able to do anything (for you) that CLI can do itself.
Is anybody working on this?
Is anybody working on this? Yes. Almost done. Will put out the pr today or tomorrow.
Is anybody working on this? Yes. Almost done. Will put out the pr today or tomorrow.
Hey..that's awesome. Good luck for the PR.
Hey algora, /attempt golemcloud/golem#1926
/attempt https://github.com/golemcloud/golem/issues/1926
@jdegoes Hey, Do you want to closing this issue with implementation from @webbdays or want impelmentation differently? It's already 3 weeks ago.
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926
/attempt golemcloud/golem#1926
Implementation plan:
- Flags and entry:
- Add --serve and --serve-port to GolemCliGlobalFlags
- Early branch to start serve mode and print βgolem-cli running MCP Server at port {port}β
- Server (optional feature mcp-serve):
- Introduce
golem-cli/src/serve/mod.rs - Use
rust-mcp-sdkSSE server; implement:- tools.list from Clap leaf commands (names like app.build)
- tools.call with generic { args: string[] } β re-invoke existing CLI handlers
- resources.list/read for golem.yaml in cwd, ancestors, one-level children
- Introduce
- DRY principle: generate tools from Clap; donβt hard-code schemas
- Tests:
- E2E with SDK client: list tools, call a simple command, list/read resources
- Docs: brief usage and feature flag notes
SDK reference: https://github.com/rust-mcp-stack/rust-mcp-sdk
/attempt golemcloud/golem#1926
Phase 1 (submitted): Serve mode scaffold
- PR: https://github.com/golemcloud/golem-cli/pull/319
- Adds flags: --serve, --serve-port
- On run, prints: βgolem-cli running MCP Server at port {port}β
- Placeholder server enumerates CLI tools/resources and waits for CtrlβC
- How to run: cargo run -p golem-cli -- --serve --serve-port 1232
Phase 2 (next PR): MCP integration + tests
- Optional feature: mcp-serve
- Use rust-mcp-sdk (SSE) for MCP server:
- tools.list from Clap leaves (e.g., app.build)
- tools.call with generic { args: string[] } β re-invoke existing CLI handlers
- resources.list/read for golem.yaml (cwd, ancestors, one-level children)
- E2E tests with an SDK client
SDK reference: https://github.com/rust-mcp-stack/rust-mcp-sdk
/attempt #1926
/attempt #1926
/attempt #1926