Server composition: mount multiple urfave trees into one MCP surface #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-13T14:23:30Z - https://github.com/coilysiren/cli-mcp/issues/39
FastMCP supports composing multiple servers via
mount()(live binding, child changes propagate) andimport_server()(snapshot copy), with automatic namespacing:my_tool→ns_my_tool,data://info→data://ns/info.Today cli-mcp projects a single
*cli.Commandroot. There's no first-class way to merge two CLI trees (e.g. two sibling repos'.coily/coily.yaml-derived urfave trees) into one MCP server without manually building a wrapper root.Proposal:
climcp.Mount(server *mcp.Server, prefix string, child *cli.Command, opts Options) error. Adds the child's leaves to the existing server withprefix.prepended to every tool name.prefix == ""for flat merge, with collision detection.Use case that motivates this:
coilycould in theory expose a single MCP server that aggregates verbs from every.coily/coily.yamlin the current workspace's repo siblings. Each repo's verbs get namespaced by repo name. One MCP endpoint, every workspace verb reachable.Open questions: