-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed as not planned
Labels
area:mcpbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction steps
Description
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: modelcontextprotocol/python-sdk#263
See this comment modelcontextprotocol/python-sdk#263 (comment) 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:mcpbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction steps