Open
Description
The client examples provided are vague and the sampling examples, non-existant. The best I could find was:
async def handle_sampling_message(
message: types.CreateMessageRequestParams,
) -> types.CreateMessageResult:
return types.CreateMessageResult(
role="assistant",
content=types.TextContent(
type="text",
text="Hello, world! from model",
),
model="gpt-3.5-turbo",
stopReason="endTurn",
)
this barely explains how it works, and worse, doesn't show how to invoke sampling on the server-side. The documentation on the mcp website is even more vague.
Then there seem to be multiple ways to create a client:
- creating an MCPClient class like in https://modelcontextprotocol.io/quickstart/client
- aysnc with ClientSession like in your readme https://github.com/modelcontextprotocol/python-sdk/blob/main/README.md#writing-mcp-clients
I'm just trying to learn, but its confusing
Metadata
Metadata
Assignees
Labels
No labels