vtcode-mcp
September 9, 2026 ยท View on GitHub
Root AGENTS.md | Model Context Protocol client, connection pooling, and tool discovery. Layer 1 crate -- depends on vtcode-config, vtcode-commons, vtcode-utility-tool-specs.
Module Groups
| Area | Modules |
|---|---|
| Client | client.rs, provider.rs, rmcp_client.rs |
| Transport | rmcp_transport.rs, connection_pool.rs |
| Discovery | tool_discovery.rs, tool_discovery_cache.rs, schema.rs |
| Types | types.rs, traits.rs, errors.rs, enhanced_config.rs |
| Utils | utils.rs |
Rules
cli.rsstays in vtcode-core (depends oncrate::cli::input_hardening).- Re-export facade in vtcode-core (
mcp/mod.rs) must stay in sync. rmcp_clientispub(crate)-- not part of the public API.convert_to_rmcp()ispub(crate)-- internal JSON bridge.- Treat discovered server text as bounded untrusted resource content; retain host policy around it and keep enforcement in registration/tool policy.
Gotchas
enhanced_config.rsuses#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))].rmcp-reqwestis a renamedreqwestwith rustls features -- not the same as the workspacereqwest.DEFAULT_ENV_VARSis platform-conditional (#[cfg(unix)]/#[cfg(windows)]).McpSandboxContextis optional for unsandboxedMcpClient::new; session setup must pass it through initial, pooled, and reconnect stdio launches, whose stderr is bounded and redacted.list_changedrefreshes are burst-coalesced and token-bucket limited; throttled notifications must retain a dirty bit for one refresh after refill.