Commit graph python-sdk/src/mcp/server/lowlevel/server.py
Author SHA1 Message Date
Marcelo Trylesinski
37891f42a4
Add basic OpenTelemetry tracing for client and server requests (#2381) 2026-03-31 20:33:33 +00:00
Marcelo Trylesinski
e6235d1667
Propagate contextvars.Context through anyio streams without modifying SessionMessage (#2298) 2026-03-31 12:49:38 -04:00
Max Isbey
92c693bb73
fix: cancel in-flight handlers when transport closes in server.run() (#2306) 2026-03-20 13:37:32 +00:00
Max Isbey
62eb08e5b2
fix: don't send log notification on transport error (#2257) 2026-03-09 17:47:27 +00:00
Max Isbey
cc22bf5464
refactor: remove request_ctx ContextVar, thread Context explicitly (#2203)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-03-04 13:23:02 +00:00
Jonathan Hefner
c0328540c9
docs: fix docstrings across public API surface (#2095) 2026-02-19 06:45:59 +01:00
Max Isbey
705497a593
fix: allow null id in JSONRPCError per JSON-RPC 2.0 spec (#2056) 2026-02-17 10:30:34 +00:00
Max Isbey
0a22a9dc33
refactor: replace lowlevel Server decorators with on_* constructor kwargs (#1985) 2026-02-12 15:55:54 +00:00
Aaron Abbott
f049c8e5c6
Fix leaked anyio streams in streamable_http (#1991)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-02-11 14:52:07 +00:00
Marcelo Trylesinski
1a8c14a5b8
refactor: replace mcp.types as types to from mcp import types (#1986) 2026-02-03 16:42:29 +00:00
Marcelo Trylesinski
b1f7eec3cd
refactor: split RequestContext between server and client (#1987) 2026-02-03 14:35:07 +01:00
Marcelo Trylesinski
14744c66c5
Add tests for MCPServer.read_resource exception handling (#1957) 2026-01-27 13:49:06 +01:00
Marcelo Trylesinski
6f0e8e7851
refactor: code style improvements and formatting cleanup (#1962)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 13:48:52 +01:00
Marcelo Trylesinski
acba5478a9
refactor: McpError renamed to MCPError and flatten parameters (#1956)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-01-26 14:37:44 +01:00
Max Isbey
a7ddfdae07
ci: add strict-no-cover to detect unnecessary coverage pragmas (#1897) 2026-01-23 21:00:20 +01:00
Max Isbey
34e66a3812
refactor: move streamable HTTP app creation from FastMCP to lowlevel Server (#1899) 2026-01-19 18:48:04 +01:00
Marcelo Trylesinski
5fdd48a0d3
Completely drop RootModel from types module (#1910) 2026-01-19 14:29:15 +01:00
Felix Weinberger
d41d0c0128
chore: add D212 lint rule to enforce Google-style docstrings (#1892) 2026-01-16 16:10:52 +00:00
Max Isbey
5d80f4efc8
refactor: move inline imports to module level (#1893) 2026-01-16 14:54:08 +00:00
Marcelo Trylesinski
e94b386a13
refactor: use snake case instead of camel case in types (#1894) 2026-01-16 15:51:27 +01:00
Felix Weinberger
cfb2909631
fix: change Resource URI fields from AnyUrl to str (#1863) 2026-01-16 09:58:57 +01:00
Marcelo Trylesinski
32a4587da9
chore: drop as _annotations (#1858) 2026-01-15 10:07:06 +00:00
Yann Jouanin
0da9a074d0
Support for Resource and ResourceTemplate metadata (#1840)
Co-authored-by: Jacem Elwaar <jacem@mcpappsbuilders.com>
2026-01-12 14:45:31 +00:00
Yann Jouanin
3863f203e9
Server initialize response update to last spec (add title, description) (#1634) 2026-01-06 21:34:08 +00:00
Jay Hemnani
f397783c39
fix: add explicit type annotation for call_tool decorator (#1826)
Co-authored-by: Jay Hemnani <jayhemnani9910@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-01-06 21:11:36 +01:00
zenlytix
8ac0cab98c
Fix for Url Elicitation issue 1768 (#1780) 2025-12-15 18:58:17 +01:00
Felix Weinberger
281fd4765e
Add SSE polling support (SEP-1699) (#1654) 2025-12-02 11:44:49 +00:00
Max Isbey
c92bb2f7ff
SEP-1686: Tasks (#1645) 2025-11-28 18:51:58 +00:00
Felix Weinberger
091afb82dc
Implement SEP-986: Tool name validation (#1655) 2025-11-24 16:46:57 +00:00
Max Isbey
89e9c43acf
Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
Brandon Shar
1200ba0082
Allow CallToolResult to be returned directly to support _meta field for OpenAI Apps (#1459)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2025-10-21 18:52:08 +00:00
AishwaryaKalloli
b4e50aa9f9
Handles message type Exception in lowlevel/server.py _handle_message function. Mentioned as TODO on line 528. (#786)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
2025-10-13 14:29:03 +01:00
Peter Alexander
71889d7387
Implementation of SEP 973 - Additional metadata + icons support (#1357)
Some checks failed
Main branch checks / checks (push) Has been cancelled
2025-09-24 20:29:04 +01:00
Max Isbey
4fb975c6dc
feat: add paginated list decorators for prompts, resources, and tools (#1286)
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-23 14:58:06 +01:00
Christian Clauss
c47c767ff4
Python lint: Ruff rules for pylint and code complexity (#525) 2025-09-05 15:20:14 +01:00
Sreenath Somarajapuram
34e3664e69
chore: Remove unused variable notification_options (#1238) 2025-08-05 10:44:51 +01:00
Marcelo Trylesinski
959d4e39ae
Unpack settings in FastMCP (#1198)
Some checks failed
Main branch checks / checks (push) Has been cancelled
2025-07-26 10:37:48 +02:00
lukacf
b34e7207ad
server: skip duplicate response on CancelledError (#1153)
Co-authored-by: ihrpr <inna@anthropic.com>
2025-07-25 10:16:13 +01:00
Frédéric Barthelet
906ceea388
fix: Expose completions capability (#865) 2025-07-07 09:26:22 +01:00
bhosmer-ant
c8bbfc034d
Add schema validation to lowlevel server (#1005) 2025-06-25 09:23:49 -04:00
Inna Harper
d0443a1832
Add resource Link (#974) 2025-06-17 20:23:07 +01:00
Inna Harper
a3bcabdce2
Include context into completions (#966) 2025-06-17 09:33:25 +01:00
ihrpr
f3cd20c920
Rename ResourceReference to ResourceTemplateReference (#947) 2025-06-13 18:25:36 +01:00
Luca Chang
d69b290b65
chore: create union for working with message content (#939) 2025-06-12 09:01:33 +02:00
Marcelo Trylesinski
543961968c
Use 120 characters instead of 88 (#856) 2025-06-11 11:45:50 +02:00
Luca Chang
7123556a34
feat: support audio content (#725)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2025-06-07 14:32:11 +00:00
Samuel Colvin
544176770b
improve server logging (#867)
Some checks failed
Main branch checks / checks (push) Has been cancelled
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2025-06-02 08:03:18 +00:00
ihrpr
70014a2bbb
Support for http request injection propagation to tools (#816) 2025-05-28 15:59:14 +01:00
Akshey D
9e66f7ce89
feat: add message to ProgressNotification (#435)
Co-authored-by: ihrpr <inna.hrpr@gmail.com>
2025-05-13 18:40:15 +01:00
ihrpr
5d8eaf77be
Streamable Http - clean up server memory streams (#604) 2025-05-02 14:59:17 +01:00