-
Notifications
You must be signed in to change notification settings - Fork 755
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
resourceTemplate do not - but do actually work in Python SDK v1.2.0 #129
Comments
Nothing more than un-commenting the comment and everything seems to work. I will be able to make a pull request on Monday and provide that change along with a few changes/additions to examples/ which improve them and use the resource templates. I'm also adding a 'client.py' in the examples that tests the examples themselves. |
This is now fixed in #137. Thank you for reporting this issue! |
fix: #129 resource template handling in FastMCP server
What is the function of |
How do I get the update? I used "uv" and the mcp that it installed still has it commented out.
|
Running the same demo server code as @wanderingnature showed at the front of this issue. Is that the expected behavior that Claude Desktop can't handle templates yet? |
AFAIK resource templates DO NOT work in Claude. Also, there's another bit to fixing this for a client you develop - see #141 |
Describe the bug
resourceTemplates do not work, but actually it seems they do work....
To Reproduce
Steps to reproduce the behavior:
Follow the example at: https://github.com/modelcontextprotocol/python-sdk
Create the Demo server in latest release:
Expected behavior
Using inspector I should be able to 'List Resources' (that works) and 'List Templates(throws error).
Click List Templates in inspector throws:
Error
MCP error -32601: Method not found
I should see the two resourceTemplates in my Demo server.py
There are open issues in this repository related to same behavior with resourceTemplates and ./.venv/lib/python3.12/site-packages/mcp/server/fastmcp/server.py there is:
I removed the comment
Apparently resourceTemplates are added to MCP (and I use them myself prior to FastMCP, just with python SDK)
Now I get the expected result.
REQUEST:
RESPONSE:
Desktop (please complete the following information):
OS: Monterey 12.7.6
Browser Chrome
Additional context
just need to remove the '#' and enable the method it seems...
The text was updated successfully, but these errors were encountered: