Skip to content

Comments

Don't treat McpServerHandlers as an independent options type#1313

Merged
halter73 merged 1 commit intomainfrom
halter73/remove-redundant-handler-config
Feb 19, 2026
Merged

Don't treat McpServerHandlers as an independent options type#1313
halter73 merged 1 commit intomainfrom
halter73/remove-redundant-handler-config

Conversation

@halter73
Copy link
Contributor

When working on #1308, I considered whether I should treat McpServerFilters similar to McpServerHandlers and resolve it using IOptions<McpServerFilters> in case anyone configured it directly as an options type. Ultimately, I decided against it because it added too much complexity.

After more thought, I don't think the complexity makes sense for McpServerHandlers either. Having the handler methods on McpServerBuilderExtensions modify the McpServerOptions.Handlers directly seems a lot more straightforward and easier to understand than the previous overwriting logic, so I think we should make McpServerOptions the source of truth for both handlers and filters before 1.0.

@jeffhandley jeffhandley added this to the Stable public API milestone Feb 19, 2026
@jeffhandley jeffhandley added the breaking-change This issue or PR introduces a breaking change label Feb 19, 2026
Copy link
Collaborator

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

I'm good with this.

Copy link
Collaborator

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

We noticed during reviewing this and #1308 side-by-side that we prefer for Handlers to not be settable and to remove the setter from Filters in #1308.

@halter73 halter73 merged commit 411cef6 into main Feb 19, 2026
9 of 10 checks passed
@halter73 halter73 deleted the halter73/remove-redundant-handler-config branch February 19, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change This issue or PR introduces a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants