Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Custom filters

Open
#1,314 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start by reviewing the AddMcpServer options entry point and how cancellation exceptions are currently handled in the server pipeline. Define how a custom OperationCancelledExceptionFilter can be registered there and verify that cancellation is handled gracefully without producing the current error.

Written by the indexing model from the issue text.

Description

enhancement P3 ready for work

Is your feature request related to a problem? Please describe.

Cancellation token is throwing error which can be handled graceful way like described here

https://andrewlock.net/using-cancellationtokens-in-asp-net-core-mvc-controllers/

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMvc(options =>
        {
            options.Filters.Add<OperationCancelledExceptionFilter>();
        });
    }
}

Describe the solution you'd like

It would be nice to add custom filter

builder.Services.AddMcpServer(options =>
        {
            options.Filters.Add<OperationCancelledExceptionFilter>();
        })

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
8d 7h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/csharp-sdk

All issues in modelcontextprotocol/csharp-sdk

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.