Commit Graph

10 Commits

Author SHA1 Message Date
David Soria Parra
070e8412c0 refactor: standardize resource response format
Introduce ReadResourceContents type to properly handle MIME types in resource responses. Breaking change in FastMCP read_resource() return type.

Github-Issue:#152
2025-01-27 20:36:10 +00:00
David Soria Parra
8ff4b5e9d3 fix: respect resource mime type in responses
The server was ignoring mime types set on resources, defaulting to text/plain
for strings and application/octet-stream for bytes. Now properly preserves
the specified mime type in both FastMCP and low-level server implementations.

Note that this is breaks backwards compatibility as it changes the return
values of read_resource() on FastMCP. It is BC compatible on lowlevel since
it only extends the callback.

Github-Issue: #152
Reported-by: eiseleMichael
2025-01-27 15:51:44 +00:00
David Soria Parra
978cfe3f92 more fixes 2025-01-27 15:49:59 +00:00
David Soria Parra
43a30c1d00 fix tests 2025-01-27 14:36:48 +00:00
Salman Mohammed
bc6746e89b Add instructions field to ServerSession and FastMCP 2025-01-13 13:00:11 -05:00
David Soria Parra
329f595f5f fix: Fix line length in test_server.py 2025-01-03 15:53:19 +00:00
David Soria Parra
2d8f08d648 fix: Address formatting and type checking issues 2025-01-03 15:23:58 +00:00
David Soria Parra
43796bfa24 test: Add test for non-ASCII character handling in FastMCP tools 2025-01-03 15:20:43 +00:00
David Soria Parra
a79f51f55f style: Fix imports and line length formatting 2024-12-21 00:46:36 +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