Commit Graph

29 Commits

Author SHA1 Message Date
Max Isbey 89e9c43acf Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
Brandon Wu b8e758b02b feat: add ability to remove tools (#1322)
Co-authored-by: David Soria Parra <167242713+dsp-ant@users.noreply.github.com>
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-06 14:16:50 +01:00
pchoudhury22 ca5cb4cb67 fix(fastmcp): propagate mimeType in resource template list (#1186)
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
2025-09-17 14:50:41 +01:00
David Soria Parra c3717e7ad3 Fix context injection for resources and prompts (#1336)
Main branch checks / checks (push) Failing after 0s
2025-09-11 14:30:06 +01:00
xavier f4b2957a20 Added Audio to FastMCP (#1130) 2025-08-22 11:45:38 +01:00
Marcelo Trylesinski c7671e470c Add pyright strict mode on the whole project (#1254) 2025-08-11 18:56:37 +01:00
yurikunash fd11eca766 Update routing for streamable HTTP to avoid 307 redirect (#1115)
Co-authored-by: ihrpr <inna@anthropic.com>
2025-07-11 11:49:24 +01:00
Megan Dsouza f55831ee79 Adding description field to the FastMCP get_prompt method (#614)
Co-authored-by: ihrpr <inna@anthropic.com>
2025-07-09 20:50:38 +01:00
Inna Harper adf327164a Embed code snippets for README from executable examples (#1055) 2025-07-04 17:25:54 +01:00
bhosmer-ant 43bb24f62b feat: Add structured output support for tool functions (#993) 2025-06-26 09:36:17 +01:00
Inna Harper d0443a1832 Add resource Link (#974) 2025-06-17 20:23:07 +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
gaojingyu 1bdeed33c2 fix: Update @mcp.resource to use function documentation as default descrip… (#489) 2025-05-15 11:14:50 +01:00
tim-watcha e0d443c95e Add mount_path support for proper SSE endpoint routing with multiple FastMCP servers (#540)
Co-authored-by: ihrpr <inna.hrpr@gmail.com>
2025-05-07 11:14:25 +01:00
ihrpr 78f0b11a09 StreamableHttp - Server transport with state management (#553) 2025-05-02 11:58:54 +01:00
Marcelo Trylesinski ae77772ea8 Add strict mode to pyright (#315)
* Add strict mode to pyright

* Apply UP rule

* fix readme

* More correct

* Leave wrong Context for now

* Add strict mode to pyright

* Apply UP rule

* fix readme

* fix

* ignore
2025-03-20 09:13:08 +00:00
David Soria Parra b1942b31c4 Fix #177: Returning multiple tool results (#222)
* feat: allow lowlevel servers to return a list of resources

The resource/read message in MCP allows of multiple resources
to be returned. However, in the SDK we do not allow this. This
change is such that we allow returning multiple resource in
the lowlevel API if needed. However in FastMCP we stick to
one, since a FastMCP resource defines the mime_type in the decorator
and hence a resource cannot dynamically return different mime_typed resources.
It also is just the better default to only return one resource.
However in the lowlevel API we will allow this.

Strictly speaking this is not a BC break since the new return value
is additive, but if people subclassed server, it will break them.

* feat: lower the type requriements for call_tool to Iterable
2025-02-20 21:31:26 +00:00
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