Skip to content

Conversation

@mollux
Copy link
Contributor

@mollux mollux commented Oct 28, 2025

Context

Currently the possible tools, resources and resources templates are fetched in the McpHub.connectToServer method.

Based on the spec, during Initialization phase, the capabilities of both client and server must be negotiated.

So it would make sense to ensure that e.g. resources are not fetched (or give an error while trying to fetch them) if the server already defined it doesn't support them.

If Pr addresses this

(see also #3350)

Implementation

  • added a helper method McpHub:fetchAvailableServerCapabilities that checks the server capabilities before fetching hem
  • added a check in all existing fetch...List methods to verify if the server capability is supported.

Depending on the approach, the check could also only live in the fetch...List methods, and McpHub:fetchAvailableServerCapabilities only be used as an easy helper method to fetch all capabilities, as there are others too.

Screenshots

before after
Screenshot 2025-10-28 at 11 48 15 Screenshot 2025-10-28 at 11 37 31

How to Test

  • use an MCP server that doesn't support tools or resources
  • verify that there are no calls (and thus errors) for fetching those capabilities

Get in Touch

Discord handle: mollux
GitLab profile: https://gitlab.com/mmichaux-ext

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: 9245445

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

2 participants