Commit graph

12 commits

Author SHA1 Message Date
Jeremiah Lowin
9be42d9013
perf: reduce PBKDF2 iterations in tests, fix warnings and timeouts (#3504)
- Use 10 PBKDF2 iterations in test_mode (vs 1M in production) for
  JWT key derivation — cuts auth test setup from ~2.5s to <0.1s
- Add timeout(15) to subprocess-spawning tests (TestKeepAlive,
  test_mcp_config) that exceed 5s under parallel CI load
- Remove pytestmark filterwarnings overrides in tests/deprecated/
  that were leaking DeprecationWarning to test output
- Fix deprecated add_tool_transformation() usage in test_authorization
- Document new settings in settings.mdx
2026-03-14 16:42:06 -04:00
Yang Geonhee
d7674b3c0c Handle AuthorizationError as exclusion in AuthMiddleware list hooks 2026-03-01 13:23:02 -05:00
Jeremiah Lowin
50b23299f8
Support async auth checks (#3152)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-11 12:48:51 -05:00
Jeremiah Lowin
931d6f878c
Remove require_auth; fix auth docs re: component-level enforcement (#3103)
🤖 Generated with Claude Code

https://claude.ai/code/session_01WWzwcBfLWnxoN9XNs5Fhxr

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-06 20:08:50 -05:00
Jeremiah Lowin
c3111a8978
Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
Jeremiah Lowin
dada8893a9 Add MCP-compliant pagination for list operations
Server authors opt-in by setting list_page_size on FastMCP.
Client convenience methods auto-fetch all pages transparently.
Use _mcp methods with cursor parameter for manual pagination.
2026-01-17 19:30:24 -05:00
Jeremiah Lowin
3d98862995 Fix auth test to expect None instead of AuthorizationError 2026-01-17 14:25:29 -05:00
Jeremiah Lowin
5b24ea393d Refactor FastMCP to use inherited _get_* methods from Provider
- get_*() now does aggregation + component auth (raises AuthorizationError)
- Deleted _get_*() overrides - inherited from Provider applies transforms
- Simplified AuthMiddleware to global auth only
- Changed version params to VersionSpec | None (not str | None)
- Updated tests to use _get_*() where visibility filtering is expected
2026-01-17 12:15:01 -05:00
Jeremiah Lowin
ddd2058f97 Merge remote-tracking branch 'origin/main' into refactor-provider-inheritance-v2
# Conflicts:
#	src/fastmcp/server/server.py
2026-01-17 08:41:58 -05:00
Jeremiah Lowin
6ba5e5d194 Fix type errors and add type ignore comments
- Add None checks in auth and tool transform tests
- Add assertions in component_service.py for None returns
- Add type ignore comments for max() with version_sort_key
2026-01-17 07:23:29 -05:00
Jeremiah Lowin
85f32959b1 Refactor FastMCP to inherit from Provider
FastMCP now properly inherits from Provider, eliminating ~200 lines of
duplicated _source_* methods. Key changes:

- get_tool/resource/prompt return None instead of raising NotFoundError
- Visibility filter separated from transforms (applied last)
- Nested server middleware runs on both list and execution operations
- Resource auth failure doesn't fall back to templates
- AggregateProvider kept as user-facing utility class
2026-01-16 16:50:56 -05:00
Jeremiah Lowin
766641a1a5
Add authorization checks to components and servers (#2855) 2026-01-12 19:56:52 -05:00