Skip to content

Handle requests for capabilty, when capability not present #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnkors
Copy link

ex: Claude Desktop polls for /resources/list even though resources is missing from the capabilities

Motivation and Context

Some clients ignore the capabilities, and sends <capability>/list requests regardless (ex: Claude Desktop).

This PR

  • ensures the server does not log this as an Error log statement
  • notifies the client about the bad request using a notification message, instead of returning an error messages

How Has This Been Tested?

Use Claude Desktop

  • Verify that my server does not log errors when connect to Claude.

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 don't have full framework, who does??)
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

ex: Claude Desktop polls for `/resources/list` even though `resources` is missing from the `capabilities`
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