Skip to content

Conversation

sorin-florea
Copy link

Return a METHOD_NOT_FOUND error instead of JSONRPC_VERSION if MCP clients call the MCP server for unprovided capabilities.

Motivation and Context

There are a few misbehaving MCP clients in the wild that will disregard the MCP capabilities and still call the server for unprovided capabilities. This also avoids logging these errors in the server logs.

How Has This Been Tested?

Unit tests.

Breaking Changes

No.

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

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.

1 participant