Skip to content

Conversation

grll
Copy link
Contributor

@grll grll commented Apr 29, 2025

Motivation and Context

The MCP Specifications says:

SDKs and other middleware SHOULD allow these timeouts to be configured on a per-request basis.

How Has This Been Tested?

No regression on the test / test running locally.

Breaking Changes

No it's a transparent change which enable to set timeout on per-request basis. If not set it default to the previous behavior of not having a timeout or using the session based timeout.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Notes:

I have added the capacity to set the read timeout only on the tool_call requests which is probably the most critical one but we might want to extend that to other calls from the client as well.

@grll
Copy link
Contributor Author

grll commented Apr 29, 2025

fixes #600

@grll
Copy link
Contributor Author

grll commented Apr 29, 2025

@dsp-ant / @jerome3o-anthropic, I know the amount of notifications must be crazy but it's a very quick and simple change that makes the python sdk more compliant with the MCP specifications with regard to timeouts. Hope you get some time to review it at some point.

Copy link
Member

@dsp-ant dsp-ant left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thank you for the change!

@dsp-ant dsp-ant merged commit 96e5327 into modelcontextprotocol:main Apr 29, 2025
6 checks passed
gspencergoog pushed a commit to gspencergoog/mcp-python-sdk that referenced this pull request Jul 29, 2025
…lyhim/fix-website-navigation

FIX: Fix broken links
gspencergoog pushed a commit to gspencergoog/mcp-python-sdk that referenced this pull request Jul 29, 2025
Prior to this commit, we defined a `validate:schema` script to check
schema TypeScript definitions, and a `format:check` script to check
Markdown formatting with Prettier.  Also, we had CI-only action that
checked whether `schema.json` files matched their `schema.ts`.

This commit makes the following changes:

* Introduce a `check:schema:json` that can be run locally to check that
  `schema.json` files matched their `schema.ts`.
* Rename `validate:schema` to `check:schema:ts` to match the above.
* Introduce a `check:docs:links` script to check links via Mintlify.
  This script can catch broken links like those fixed by modelcontextprotocol#601.
* Rename `format:check` to `check:docs:format` to match the above.
* Introduce `check`, `check:schema`, and `check:doc` macro scripts.
saqadri pushed a commit to saqadri/stdio-fixes that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants