Commit graph

548 commits

Author SHA1 Message Date
Jeremiah Lowin
10c868274b Ensure close() cleans up clients 2025-05-31 18:03:14 -04:00
William Easton
72e999d4be
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-31 15:48:43 -05:00
William Easton
b086dd4f32
Add content tests, fix array wrapping single objects 2025-05-31 14:39:54 -05:00
Sillocan
b6c110fa0e
Merge branch 'jlowin:main' into main 2025-05-30 18:48:06 -07:00
Sillocan
90dd0c04f3 fix: Use a background task for managing session state mimicing stdiotransport 2025-05-30 18:47:13 -07:00
Jeremiah Lowin
b8e1e8114b Fix issue when client info is written but flow is incomplete 2025-05-30 21:38:17 -04:00
Jeremiah Lowin
f779624a74 Add client factory 2025-05-30 21:17:51 -04:00
Jeremiah Lowin
62eea7a20b Clean up 2025-05-30 20:08:42 -04:00
Jeremiah Lowin
334163a4b7 Add basic server primitives 2025-05-30 14:23:34 -04:00
Jeremiah Lowin
1aeb61be5a Update token cache 2025-05-30 13:24:43 -04:00
Jeremiah Lowin
c438987d4e Add callback server 2025-05-30 13:03:01 -04:00
Jeremiah Lowin
a842241a54 OAuth client 2025-05-30 10:42:26 -04:00
Jeremiah Lowin
0c8469ea4c Merge branch 'main' into oauthclient 2025-05-29 17:40:26 -04:00
deepak-stratforge
2233b5844b feat(tool): validate and enforce default values
- Added validation to ensure all parameters listed in `exclude_args` exist in the function.
- Ensured parameters in `exclude_args` have default values to avoid runtime errors.
- Added test.
2025-05-29 20:05:18 +05:30
deepak-stratforge
138316715e feat(tool): add support for excluding arguments from tool definition
This introduces an `exclude_args` parameter to omit specified arguments
(such as `state`, `memory`, etc.).

It will exclude the mentioned args from the schema sent to the LLM and still allow them
to be passed when the tool is called.

This doesn't come with the MCP protocol but can be useful in many use cases.
2025-05-29 15:32:46 +05:30
nate nowack
b3d0f5beca
Merge pull request #625 from ksawaray/support-uppercase
Support for uppercase letters at the log level
2025-05-28 22:46:02 -05:00
Kyoji Ogasawara
78610a2791 Support for uppercase letters at the log level
Previously, fastmcp commands using uppercase log levels would fail to execute.

This update adds support for uppercase letters in log level
specifications.

e.g.
fastmcp run --transport streamable-http --host 0.0.0.0 -p 8000 --log-level DEBUG examples/echo.py
2025-05-29 11:27:56 +09:00
Jeremiah Lowin
975f151a9b Reset session after closing 2025-05-28 22:02:03 -04:00
Jeremiah Lowin
441223f98c Update docstrings 2025-05-28 22:01:00 -04:00
Jeremiah Lowin
9bbd417129 Add keep_alive param to reuse subprocess 2025-05-28 21:46:40 -04:00
Jeremiah Lowin
a3450b4b25 Improve type inference 2025-05-28 21:15:47 -04:00
Jeremiah Lowin
432dd4dd2d Improve type inference from client transport 2025-05-28 21:05:34 -04:00
Jeremiah Lowin
586072f605
Merge branch 'main' into headers 2025-05-28 18:43:52 -04:00
Jeremiah Lowin
ed2b9176cd
Update src/fastmcp/server/dependencies.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-28 18:43:41 -04:00
Jeremiah Lowin
d311a2b878 Ensure behavior-affecting headers are excluded 2025-05-28 18:30:33 -04:00
Jeremiah Lowin
c4d941f671
Merge pull request #605 from davenpi/fix-unreachable-mounted-servers
Add graceful error handling for unreachable mounted servers
2025-05-28 16:07:30 -04:00
Jeremiah Lowin
aaad41b577
Merge pull request #615 from jlowin/print-env
Don't print env vars to console when format is wrong
2025-05-28 15:46:37 -04:00
Jeremiah Lowin
2b547309ec Don't print env vars to console when format is wrong 2025-05-28 08:40:22 -04:00
Jeremiah Lowin
7718ad348d
Merge pull request #610 from jlowin/fix-tools-without-descriptions
Fix handling tools without descriptions
2025-05-27 14:30:24 -04:00
Jeremiah Lowin
32f6945336 Update tool.py 2025-05-27 13:04:17 -04:00
Jeremiah Lowin
4671741d42
Update src/fastmcp/tools/tool.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-27 13:03:15 -04:00
davenpi
bfef774c11 Remove exceptions from execution methods. 2025-05-27 09:24:57 -04:00
Jeremiah Lowin
05288fc507 Fix handling tools without descriptions 2025-05-27 09:08:24 -04:00
Jeremiah Lowin
bf68db2df0 Fix docstring 2025-05-27 08:47:04 -04:00
Jeremiah Lowin
8236b4a1fe Update settings.py 2025-05-27 08:46:24 -04:00
Jeremiah Lowin
a392f78d07 Add global setting 2025-05-27 08:43:31 -04:00
davenpi
b7607af17a Handle unreachable mounted servers. 2025-05-27 08:25:52 -04:00
jfouret
fc110e46d4 types, None type impossible for init_timeout 2025-05-27 11:00:41 +02:00
jfouret
68636536df ruff format src/fastmcp/client/client.py 2025-05-27 10:56:01 +02:00
jfouret
188974d55e add init_timeout for mcp client 2025-05-27 10:45:52 +02:00
Jeremiah Lowin
3475d1bef8 Update dependencies.py 2025-05-24 07:43:52 -04:00
Jeremiah Lowin
307a3b908a Ensure content-length is always stripped from client headers 2025-05-24 07:38:34 -04:00
Jeremiah Lowin
794ef3f114 Match functions and methods 2025-05-23 19:00:54 -04:00
Jeremiah Lowin
010170337f Ensure that tools/templates/prompts are compatible with callable objects 2025-05-23 18:53:55 -04:00
Jeremiah Lowin
c9d82d8ab8 add name tests 2025-05-23 17:24:42 -04:00
Jeremiah Lowin
157e5e1586 Update name generation 2025-05-23 17:10:39 -04:00
Jeremiah Lowin
9c3e90f018 Update transports.py 2025-05-23 16:11:56 -04:00
Jeremiah Lowin
e0ae84c75f Use lowercase name for headers 2025-05-23 16:02:42 -04:00
Jeremiah Lowin
b8e918a862 Ensure headers are passed through proxy servers 2025-05-23 15:39:45 -04:00
Jeremiah Lowin
213abc4244 Pass client headers through to OpenAPI client 2025-05-23 12:38:24 -04:00