Closed
Description
Describe the bug
The example servers, in the folder examples/servers
, in combination with the clients from README.md do not work.
-
Using mcp_simple_tool as an example, starting the servers with the command
mcp-simple-tool
ormcp-simple-tool --transport sse --port 8000
is not correct. I believe that should beuv run mcp-simple-tool
oruv run mcp-simple-tool --transport sse --port 8000
respectively. -
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)