Commit graph

2,670 commits

Author SHA1 Message Date
Chris Guidry
e21a6c0530 Bump docket to main branch for CI testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 10:01:03 -05:00
Jeremiah Lowin
280885db59
fix: wire up dereference_refs() in tool schema pipeline (#3170) v2.14.6 2026-02-12 15:50:59 -06:00
SrzStephen
392d38326d
Use MemoryStore for OAuth proxy tests (#3111)
Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-02-09 21:07:32 -05:00
SrzStephen
05eefe3330
Updated deprecation URL for V2 (#3109)
* Updated deprecation URL for V2

For V3 this should be https://gofastmcp.com/servers/dependency-injection#using-depends
For V2 this should be https://gofastmcp.com/v2/servers/context#using-depends

current url fails for both v2 and v3 documentation

https://gofastmcp.com/servers/dependencies
https://gofastmcp.com/v2/servers/dependencies

* Updated url to point to v2 docs as outlined in review https://github.com/jlowin/fastmcp/pull/3109#pullrequestreview-3766965732
2026-02-07 08:19:15 -05:00
Jeremiah Lowin
21221b4ab1
Add release notes for v2.14.4 and v2.14.5 (#3063) v2.14.5 2026-02-03 10:34:12 -05:00
Chris Guidry
7d32409505
Merge pull request #2992 from jlowin/pydocket-github-validation
Bump pydocket to 0.17.2 (memory leak fix)
2026-01-26 11:32:38 -05:00
Chris Guidry
65d6f0654d Bump pydocket to >=0.17.2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:13:31 -05:00
Chris Guidry
5f680787f1 Bump pydocket to >=0.17.2b3
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:55:39 -05:00
Chris Guidry
0afa02908e Make read_resource test flexible for MCP version differences
MCP 1.26+ includes "meta":null in serialization, earlier versions don't.
Parse JSON and check the meaningful fields instead of exact string match.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 16:48:23 -05:00
Chris Guidry
7ad97d92cd Update test snapshot for MCP 1.26.0 serialization change
MCP 1.26.0 now includes `meta: null` in ReadResourceContents JSON
serialization. Update the test snapshot to match.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 16:45:04 -05:00
Chris Guidry
cd0274c0da Bump pydocket to >=0.17.2b2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 16:12:48 -05:00
Chris Guidry
f1a89eb84b Bump pydocket to >=0.17.2b1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 08:11:35 -05:00
Chris Guidry
c9ed36e651 Point to fix-cancellation-handling branch
Updates pydocket dependency to the new branch with proper asyncio
cancellation handling that works on Python 3.10+.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:31:16 -05:00
Chris Guidry
8cec853c58 Point to fix-redis-connection-guards branch
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:50:01 -05:00
Chris Guidry
006b1ae3d9 Install pydocket from GitHub for 0.17 compatibility testing
Temporarily pulls pydocket from chrisguidry/docket to explore
compatibility with the upcoming 0.17 release.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:48:37 -05:00
Jeremiah Lowin
ab935b3a5b
Add missing packaging dependency (#2989) v2.14.4 2026-01-22 12:25:06 -05:00
Chris Guidry
0e5677cefb
Merge pull request #2874 from jlowin/fix-task-capabilities-2.x
Fix task capabilities location (issue #2870)
2026-01-14 09:18:03 -05:00
Jeremiah Lowin
b0b68269cd Add type ignores for extra_data kwargs 2026-01-13 22:54:53 -05:00
Jeremiah Lowin
ed72c4b668 Fix type: use TasksCallCapability instead of dict 2026-01-13 22:51:47 -05:00
Jeremiah Lowin
dec3c6d449 Fix task capabilities location (issue #2870)
Tasks belong in capabilities.tasks (first-class field) per SEP-1686,
not capabilities.experimental.tasks. This fixes VS Code Copilot 1.107+
integration which checks capabilities.tasks?.requests?.tools?.call.

Changes:
- Update get_task_capabilities() to return ServerTasksCapability types
- Override get_capabilities() in LowLevelServer to set tasks field
- Remove experimental_capabilities parameter usage
- Update test to verify correct location

Fixes #2870
2026-01-13 22:25:52 -05:00
Jeremiah Lowin
bc2f601e52
Backport: Dereference $ref in tool schemas for MCP client compatibility (#2861) 2026-01-13 07:46:36 -05:00
Jeremiah Lowin
559b778135
Add release notes for v2.14.2 and v2.14.3 (#2851) 2026-01-12 17:57:33 -05:00
Jeremiah Lowin
e6005703e7
Fix HTTP transport timeout defaulting to 5 seconds (#2848) v2.14.3
Fixes #2842, fixes #2845
2026-01-12 12:18:59 -05:00
Chris Guidry
9e86dbcabb
Merge pull request #2843 from jlowin/debug-task-lifecycle
Fix ContextVar propagation for ASGI-mounted servers with tasks
2026-01-12 10:38:44 -05:00
Chris Guidry
964b23b071
Merge branch 'release/2.x' into debug-task-lifecycle 2026-01-12 10:32:57 -05:00
Chris Guidry
c127dd979f Remove debug logging, keep minimal ContextVar fix
Removes all the verbose debug logging added during diagnosis while
preserving the essential fix: Context.__aenter__ sets _current_docket
and _current_worker from server instance attributes. This ensures
ContextVars work in ASGI environments where lifespan and request
handlers run in sibling async contexts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:21:04 -05:00
Chris Guidry
7b24bd58c8 Make all task handlers consistent with debug logging
All three handlers (tool, prompt, resource) now have identical patterns:
- Debug logging for docket access, Redis writes, docket.add, subscriptions
- Try/except with traceback logging around Redis and docket operations
- Consistent error messages with instance_id

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:00:42 -05:00
Chris Guidry
687889c598 Simplify ContextVar management - trust Context to set them at request time
Remove redundant ContextVar handling:
- _lifespan_manager no longer re-sets ContextVars in early-return branch
- Handler fallback logic removed (no more `if docket is None: docket = server._docket`)

The authoritative place for request-context ContextVars is now Context.__aenter__,
which sets _current_docket and _current_worker from server instance attributes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 09:59:11 -05:00
Jeremiah Lowin
df5765cef3
Use pip instead of uv pip in upgrade instructions (#2841) 2026-01-10 18:15:28 -05:00
Jeremiah Lowin
7628c4380f
Add CLI update notifications (#2839) 2026-01-10 18:11:40 -05:00
Chris Guidry
5cea6ba575 Bump pydocket to >=0.16.6 for py-key-value Redis username workaround
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:10:53 -05:00
Chris Guidry
6824d56aec Bump pydocket to >=0.16.5 for Redis ACL fix
pydocket 0.16.5 fixes an issue where worker_group_name was passed as
a KEY instead of ARGV in Lua scripts, causing ACL failures when Redis
users are restricted to key patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:06:02 -05:00
Chris Guidry
c72b5dd7f0 Add detailed logging around docket.add() and subscription tasks
Tracing where the Redis ACL error occurs - the initial Redis writes
succeed but error happens somewhere after.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:37:09 -05:00
Chris Guidry
726976a99f Add verbose Redis error logging with full traceback
When Redis operations fail, log the full traceback to help diagnose
ACL and permission issues in production environments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:28:52 -05:00
Chris Guidry
6e8c60b65e Add verbose logging to Context for debugging Lambda ContextVar issue
Adds detailed logging to Context.__aenter__ and __aexit__ to track:
- When Context is entered/exited
- Values of server._docket and server._worker
- ContextVar values before and after setting
- Token values for debugging reset issues

This will help diagnose why ContextVars might not propagate in Lambda.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:05:57 -05:00
Chris Guidry
b32f7f5f99 Set docket/worker ContextVars at request time in Context
Instead of relying on ContextVar propagation from lifespan (which fails
in Lambda), set _current_docket and _current_worker when entering a
Context for each request. This ensures user dependencies like
CurrentDocket() and CurrentWorker() work in all environments.

The values come from server._docket and server._worker which are always
available after lifespan initialization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:03:52 -05:00
Chris Guidry
4c169a80de Add server._docket fallback for Lambda ContextVar issue
ContextVars set during lifespan don't propagate to request handlers
in Lambda (works fine locally). As a workaround, fall back to using
server._docket when the ContextVar returns None.

This is a Lambda-specific issue - possibly related to how Lambda Web
Adapter or Lambda's asyncio runtime handles context propagation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:02:32 -05:00
Chris Guidry
fc4d0114db Fix ContextVar propagation for nested ASGI lifespan calls
When FastMCP runs with uvicorn, the lifespan is entered twice:
1. FastMCP's outer context (during http_app setup)
2. Starlette's ASGI lifespan (which request handlers inherit from)

The second call was skipping ContextVar setup because _lifespan_result_set
was already True. This caused _current_docket.get() to return None in
request handlers even though server._docket was correctly set.

Fix: Always set ContextVars when entering _lifespan_manager, using the
already-initialized values from self._docket and self._worker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:47:01 -05:00
Chris Guidry
8e927fbfed Add debug logging for task lifecycle 2026-01-09 11:27:15 -05:00
Chris Guidry
3df88260eb
Prefix Redis keys with docket name for ACL isolation (#2812)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:04:15 -05:00
Jeremiah Lowin
ae255277cc
Backport OAuth token storage TTL fix to release/2.x (#2798)
Fixes #2670, #2682
2026-01-06 17:46:58 -05:00
Jeremiah Lowin
e3a4e596fc
Add debug logging for OAuth token expiry diagnostics (#2789) 2025-12-31 13:37:53 -05:00
Adam Azzam
99832a9faf
Merge pull request #2787 from jlowin/confernece-to-2.x-branch v2.14.2
conference to 2.x branch
2025-12-30 22:09:15 -06:00
Adam Azzam
7fd365c868 Update docs.json 2025-12-30 21:41:01 -05:00
Jeremiah Lowin
9cf9aa9b37
Lazy import DiskStore to avoid sqlite3 dependency on import (#2785) 2025-12-30 19:20:10 -05:00
Jeremiah Lowin
1b637522d1
Fix base_url fallback when url is not set (#2776) (#2782)
Co-authored-by: Taisei Mima <bhbstar.me@gmail.com>
fix for httpx.URL("") being truthy but stringifying to empty string.
2025-12-30 17:51:57 -05:00
Jeremiah Lowin
33ff356c0f
Fix titled enum elicitation schema to comply with MCP spec (#2774) 2025-12-29 09:46:20 -05:00
Jeremiah Lowin
820f74e8ed
[BugFix] Fix openapi_version Check So 3.1 Is Included (#2768) (#2769)
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2025-12-28 07:39:21 -05:00
Jeremiah Lowin
bbf6c200ee
Update CLI banner with FastMCP 3.0 notice (#2765) 2025-12-26 22:13:05 -05:00
Jeremiah Lowin
97327893bb
Fix OAuth Proxy resource parameter validation (#2763) 2025-12-26 21:24:08 -05:00