Skip to content
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

Important - List Resource is not working #268

Open
raolak opened this issue Mar 12, 2025 · 1 comment
Open

Important - List Resource is not working #268

raolak opened this issue Mar 12, 2025 · 1 comment

Comments

@raolak
Copy link

raolak commented Mar 12, 2025

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

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.
@WSJUSA
Copy link

WSJUSA commented Mar 17, 2025

related
#263 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants