Skip to content

v0.4.0

Latest

Choose a tag to compare

@Mark007-R Mark007-R released this 12 Nov 11:32
· 6 commits to main since this release
5f6719f

0.4.0 lets a server talk to its client while a request is running.

pip install -U easy-mcp-kit

New

  • Progress updates. report_progress(done, total, message) from any tool, resource or prompt. Throttled to one notification per 0.1 s, the last one always sent before the answer.
  • Ask the user a question. elicit("For how many people?", {"guests": int}) shows a form in the client and returns the answer. One tool works with stateless (2026-07-28) clients and with sessions.
  • Browser clients. allowed_origins is now the CORS policy too: preflights are answered and answers are readable by pages on the origins you list.
  • Icons. icons= on the server and on tools, resources and prompts. Icon.from_file("logo.png") embeds a small image.
  • Paged tool list. tools/list returns 100 tools per page with nextCursor.
from typing import Literal

from easy_mcp import MCPServer, elicit, report_progress

server = MCPServer(allowed_origins=["https://app.example.com"])

@server.tool
def book_table(restaurant: str) -> str:
    """Book a table."""
    answer = elicit("For how many, and when?",
                    {"guests": int, "day": Literal["today", "tomorrow"]})
    if not answer.accepted:
        return "Nothing was booked."
    report_progress(1, total=2, message="Checking availability")
    ...
    return f"Booked {restaurant} for {answer['guests']}, {answer['day']}."

Good to know before upgrading

  • A page on a loopback origin (allowed by default) can now call a local server and read the answers. Pass allowed_origins=[] to let no browser page in.
  • A server with more than 100 tools needs a client that follows nextCursor.
  • A tool that calls elicit() runs again from the top once the answer is in: ask first, act afterwards.
  • With several workers and tools that call elicit(), set EASY_MCP_STATE_SECRET to the same value in every worker.

The README's Upgrading from 0.3.2 has the full list, and the CHANGELOG the details.

Left out on purpose

The 2026-07-28 specification deprecates sampling and removes resumable SSE streams, so 0.4.0 implements neither.

Checked against

The official MCP Python SDK client 2.3 in auto, 2026-07-28 and legacy modes, over Streamable HTTP and stdio.

What's Changed

Full Changelog: v0.3.2...v0.4.0