Open
Description
I have trouble getting listresource working.. inspector is unable to list therreources.. I tried the example from the guide.. I tried both list resource and list template resources from inspector.. its not listing.. is only static resources supported for now? Dynamic resources doesnt work?
echo_server.py
from mcp.server.fastmcp import FastMCP
def create_server():
# Create an MCP server
mcp = FastMCP("Echo", port=8020)
# Add a dynamic echo resource
@mcp.resource("echo://{message}")
def echo_resource(message: str) -> str:
"""Echo a message as a resource"""
print(f"Echo resource called with message: {message}")
return f"Resource echo: {message}"
# Add an echo tool
@mcp.tool()
def echo_tool(message: str) -> str:
"""Echo a message as a tool"""
print(f"Echo tool called with message: {message}")
return f"Tool echo: {message}"
# Add an echo prompt
@mcp.prompt()
def echo_prompt(message: str) -> str:
"""Create an echo prompt"""
print(f"Echo prompt called with message: {message}")
return f"Please process this message: {message}"
return mcp
if name == "main":
server = create_server()
server.run(transport="sse")
Ca some one help me to fix resourec listing and getting resources issue?
I am using sse transport to test this in inspector
Metadata
Metadata
Assignees
Labels
No labels