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

Example server and client not working #78

Open
p13rr0m opened this issue Nov 28, 2024 · 4 comments
Open

Example server and client not working #78

p13rr0m opened this issue Nov 28, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@p13rr0m
Copy link

p13rr0m commented Nov 28, 2024

Describe the bug
The example servers, in the folder examples/servers, in combination with the clients from README.md do not work.

  1. Using mcp_simple_tool as an example, starting the servers with the command mcp-simple-tool or mcp-simple-tool --transport sse --port 8000 is not correct. I believe that should be uv run mcp-simple-tool or uv run mcp-simple-tool --transport sse --port 8000 respectively.

  2. The client code is not able to talk to the server. I am not sure which method (stdio vs sse) the example should be using. Additionally, the import for the client does not exist.

from mcp.client import ClientSession

# ClientSession
async with ClientSession() as session:
    await session.initialize()

    # List available tools
    tools = await session.list_tools()
    print(tools)

    # Call the fetch tool
    result = await session.call_tool("fetch", {
        "url": "https://example.com"
    })
    print(result) 
@p13rr0m p13rr0m added the bug Something isn't working label Nov 28, 2024
@hemangjoshi37a
Copy link

same problem here in the #80

@hemangjoshi37a
Copy link

let me know please if you get this working

@tanhaipeng
Copy link

I also encountered many problems while studying and needed to improve the quality of documents.

@hemangjoshi37a
Copy link

I just found out that the MCP is useless to me as i use Ubuntu Linux and the MCP is only supported through the claude app. very sad .

@dsp-ant dsp-ant self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants