feat: per-MCP server blocking support in SDK and CC plugin - #83
Open
netan-sa wants to merge 6 commits into
Open
Conversation
- Proto: add blocked_mcp_servers to LoginAck, McpBlockUpdate message, ServerFrame.mcp_block_update variant - CC plugin: cache blocked list from LoginAck in state, early-block in _handle_pre before WS round-trip, log blocked events to backend - LangChain SDK: parse blocked_mcp_servers from LoginAck, handle McpBlockUpdate frame for live mid-session updates, add is_mcp_blocked() public method - Regenerate Python protobuf bindings for both packages
event_pb2.py was not regenerated after adding McpServer fields 4-7 (version, protocol_version, server_info_name, tools_json), causing AttributeError at runtime when _send_mcp_inventory set those fields. Also guard _on_login_ack against missing blocked_mcp_servers field since the open-source proto LoginAck does not include it.
Apply ruff formatting to 5 files and remove unused imports, unused variable assignments, and outdated version blocks.
- Normalize blocked server names to lowercase at storage time (both SDKs)
- Case-insensitive is_mcp_blocked in LangChain SDK
- Fix CC plugin server name parsing: find("__") instead of split("__", 2)
- Guard against corrupted state (isinstance check on blocked list)
- Clear blocked_mcp_servers on session reset (repopulated from LoginAck)
- Cache blocked list from LoginAck in MCP inventory send path
- Add MCP blocking tests: case-insensitive, corrupted state, reset,
proto round-trips, McpBlockUpdate (both SDKs)
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.
No description provided.