Install
Your first server
collect() registers them. No globals, no hidden state.
Using with Dedalus SDK
The fastest path to production is through the Dedalus Agents SDK:Connect a client
Script-style (no context manager required):Registration model
OpenMCP separates declaration from registration. The@tool decorator only attaches metadata. Registration happens when you call collect().
Capabilities
| Capability | What you get |
|---|---|
| Tools | Sync/async functions, JSON Schema inference, tags, allow-lists |
| Resources | Static URIs, templates, binary/text payloads, subscriptions |
| Prompts | Reusable chat templates with typed arguments |
| Completions | Argument completion for prompts and resource templates |
| Logging | Runtime log levels, structured messages |
| Progress | Token-based trackers with coalescing |
| Cancellation | Cooperative cancellation via context |
| Roots | Filesystem boundaries with path guards |
| Sampling | Request LLM completions from the client |
| Elicitation | Request structured user input mid-call |
Context
Inside a tool,get_context() returns a request-scoped helper:
ctx.debug(), ctx.info(), ctx.warning(), ctx.error(), ctx.progress().
Outside a request context, get_context() raises. You catch lifecycle bugs early.
Transports
Streamable HTTP (default):Authentication
Bearer token:Production checklist
- Set
NotificationFlagsfor dynamic list changes - Configure
TransportSecuritySettingsfor allowed hosts/origins - Add authorization via
AuthorizationConfigand a provider - Use
allow_dynamic_tools=Trueif you add tools at runtime - Call
notify_tools_list_changed()after dynamic mutations - Test with real MCP clients (Claude Desktop, Cursor)
Examples
| Scenario | Path |
|---|---|
| Minimal server | examples/showcase/01_minimal.py |
| Script-style client | examples/showcase/01_client.py |
| Bidirectional (sampling) | examples/showcase/02_bidirectional_* |
| Real-time tool updates | examples/showcase/03_realtime_* |
| Typed tools + Pydantic | examples/capabilities/tools/01_typed_tools.py |
| Tags and filtering | examples/capabilities/tools/02_tags_and_filtering.py |
| Testing patterns | examples/patterns/testing.py |
| Multi-server setup | examples/patterns/multi_server.py |
| MCP server chaining | examples/advanced/llm_chain.py |