Skip to content
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

Resources and prompts cannot be added after server start #18

Merged

Conversation

marianogonzalez
Copy link
Contributor

fixes issue #17

Copy link
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

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

@marianogonzalez, thank you catching this issue.
Could you please fix the prefixes as requested.
Also can you add the serverCapabilities.resources() != null for the resource templates as well (line 147).

@@ -138,18 +138,14 @@ public class McpAsyncServer {
}

// Add resources API handlers if provided
if (!Utils.isEmpty(this.resources)) {
if (serverCapabilities.resources() != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add this. prefix.

@marianogonzalez
Copy link
Contributor Author

Thank you for reviewing @tzolov . Added the requested changes.

Copy link
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

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

lgtm

@tzolov tzolov merged commit 2c500b9 into modelcontextprotocol:main Feb 26, 2025
@marianogonzalez marianogonzalez deleted the Resources_Added_late branch February 26, 2025 12:22
@tzolov tzolov added bug Something isn't working server labels Feb 26, 2025
@tzolov tzolov added this to the 0.8.0 milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants