A minimal MCP client demonstrating polling for task results over streamable HTTP.
First, start the simple-task server in another terminal:
cd examples/servers/simple-task
uv run mcp-simple-taskThen run the client:
cd examples/clients/simple-task-client
uv run mcp-simple-task-clientUse --url to connect to a different server.
- Connects to the server via streamable HTTP
- Calls the
long_running_tasktool as a task - Polls the task status until completion
- Retrieves and prints the result
Available tools: ['long_running_task']
Calling tool as a task...
Task created: <task-id>
Status: working - Starting work...
Status: working - Processing step 1...
Status: working - Processing step 2...
Status: completed -
Result: Task completed!