Skip to content

Make standalone SSE usage in mcp tools configurable#3770

Merged
krissetto merged 1 commit into
docker:mainfrom
krissetto:configurable-standalone-sse
Jul 21, 2026
Merged

Make standalone SSE usage in mcp tools configurable#3770
krissetto merged 1 commit into
docker:mainfrom
krissetto:configurable-standalone-sse

Conversation

@krissetto

Copy link
Copy Markdown
Contributor

Allow library users to configure if they want standalone sse enabled or not

Defaults to false to not introduce a potentially breaking change

@krissetto
krissetto requested a review from a team as a code owner July 21, 2026 12:44

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The PR cleanly introduces a configurable standaloneSSE flag on remoteMCPClient and exposes it through Toolset.SetStandaloneSSE. The implementation is correct:

  • c.mu is sync.RWMutex (embedded from sessionClient), so c.mu.RLock() / c.mu.RUnlock() in Initialize compiles correctly and is consistent with existing usage throughout session_client.go.
  • The type assertion on ts.mcpClient in Toolset.SetStandaloneSSE without holding ts.mu is safe — mcpClient is set in the constructor and never reassigned, matching the same pattern already used in Kind() and WorkingDir().
  • SetStandaloneSSE uses a write lock (c.mu.Lock()) while Initialize uses a read lock to snapshot the field — correct reader/writer separation.
  • Defaulting to false (standalone SSE disabled) preserves backward compatibility.

@aheritier aheritier added area/mcp MCP protocol, MCP tool servers, integration area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Jul 21, 2026
@krissetto
krissetto merged commit 35f6c01 into docker:main Jul 21, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mcp MCP protocol, MCP tool servers, integration area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants