Metadata-Version: 2.5
Name: fastmcp-events
Version: 4.2.6
Summary: Events for FastMCP servers and clients via the io.modelcontextprotocol/events extension (SEP-3415).
Project-URL: Homepage, https://gofastmcp.com
Project-URL: Repository, https://github.com/PrefectHQ/fastmcp
Project-URL: Documentation, https://gofastmcp.com
Author: Jeremiah Lowin, Nate Nowack
License-Expression: Apache-2.0
Keywords: events,fastmcp,fastmcp events,mcp,model context protocol
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: fastmcp-slim[mcp]==4.2.6
Provides-Extra: docket
Requires-Dist: pydocket>=0.29.1; extra == 'docket'
Requires-Dist: redis; extra == 'docket'
Description-Content-Type: text/markdown

# fastmcp-events

Events for FastMCP servers and clients: the `io.modelcontextprotocol/events` extension defined in [SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415), with poll and push delivery.

Experimental: the API may change in any release without a deprecation period.

```bash
pip install "fastmcp[events]"
# with the Redis-backed log, through Docket
pip install "fastmcp[events]" "fastmcp-events[docket]"
```

```python
from pydantic import BaseModel

from fastmcp import FastMCP
from fastmcp_events import EventsExtension

mcp = FastMCP("alerts")
events = EventsExtension()
mcp.add_extension(events)


@events.event("alert.fired")
class AlertFired(BaseModel):
    """An alert fired."""

    project: str


# later, in a tool or webhook handler:
# await events.emit(AlertFired(project="api"))
```

See the [Events docs](https://gofastmcp.com/servers/events).
