Skip to content

RFC: First-class vMCP support in the local CLI experience#59

Draft
JAORMX wants to merge 2 commits intomainfrom
jaosorior/vmcp-local-experience
Draft

RFC: First-class vMCP support in the local CLI experience#59
JAORMX wants to merge 2 commits intomainfrom
jaosorior/vmcp-local-experience

Conversation

@JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Mar 24, 2026

Summary

  • Proposes integrating vMCP into the main thv CLI as a thv vmcp subcommand (serve, validate, init)
  • Brings the optimizer to local with three tiers: FTS5-only (--optimizer), managed TEI container (--optimizer-embedding), and full config control
  • Formalizes the library embedding pattern used by brood-box as an officially supported integration path
  • Preserves the standalone vmcp binary for K8s deployments and backwards compatibility

Key Design Decisions

  • Zero-config quickstart: thv vmcp serve --group default works without a config file
  • Shared logic in pkg/vmcp/cli/: Both thv vmcp and standalone vmcp delegate to the same package
  • Managed TEI lifecycle: --optimizer-embedding auto-manages a TEI container with named volume for model caching, health polling, and graceful fallback to FTS5-only
  • Library stability table: Packages rated Stable/Beta/Internal to guide downstream consumers

Related RFCs

  • THV-0008 (Virtual MCP Server)
  • THV-0014 (K8s-Aware vMCP)
  • THV-0022 (Optimizer Migration)
  • THV-0034 (Long-Running Local Server)

🤖 Generated with Claude Code

Add RFC proposing integration of the Virtual MCP Server (vMCP) into the
main thv CLI as a `thv vmcp` subcommand, bringing local optimizer support
with managed TEI container lifecycle, and formalizing the library embedding
pattern used by brood-box.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JAORMX JAORMX marked this pull request as draft March 24, 2026 17:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor

@jerm-dro jerm-dro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The fact this already works for broodbox indicates this is very feasible.


## Non-Goals

- Removing the standalone `vmcp` binary (it remains the deployment target for Kubernetes via the operator)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make this a goal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's a lot lighter weight to ship a container with just that binary.

- **Regression tests**: Verify that the standalone `vmcp serve` command still works identically after the refactor.
- **Security tests**: Verify that quick mode binds to `127.0.0.1` only, that strict YAML parsing rejects unknown fields, and that HMAC session binding is enforced when configured.

## Documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs website will need to be updated. We can also then remove the legacy mcp-optimizer.


- Add a `thv vmcp` subcommand with `serve`, `validate`, and `init` sub-commands that integrate vMCP into the main CLI
- Support a zero-config quickstart: `thv vmcp serve --group <name>` should work without a config file for simple aggregation
- Bring the optimizer to the local experience with managed embedding service lifecycle (`--optimizer` flag auto-manages a TEI container)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could more simply state the goal is to deprecate and later remove the legacy optimizer.

- **Examples**: `examples/vmcp-local-quickstart/` with a minimal setup, `examples/vmcp-advanced/` with auth, composite tools, and telemetry
- **Existing docs updates**: Update `docs/arch/10-virtual-mcp-architecture.md` to reference the new CLI integration and library embedding path

## Open Questions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there sharp edges given vMCP has typically been run in k8s? or can you easily replace / disable all the K8s dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear so far. I haven't personally stumbled upon any issues, but we need to test and get more data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants