Skip to content

fix(mcp): move experimental mcp_events setting to global user settings - #5034

Merged
rumpl merged 1 commit into
docker:mainfrom
rumpl:fix/mcp-events-user-settings
Nov 24, 2026
Merged

rumpl merged 1 commit into
docker:mainfrom
rumpl:fix/mcp-events-user-settings

Conversation

@rumpl

@rumpl rumpl commented Nov 24, 2026

Copy link
Copy Markdown
Member

Summary

Moves the experimental MCP Events opt-in (experimental.mcp_events) out of agent toolset YAML config and into global user settings (~/.config/cagent/config.yaml):

settings:
  experimental:
    mcp_events: true

Changes

  • Remove Toolset.Experimental / ToolsetExperimentalConfig from pkg/config/latest, pkg/config/mcps.go, agent-schema.json, and regenerated TypeScript SDK types/schemas.
  • Add Settings.Experimental (ExperimentalSettings{MCPEvents bool}) and (*Settings).MCPEventsEnabled() in pkg/userconfig.
  • Wire userconfig.Get().MCPEventsEnabled() in pkg/tools/mcp (CreateToolSet, NewRemoteToolsetFromConfig), pkg/acp, and pkg/tools/builtin/mcpcatalog.
  • Update unit tests, docs, and examples/mcp-events.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl
rumpl requested a review from a team as a code owner November 24, 2026 21:11
Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:11

Copilot AI 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.

🟢 Approval recommended

No active review issues block the change to make MCP Events opt-in a global user preference.

No open issues 🎉

What changed in this PR

Moves experimental MCP Events opt-in from agent toolset configuration to global user settings, making it a user-wide preference while keeping it disabled by default.

Changes:

  • Adds settings.experimental.mcp_events and applies it to MCP creation paths, including ACP and the MCP catalog.
  • Removes the toolset-level setting from Go types, validation, schemas, and generated TypeScript definitions.
  • Updates tests, documentation, and examples for the global setting.
File Description
sdk/​typescript/​src/​generated/​config.ts Removes toolset experimental fields and their type.
sdk/​typescript/​schemas/​docker-agent.schema.json Removes the corresponding generated schema entries.
pkg/​userconfig/​userconfig.go Adds experimental settings and a nil-safe MCP Events accessor.
pkg/​userconfig/​userconfig_test.go Tests defaults, opt-in, and YAML loading.
pkg/​tools/​mcp/​remote_test.go Removes the toolset-level opt-in assertion.
pkg/​tools/​mcp/​mcp.go Reads the global setting when creating MCP toolsets.
pkg/​tools/​mcp/​events_experimental_test.go Tests both MCP creation paths against global settings.
pkg/​tools/​builtin/​mcpcatalog/​mcpcatalog.go Applies the global setting to catalog-enabled remote servers.
pkg/​config/​mcps.go Removes experimental-setting inheritance from shared definitions.
pkg/​config/​mcps_test.go Removes the obsolete inheritance test.
pkg/​config/​latest/​validate.go Removes validation for the deleted toolset field.
pkg/​config/​latest/​validate_test.go Removes the obsolete field-validation test.
pkg/​config/​latest/​types.go Removes the toolset experimental field and configuration type.
pkg/​acp/​mcp.go Applies the global setting to client-provided MCP servers.
examples/​mcp-events/​README.md Documents global opt-in instead of per-toolset configuration.
examples/​mcp-events/​agent-stdio.yaml Removes local opt-in from the stdio example.
examples/​mcp-events/​agent-http.yaml Removes local opt-in from the HTTP example.
docs/​configuration/​user-settings/​index.md Documents the new user setting and its default.
docs/​configuration/​tools/​index.md Updates MCP Events configuration instructions.
agent-schema.json Removes experimental properties from MCP definitions and toolsets.

Review effort: Balanced

@rumpl
rumpl enabled auto-merge November 24, 2026 21:15
@rumpl
rumpl added this pull request to the merge queue Nov 24, 2026
@aheritier aheritier added area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/mcp MCP protocol, MCP tool servers, integration kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Nov 24, 2026
Merged via the queue into docker:main with commit b53e146 Nov 24, 2026
23 checks passed
@rumpl
rumpl deleted the fix/mcp-events-user-settings branch November 24, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/mcp MCP protocol, MCP tool servers, integration kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants