Dynamic MCP resources not discovered in claude code
Description
Claude Code can list static MCP resources and MCP tools, but not dynamic MCP resources.
To be more specific:
from mcp.server.fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Demo")
# Add an addition tool
@mcp.tool() <<<<<<<<<<<<<< This works. Can be discovered in Claude Code.
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
# Add a dynamic greeting resource
@mcp.resource("greeting://{name}") <<<<<<<<<<<<<<< This doesn't.
def get_greeting(name: str) -> str:
"""Get a personalized greeting"""
return f"Hello, {name}!"
Same issue was surfaced in the Claude Deskop as well: https://github.com/modelcontextprotocol/python-sdk/issues/263
See this comment https://github.com/modelcontextprotocol/python-sdk/issues/263#issuecomment-2729617662 which seems to be the reason.
I was using https://www.npmjs.com/package/@anthropic-ai/claude-code v1.0.56.
This makes Claude Code less useful since dynamic MCP resources are very important to build production MCP servers.
I have the same problem, but from yesterday it escalated that I cannot even use dynamically registered tool.
Described in #4526
Found 1 possible duplicate issue:
- https://github.com/anthropics/claude-code/issues/3326
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
I'm having the same issue. I have one tool enabled by default, and calling that tool enables a second tool. But despite the call to .enable(), Claude Code is unable to detect the change to the tools list. It seems like Claude Code is not picking up the listChanged notification (related docs here).
I am also experiencing this bug in Claude Desktop with an MCP server developed in Python. The two static resources are available but the dynamic one isn't available in any way.
Hi @ollie-anthropic, Is there any update on this issue? Seems like there are many people with the same problem including myself. Thanks!
Same issue here. Having dynamic templates supported by Claude code would be very helpful.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still actual