feat(init): add mcp_config CLI options for reference mode#85
Merged
Conversation
Add new CLI flags to `tool init` for directly specifying mcp_config values when creating reference manifests: Stdio transport options: - --command: executable to run (implies reference mode) - --args: space-separated command arguments HTTP transport options: - --url: server URL (implies HTTP reference mode) - --header: HTTP headers as KEY=VALUE (repeatable) - --oauth-client-id, --oauth-authorization-url, --oauth-token-url, --oauth-scopes: OAuth configuration Common options: - --env: environment variables as KEY=VALUE (repeatable) Interactive mode now prompts for command/args (stdio) or URL (http) when reference mode is selected, enabling a complete workflow without manual manifest editing.
Fixes RUSTSEC-2026-0007 integer overflow vulnerability in BytesMut::reserve. While this project is not directly affected (only uses immutable Bytes, no reserve calls), updating removes the security advisory warning.
This was referenced Feb 4, 2026
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.
Summary
tool initfor directly specifying mcp_config valuesThis allows users to quickly create reference manifests pointing to external
MCP servers or commands without scaffolding code files.
Changes
lib/commands.rs: Add 9 new CLI arguments for mcp_config options (--command,--args, --env, --url, --header, --oauth-client-id, --oauth-authorization-url,
--oauth-token-url, --oauth-scopes). Add clippy allow for large enum variant.
lib/handlers/tool/init.rs: Add McpConfigOptions struct for parsing CLI args,implement init_reference() function for creating reference manifests, add
print_reference_success() for output formatting.
lib/prompt.rs: Add command/args/url fields to McpbPromptResult, prompt forthese values in interactive mode when reference transport is selected.
bin/tool.rs: Wire new CLI arguments to init_mcpb handler.Test Plan
tool init . --command npx --args "@scope/server --verbose" -yto verifystdio reference mode creates correct manifest
tool init . --url "https://api.example.com/mcp/" -yto verify HTTPreference mode
tool init . --url "https://example.com" --oauth-client-id abc -ytoverify OAuth config
tool initinteractively, select Reference mode, and verify prompts forcommand/args (stdio) or URL (http) appear
cargo testto ensure no regressionsfixes #86