Skip to content

feat: per-MCP server blocking support in SDK and CC plugin - #83

Open
netan-sa wants to merge 6 commits into
mainfrom
mcp-and-plugins
Open

feat: per-MCP server blocking support in SDK and CC plugin#83
netan-sa wants to merge 6 commits into
mainfrom
mcp-and-plugins

Conversation

@netan-sa

Copy link
Copy Markdown
Contributor

No description provided.

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant