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

Cancellation support via CancellationToken's fails

Open
#1,365 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
csharp

Research direction

Start by tracing cancellation through the client tool-call flow and the server-side tool-call handling described in the issue. Verify that cancelling the client token sends a cancellation notification, and that the server cancels the tool token for both that notification and a dropped connection.

Written by the indexing model from the issue text.

Description

bug P2 ready for work

Describe the bug
On a tool call the client does take a CancellationToken however it seems to just abort the http request and not send a cancellation notification. The server side tool calls are shown taking CancellationToken's but I don't see what ever triggers them in that normal tool flow.

The client should send a cancel notification when the cancel token is used, and the server should trigger the tool cancel token both if it gets the cancel notification or if the connection drops.

working on a PR to do so.

Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
9d 19h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

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.