Skip to content

Releases

v0.4.0

Choose a tag to compare

@Mark007-R Mark007-R released this 12 Nov 11:32
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

v0.3.2

Choose a tag to compare

@Mark007-R Mark007-R released this 19 Oct 16:30
a099f2c

easy-mcp-kit 0.3.2 completes the v0.3 milestone: six features that take a server from "tools over HTTP" to something you can run in production with several workers.

What's new

  • Resources, prompts and completion: @server.resource("scheme://{var}") and @server.prompt, with argument completion, pagination, cache hints and safe_path(). Both protocol eras are supported (#51).
  • Live lists: registering a tool, resource or prompt at runtime tells connected clients. This works over stdio, SSE and the GET /mcp stream, and through subscriptions/listen for stateless 2026-07-28 clients. Resource updates go through notify_resource_updated() (#50, #51).
  • Middleware: @server.middleware around every request and @server.tool_middleware around a tool's execution. They run after the built-in checks and cannot skip them (#47).
  • OAuth 2.1 bearer tokens: the server becomes an OAuth resource server, with JWT or introspection, scopes, step-up and protected-resource metadata, next to API keys (#48).
  • Shared session store: RedisStore lets several workers share sessions, call caps, rate limits and cancellation (#49).
  • Traces and metrics: OpenTelemetry SERVER spans per message (new [otel] extra), and Prometheus text at GET /metrics with no extra dependency (#52).

Upgrading

See "Upgrading from 0.3.1" in the README for every visible change and what to do about it, and CHANGELOG.md for the full list.

pip install -U "easy-mcp-kit[redis,otel,oauth]"

What's Changed

  • SECURITY: list 0.3.x as the supported line by @Mark007-R in #45
  • Record the demo video and code snapshots for 0.3.1 by @Mark007-R in #46
  • Add request and tool middleware by @Mark007-R in #47
  • Verify OAuth 2.1 bearer tokens per the MCP authorization spec by @Mark007-R in #48
  • Share sessions between workers through a pluggable store (Redis) by @Mark007-R in #49
  • List-changed notifications and subscriptions/listen by @Mark007-R in #50
  • Resources, prompts and completion by @Mark007-R in #51
  • OpenTelemetry tracing and Prometheus metrics by @Mark007-R in #52
  • Release 0.3.2 by @Mark007-R in #53

Full Changelog: v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@Mark007-R Mark007-R released this 30 Sep 00:27
e0de696

Cancelling a tool call now stops its query on the database, not just the answer.

pip install -U easy-mcp-kit

The problem

When a client cancelled a call, or the server's tool timeout fired, the server stopped waiting and dropped the response. The query kept running on the database until the connector's own statement deadline, because sync tools ran in a worker thread that nothing could stop.

Cancellation reaches sync tools

  • A cancel token for every call. Inside a tool, easy_mcp.current_cancel_token() returns it. It is triggered by notifications/cancelled, a closed stateless connection, a deleted session, stdio shutdown, and the tool timeout.
  • Callbacks. Register with token.on_cancel(...), or poll token.cancelled / token.reason. Callbacks run on a thread of their own, off the event loop. A failing callback is logged and audited as cancel_callback_failed.
  • At shutdown, the transports give tool threads and cancel callbacks a bounded time to finish (stdio's shutdown_timeout, 5 s over HTTP/SSE), so a KILL QUERY gets out before the process exits. If you drive dispatch yourself, call await server.wait_for_tool_threads(5) before exiting.
  • Tools that ignore the token behave as before, apart from the thread changes below.

The connectors stop the statement

Connector On cancel or timeout
MySQL / MariaDB KILL QUERY at once, not only at the deadline
Postgres a cancel request (cancel_safe on psycopg 3.2+, cancel on 3.1)
SQLite interrupt(); the progress handler also catches a cancel just before a statement starts
MongoDB each call runs in its own session, ended with killSessions (the read role is enough). It reaches the primary only, and calls the deployment refuses a session run without one, as in 0.3.0
GitHub no request is sent once a call is cancelled. A write already sent may still complete, and the audit log records it as tool_finished_after_cancel

Live-tested against MySQL 8.4, Postgres 16 and MongoDB 7 with least-privilege accounts (SELECT-only, a plain login role, read), on Windows and on Linux with Python 3.12 and 3.14. After a cancel, the query is gone from PROCESSLIST / pg_stat_activity / $currentOp within 1.5 s. That includes a stdio client that quits mid-query. On 0.3.0 the same tests show the query still running.

Changes to know about when upgrading

  • Sync tools run on a daemon thread each, capped by max_sync_workers (default 32, shared by all clients). A call beyond the cap is refused at once with ServerBusyError (-32008). 0.3.0 queued it, so retry refused calls after a short delay.
  • Threads a sync tool starts are daemons too, because Python threads inherit the flag. They are stopped at exit, where 0.3.0 waited for them. Pass daemon=False or use a ThreadPoolExecutor for work that must outlive the call.
  • A TimeoutError raised by a tool itself, such as a socket read, is reported as a tool failure instead of the server's -32005.
  • server.run() shuts down with SSE clients connected. It closes open legacy SSE streams first; before, Ctrl-C hung until a second one forced the exit. If you mount build_app() in another app, call wait_for_tool_threads from its shutdown.
  • MongoDB database_factory test doubles should accept session=. A double without start_session still works, without the kill.
  • Startup warning. The connectors warn when default_timeout is not longer than their statement timeout.

Full details are in CHANGELOG.md.

What's Changed

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@Mark007-R Mark007-R released this 27 Sep 08:02
201cc64

The first v0.3 release: the stateless MCP revision, and three new read-only database connectors.

pip install easy-mcp-kit                 # SQLite needs nothing more
pip install "easy-mcp-kit[mysql]"        # MySQL / MariaDB
pip install "easy-mcp-kit[mongodb]"      # MongoDB

Stateless MCP 2026-07-28

Served next to the initialize era on every transport, with nothing to configure. The era is chosen per request, so old and new clients share one server.

  • No handshake, no session. Each request carries its protocol version and client capabilities in _meta.
  • Discovery. server/discover reports the supported versions, capabilities and instructions. Results carry resultType, the server's identity, and ttlMs/cacheScope cache hints.
  • HTTP header checks. The MCP-Protocol-Version, Mcp-Method and Mcp-Name headers must each appear once and match the body (400 / -32020 otherwise), because a proxy may route on them.
  • Cancellation. Closing the connection cancels the call.
  • Verified with the official Python SDK 2.2 client in its auto, pinned and legacy modes, over HTTP and stdio.

New connectors

All three are read-only by construction, time-limited and row-capped. Each was live-tested against a real server with deliberately over-privileged accounts.

  • easy-mcp-sqlite. Needs no extra and no server; point it at a database file. The file is opened read-only, and an authorizer admits only reads, so writes, schema changes and ATTACH to other files are refused.
  • easy-mcp-mysql. Every statement runs in a rolled-back READ ONLY transaction, plus a check that admits only reading statements. Testing showed a read-only transaction still lets a privileged account run SET GLOBAL or SELECT ... INTO OUTFILE. KILL QUERY enforces the time limit on every statement type.
  • easy-mcp-mongodb. Only read operations are offered. Aggregation stages come from a reading allow-list checked through nested pipelines, so $out and $merge are refused and no stage can reach another database. Server-side JavaScript is refused, and values travel as Extended JSON both ways.

Also

  • A tools/call sent without an id no longer runs the tool, on any transport.

Full details are in CHANGELOG.md.

What's Changed

Full Changelog: v0.2.5...v0.3.0

v0.2.5

Choose a tag to compare

@Mark007-R Mark007-R released this 23 Sep 09:00
73e76d8

A patch release, so that the easy-mcp run command added in 0.2.4 actually has a working invocation.

Fixed

  • python -m easy_mcp and python -m easy_mcp.cli now run the command. cli.py shipped without a __main__ guard, so python -m easy_mcp.cli imported the module and exited without serving anything — printing nothing and returning 0, which leaves a client that spawned it seeing only a closed connection.

Why this matters beyond tidiness: the easy-mcp command is a generated .exe on Windows, and application-control policies refuse to launch one out of a freshly created virtualenv (WinError 4551). With the launcher blocked and python -m a silent no-op, 0.2.4 had no working way to start its own CLI on such a machine. Both halves were hit for real while recording the 0.2.4 demo. The ready-made connectors already supported python -m; the new CLI now matches them.

No API changes — 0.2.4 code behaves identically.

pip install easy-mcp-kit==0.2.5
python -m easy_mcp run my_tools:server

v0.2.4

Choose a tag to compare

@Mark007-R Mark007-R released this 23 Sep 07:46
266e98c

Closes the v0.2 milestone: richer schemas on both sides of a tool call, and a way to launch a server without writing a __main__ block.

Added

  • Parameter descriptions from Annotated[T, "description"], alongside the docstring's Args: section. The annotation sits next to the parameter, so it cannot quietly stop applying when the parameter is renamed. Where both exist, the annotation wins.
  • Structured results. A tool whose return annotation describes a JSON object now publishes an outputSchema in tools/list and answers with structuredContent next to the text block the spec keeps for older clients. Results are validated against the schema before they are sent.
  • Optional Pydantic v2 models as whole parameters and return types, via the new easy-mcp-kit[pydantic] extra. The model's own schema is advertised — constraints included — and Pydantic does the validating, so every violation is reported rather than the first. The library never imports Pydantic; models are recognised by duck typing.
  • easy-mcp run my_tools:server, which imports a module and serves the server it defines. --transport picks stdio or HTTP per host; --host, --port and --debug override the module's own settings only when given.

Fixed

  • An Annotated parameter's description no longer vanishes from the generated schema. get_type_hints() strips annotation metadata unless asked not to, so the text was silently dropped and clients saw an undocumented parameter.

Everything is backwards compatible: a tool written against 0.1 registers and behaves exactly as before. Full detail in CHANGELOG.md.

pip install easy-mcp-kit==0.2.4

What's Changed

  • Refresh the demo video and code snapshots for 0.2.3 by @Mark007-R in #22
  • Harden supply chain: pin CI actions, add dependabot and lockfile by @Mark007-R in #23
  • Remove Dependabot config by @Mark007-R in #26
  • Read parameter descriptions from Annotated[T, "description"] by @Mark007-R in #27
  • Publish outputSchema and answer with structuredContent by @Mark007-R in #28
  • Accept Pydantic models as whole parameters and return types by @Mark007-R in #29
  • Add an easy-mcp run command for launching a module by @Mark007-R in #30
  • Release 0.2.4 by @Mark007-R in #31

Full Changelog: v0.2.3...v0.2.4

v0.2.3

Choose a tag to compare

@Mark007-R Mark007-R released this 17 Sep 06:09
676c545

Ready-made connectors

Two servers now ship with the package, each a normal MCPServer built with @server.tool and launchable with one command.

GitHub (easy-mcp-github)

  • list_repos, get_repo, list_issues, get_issue, list_pull_requests, get_pull_request, get_file
  • Reads GITHUB_TOKEN from the environment; works for public data without one. Standard-library HTTP only, so no new dependency.
  • Read-only by default. --allow-write adds create_issue and comment_on_issue, gated by the github:write scope; starting with --allow-write and no keys is refused.

Postgres (easy-mcp-postgres, install with pip install "easy-mcp-kit[postgres]")

  • list_schemas, list_tables, describe_table, query
  • Reads DATABASE_URL from the environment. Every statement runs in a READ ONLY transaction with a statement timeout (--statement-timeout, default 10 s) and a row cap (--max-rows, default 500).

Both take --transport {http,sse,stdio}, --host, --port, --rate-limit, --debug, and load API keys from EASY_MCP_API_KEYS. python -m easy_mcp.connectors.<name> works as well.

Fixed

  • mypy passes again and now runs in CI.
  • The sliding-window rate limiter forgets idle clients, so long-running public servers no longer grow memory with every client ever seen.
  • Opening a legacy SSE session now spends the client's rate-limit budget (429 + Retry-After), so an anonymous client cannot fill max_sessions.

Changed

  • API keys are compared as SHA-256 digests, so timing reveals neither partial matches nor key length.
  • Per JSON Schema, a number with no fractional part (3.0) is accepted for an int parameter and reaches the tool as int; validate_arguments returns the normalized arguments.
  • The version lives in one place (easy_mcp/_version.py); MCPServer.check_rate_limit() is public; transports are typed against MCPServer.
  • CI tests Python 3.11 through 3.14.

See CHANGELOG.md for details.

v0.2.2

Choose a tag to compare

@Mark007-R Mark007-R released this 10 Sep 15:58
7f5e20d

Docs release: the PyPI page now carries the current README.

  • MCP clients are described generically (desktop MCP hosts, CLI agents) across the README, SECURITY.md and docstrings
  • "Connecting a client" shows the MCP Inspector and a short client snippet using the official MCP Python SDK
  • No behavior changes since 0.2.1

Install or upgrade: pip install -U easy-mcp-kit (import name: easy_mcp)

What's Changed

  • Use generic MCP client wording in the docs by @Mark007-R in #17
  • Release 0.2.2 with the current README on PyPI by @Mark007-R in #18

Full Changelog: v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@Mark007-R Mark007-R released this 10 Sep 15:42
7855d5e

Streamable HTTP transport: the MCP spec's current HTTP transport, served at /mcp next to the legacy SSE endpoints.

  • server.run() now serves Streamable HTTP at /mcp plus the legacy /sse + /messages endpoints from one app, so new and old clients both connect; server.run("sse") keeps the legacy-only surface
  • Sessions via MCP-Session-Id: 192-bit ids bound to the credential that opened them, DELETE /mcp to end one, idle expiry (session_idle_timeout), max_sessions cap
  • Origin allowlist on every HTTP endpoint (allowed_origins, loopback origins by default) rejects DNS-rebinding requests with 403
  • Protocol negotiation for 2024-11-05 through 2025-11-25; unsupported MCP-Protocol-Version headers get 400; SUPPORTED_PROTOCOL_VERSIONS is exported
  • Legacy SSE fix: POST /messages answers 202 before the tool finishes, so notifications/cancelled can overtake a slow call
  • Verified against the official MCP Python SDK 2.2.0 and TypeScript SDK 1.30.0 clients
  • 13 new tests (99 total)

Backwards compatible with 0.2.0. Install or upgrade: pip install -U easy-mcp-kit (import name: easy_mcp)

What's Changed

  • Add Streamable HTTP transport and release 0.2.1 by @Mark007-R in #16

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@Mark007-R Mark007-R released this 03 Sep 11:12
8b57d29

stdio transport: run the same easy_mcp server as a child process of any local MCP host (desktop apps, CLI agents).

  • server.run("stdio") serves newline-delimited JSON-RPC over stdin/stdout; server.run() still serves HTTP + SSE
  • Shared dispatcher, so schema validation, scopes, rate limits, timeouts, payload caps and sanitized errors apply unchanged over stdio
  • Input lines capped at max_request_bytes; oversized lines are discarded unbuffered and answered with -32004
  • sys.stdout is redirected to stderr while serving, so a stray print() inside a tool cannot corrupt the protocol stream
  • Client credential via EASY_MCP_STDIO_API_KEY or StdioTransport(server, api_key=...); an invalid key aborts startup instead of downgrading to anonymous access
  • MCPServer.run() accepts "sse", "stdio", or a Transport instance; notifications/cancelled works mid-call over stdio
  • README: transports section with an MCP host config example; SECURITY.md: transport trust boundaries
  • 12 new tests including a real subprocess round trip (86 total)

Backwards compatible with 0.1.x. Install or upgrade: pip install -U easy-mcp-kit (import name: easy_mcp)

What's Changed

Full Changelog: v0.1.0...v0.2.0