Commit graph python-sdk/tests/server/test_session.py
Author SHA1 Message Date
Inna Harper
c067ef291e
Fix completions (#1107) 2025-07-09 11:15:49 +01:00
Frédéric Barthelet
906ceea388
fix: Expose completions capability (#865) 2025-07-07 09:26:22 +01:00
Marcelo Trylesinski
543961968c
Use 120 characters instead of 88 (#856) 2025-06-11 11:45:50 +02:00
ihrpr
6353dd192c
Servers to accept older versions of client (#722)
Some checks failed
Main branch checks / checks (push) Has been cancelled
2025-05-15 18:33:31 +01:00
ihrpr
da0cf22355
Wrap JSONRPC messages with SessionMessage for metadata support (#590) 2025-05-02 14:29:00 +01:00
David Soria Parra
568cbd1a66
Fix #201: Move incoming message stream from BaseSession to ServerSession (#325)
Co-authored-by: Claude <noreply@anthropic.com>
2025-03-24 14:14:14 +00:00
Marcelo Trylesinski
7196604468
Revert "refactor: reorganize message handling for better type safety and clar…" (#282)
Some checks failed
Main branch checks / checks (push) Has been cancelled
This reverts commit 9d0f2daddb.
2025-03-14 09:50:46 +00:00
David Soria Parra
9d0f2daddb
refactor: reorganize message handling for better type safety and clarity (#239)
Some checks failed
Main branch checks / checks (push) Has been cancelled
* refactor: improve typing with memory stream type aliases

Move memory stream type definitions to models.py and use them throughout
the codebase for better type safety and maintainability.

GitHub-Issue:#201

* refactor: move streams to ParsedMessage

* refactor: update test files to use ParsedMessage

Updates test files to work with the ParsedMessage stream type aliases
and fixes a line length issue in test_201_client_hangs_on_logging.py.

Github-Issue:#201

* refactor: rename ParsedMessage to MessageFrame for clarity

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: move MessageFrame class to types.py for better code organization

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* fix pyright

* refactor: update websocket client to use MessageFrame

Modified the websocket client to work with the new MessageFrame type,
preserving raw message text and properly extracting the root JSON-RPC
message when sending.

Github-Issue:#204

* fix: use NoneType instead of None for type parameters in MessageFrame

🤖 Generated with [Claude Code](https://claude.ai/code)

* refactor: rename root to message
2025-03-13 13:44:55 +00:00
David Soria Parra
2d8f08d648
fix: Address formatting and type checking issues 2025-01-03 15:23:58 +00:00
David Soria Parra
73c055f136
fix: Update AnyIO stream creation to use type annotation syntax 2025-01-02 16:59:26 +00:00
David Soria Parra
557e90d2e7
Integrate FastMCP
This commit integrates FastMCP, a high-level MCP server implementation originally written by Jeremiah Lowin,
into the official MCP SDK. It also updates dependencies and adds new dev dependencies.
It moves the existing SDK into a .lowlevel .
2024-12-21 00:41:38 +00:00
David Soria Parra
ec8c85edea
run ruff 2024-11-11 20:42:46 +00:00
David Soria Parra
f5d82bd229
Remove helper types
The helper types in mcp.server.types got really confusioning during
implementation as they overlapped with mcp.types. I now believe it
is better if we stay more low level to the spec types.

To do this, we now only use mcp.types everywhere. We renamed mcp.server.types
to mcp.server.models and removed it to the absolute minimum.
2024-11-11 20:05:51 +00:00
David Soria Parra
ed87ae9f06
rename mcp_python to mcp 2024-11-11 12:40:32 +00:00
David Soria Parra
5497da0afd
feat: add structured capability types
Replace generic capability dictionaries with structured types for prompts,
resources, tools, and roots. This improves type safety and makes capability
features like listChanged and subscribe more explicit in the protocol.
2024-11-07 14:49:40 +00:00
David Soria Parra
fd68df6687
Format with ruff 2024-10-11 16:14:11 +01:00
David Soria Parra
cc342a05ad
Allow passing initialization options to a session
We need a way for servers to pass initialization options to the session.
This is the beginning of this.
2024-10-11 16:06:54 +01:00
Justin Spahr-Summers
fed5304b09
Remove Python 3.12 syntax 2024-10-02 21:55:53 +01:00
David Soria Parra
4cbf815430
Initial import 2024-09-24 22:04:19 +01:00