You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
jkawamoto
added a commit
to jkawamoto/python-sdk
that referenced
this issue
Mar 16, 2025
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280).
The implementation includes:
- Basic end-to-end test suite using an Echo server
- Verification of session initialization
- Testing of tools and prompts listing functionality
Note: Resource listing tests are currently skipped due to modelcontextprotocol#268.
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)
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
The text was updated successfully, but these errors were encountered: