python-sdk/examples/servers/simple-task
xiaoxue 7dbee81445 同步完整源码 - 2026-05-25 2026-05-25 00:24:50 +08:00
..
mcp_simple_task 同步完整源码 - 2026-05-25 2026-05-25 00:24:50 +08:00
README.md 同步完整源码 - 2026-05-25 2026-05-25 00:24:50 +08:00
pyproject.toml 同步完整源码 - 2026-05-25 2026-05-25 00:24:50 +08:00

README.md

Simple Task Server

A minimal MCP server demonstrating the experimental tasks feature over streamable HTTP.

Running

cd examples/servers/simple-task
uv run mcp-simple-task

The server starts on http://localhost:8000/mcp by default. Use --port to change.

What it does

This server exposes a single tool long_running_task that:

  1. Must be called as a task (with task metadata in the request)
  2. Takes ~3 seconds to complete
  3. Sends status updates during execution
  4. Returns a result when complete

Usage with the client

In one terminal, start the server:

cd examples/servers/simple-task
uv run mcp-simple-task

In another terminal, run the client:

cd examples/clients/simple-task-client
uv run mcp-simple-task-client