Repository navigation
feat(mcp): add termherd mcp-proxy and export TERMHERD_MCP_CONFIG for Antigravity sessions - #618
Merged
Merged
Conversation
…Antigravity sessions
# Conflicts: # CHANGELOG.md
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
TERMHERD_MCP_CONFIG(pointing at the per-session0600mcpServersconfig file, never the bearer token itself) into agent PTY environments incrates/pty, with a dedicatedTERMHERD_SESSION_VARSstrip list besideINHERITED_SESSION_VARSso plain shells and nested TermHerd instances never inherit an outer session's bridge pointer.Provider::Antigravity.capabilities().mcp_bridge_injectionso Antigravity launches receive a per-session revocable live-bridge token.termherd mcp-proxysubcommand (crates/app/src/mcp_proxy.rs+cli::Command::McpProxy), a zero-extra-dependency stdio-to-HTTP/1.1 loopback proxy:TERMHERD_MCP_CONFIGis set, forwards newline-delimited JSON-RPC to the session's live bridge and surfaces any config, transport, or 401/403 error explicitly (never silently falling back).TERMHERD_MCP_CONFIGis absent (launched outside TermHerd, or a host CLI that did not propagate it), logs why on stderr and serves thesettings.jsontools with explicitinitializeinstructionsexplaining why the live workspace tools are unavailable.termherd mcp-proxyandagy mcp add termherd /path/to/termherd mcp-proxyindocs/src/mcp/live-bridge.mdandCHANGELOG.md.Verification
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test -p termherd-core locations(7 passed),provider(6 passed)cargo test -p termherd-pty launch(31 passed)cargo test -p termherd-app -- mcp_proxy cli::tests an_antigravity_spawn_gets_an_mcp_config_and_a_revocable_token(13 passed, including end-to-end loopback tests againstcrate::mcp::serve)markdownlint-cli2,just check-deps,just check-arch