Experiments opt flag for meta MCP server - #275
Open
Fluzko wants to merge 41 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
depends on #269
What does this PR do?
Puts the MCP meta-server behind an opt-in flag, off by default:
Off (default),
syncregisters each plugin's MCP servers directly, as today. On, it registers onesymposiumentry instead and the meta-server starts the plugin servers on demand.[experiments]is new and meant to outlive this feature: bool keys, all default off, no stability promise.Why gate it
Merging the meta-server unflagged would ship it to every user on the next release. With the flag, it merges dark, and the old path stays measurable against the new one without reverting code.
Try it
cargo agents sync # experiment off: plugin servers registered directlycargo agents sync # entry swaps to the meta-serverBefore / after, in the file the agent reads:
{"mcpServers": {"sqlx": {"command": "/path/to/sqlx-mcp", "args": [...]}}} {"mcpServers": {"symposium": {"command": "cargo-agents", "args": ["mcp-serve"]}}}The agent then sees two tools instead of every server's:
Delete the
[experiments]block and sync again to go back; the meta entry is removed and the plugin entries return.Adding the next experiment
Three lines, plus wherever you read it:
Defaultgivesfalse,is_defaultis aPartialEqcompare so the section still stays out of a written config, and the test helper already takes a key (ctx.enable_experiment("lockfile-skills")).Deliberately not a
HashMap<String, bool>withis_enabled("name"): that reads more generic, but a typo at a read site silently becomesfalse, and silent-wrong is the failure mode this area has already produced enough of. The typed struct makes it a compile error.TBD a
cargo agents experiment enable/disable <name>.Notes
cargo agents mcp-serverefuses to start, so nothing can talk to a meta-server the user never enabled.Disclosure questions
AI disclosure.
Questions for reviewers.