Max Isbey
cfde91dacd
chore: exempt tests from ANN, enable mypy-init-return
...
Align with ecosystem norms per review feedback:
- Add mypy-init-return = true to skip -> None on __init__ when args are typed
- Exempt tests/** from ANN rules (near-universal practice)
- Revert test file annotations and __init__-only changes
Shrinks diff from 149 to ~47 files, keeping the valuable src/ return
type annotations that close the pyright gap.
2026-03-24 23:04:34 +00:00
Max Isbey
5697d68e65
chore: enforce type annotations on all functions via ruff ANN rules
...
Enable the `ANN` (flake8-annotations) rule set to require return type
and argument annotations on all function definitions. Pyright strict
already enforces argument types but infers return types silently; this
closes the gap so every function has an explicit return annotation.
Configuration choices:
- `ANN401` (any-type) is ignored: `Any` is sometimes the right answer
and pyright strict already catches genuine misuse.
- `allow-star-arg-any = true`: `*args: Any, **kwargs: Any` is a common
valid pattern for pass-through wrappers.
- Per-file ignores for `test_func_metadata.py` and `test_server.py` where
untyped parameters are intentional (testing schema inference on
unannotated signatures).
- README code snippets (via pytest-examples) exempt — short doc
examples shouldn't need full annotations.
Auto-fix added `-> None` or inferred return types to ~910 functions.
The remaining ~100 were annotated manually — mostly
`@asynccontextmanager` generators, pytest fixtures, and ASGI handlers
that Ruff couldn't infer.
2026-03-24 23:04:34 +00:00
Max Isbey
883d893097
test: rewrite cli.claude config tests to assert JSON output directly ( #2311 )
...
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Felix Weinberger <felixweinberger@users.noreply.github.com >
2026-03-19 15:16:34 +00:00
Max Isbey
20dd94632e
feat(client): store InitializeResult as initialize_result ( #2300 )
2026-03-18 17:31:26 +00:00
Max Isbey
67201a9bbd
test: fix WS test port race; narrow to single smoke test covering both transport ends ( #2267 )
2026-03-18 15:48:30 +00:00
Max Isbey
75a80b6f07
refactor: connect-first stream lifecycle for sse and streamable_http ( #2292 )
...
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com >
2026-03-16 23:30:20 +00:00
Max Isbey
e1fd62e0f3
fix: close all memory stream ends in client transport cleanup ( #2266 )
2026-03-13 14:43:54 +00:00
Max Isbey
dd52713517
Rewrite TestChildProcessCleanup with socket-based deterministic liveness probe ( #2265 )
2026-03-12 12:52:32 +00:00
Max Isbey
31a38b5078
fix: correct Context type parameters across examples and tests ( #2256 )
2026-03-09 16:52:56 +00:00
Giulio Leone
7c0224828b
fix(oauth): include client_id in token request body for client_secret_post ( #2185 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-05 14:57:33 +00:00
Max Isbey
cc22bf5464
refactor: remove request_ctx ContextVar, thread Context explicitly ( #2203 )
...
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com >
2026-03-04 13:23:02 +00:00
Jonathan Hefner
cb07adeca3
docs: add code fences to Example: docstring blocks ( #2104 )
2026-02-19 21:06:11 +01:00
Marcelo Trylesinski
2fe56e56de
fix: handle HTTP error status codes in streamable HTTP client ( #2047 )
2026-02-14 09:49:42 +01:00
Max Isbey
0a22a9dc33
refactor: replace lowlevel Server decorators with on_* constructor kwargs ( #1985 )
2026-02-12 15:55:54 +00:00
Felix Weinberger
239d682b6f
fix: pass conformance auth scenarios, add RFC 8707 resource validation ( #2010 )
2026-02-09 11:41:03 +00:00
Marcelo Trylesinski
7c7c13b648
fix: send JSONRPCError instead of bare exceptions in streamable HTTP client ( #2005 )
2026-02-09 10:38:46 +00:00
Marcelo Trylesinski
1a8c14a5b8
refactor: replace mcp.types as types to from mcp import types ( #1986 )
2026-02-03 16:42:29 +00:00
Marcelo Trylesinski
4fc49c62bd
feat: add ClientRequestContext type alias for client-side handlers ( #1989 )
2026-02-03 17:37:38 +01:00
Marcelo Trylesinski
b1f7eec3cd
refactor: split RequestContext between server and client ( #1987 )
2026-02-03 14:35:07 +01:00
Marcelo Trylesinski
21822053df
Support different transports in Client ( #1972 )
2026-01-30 12:11:27 +00:00
Marcelo Trylesinski
acba5478a9
refactor: McpError renamed to MCPError and flatten parameters ( #1956 )
...
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com >
2026-01-26 14:37:44 +01:00
Marcelo Trylesinski
65c614e48e
Rename FastMCP to MCPServer ( #1951 )
2026-01-25 14:45:52 +01:00
Max Isbey
a7ddfdae07
ci: add strict-no-cover to detect unnecessary coverage pragmas ( #1897 )
2026-01-23 21:00:20 +01:00
Marcelo Trylesinski
f0ab53e194
Add meta to Client methods ( #1923 )
2026-01-22 14:50:39 +01:00
Marcelo Trylesinski
d77292fb06
refactor: drop test classes ( #1924 )
2026-01-22 12:37:52 +01:00
Marcelo Trylesinski
bcb07c2b25
refactor: flatten the methods in Client ( #1914 )
2026-01-20 13:12:07 +01:00
Marcelo Trylesinski
5fdd48a0d3
Completely drop RootModel from types module ( #1910 )
2026-01-19 14:29:15 +01:00
Marcelo Trylesinski
f4672c5084
Drop RootModel from JSONRPCMessage ( #1908 )
2026-01-19 14:04:15 +01:00
Felix Weinberger
dcc9b4f8e0
refactor: use Client class in tests ( #1900 )
2026-01-17 09:46:58 +01:00
Felix Weinberger
d41d0c0128
chore: add D212 lint rule to enforce Google-style docstrings ( #1892 )
2026-01-16 16:10:52 +00:00
Felix Weinberger
df039bf97c
Add ergonomic Client class for testing MCP servers ( #1870 )
2026-01-16 15:49:26 +00:00
Max Isbey
5d80f4efc8
refactor: move inline imports to module level ( #1893 )
2026-01-16 14:54:08 +00:00
Marcelo Trylesinski
e94b386a13
refactor: use snake case instead of camel case in types ( #1894 )
2026-01-16 15:51:27 +01:00
Marcelo Trylesinski
812a46ab97
Remove deprecated cursor parameter and ResourceReference ( #1871 )
2026-01-15 21:33:21 +01:00
Marcelo Trylesinski
024d7597fd
Drop Content and args parameter in ClientSessionGroup.call_tool ( #1866 )
2026-01-15 16:24:53 +00:00
jnjpng
a9cc822a10
fix: accept HTTP 201 status code in token exchange ( #1503 )
...
Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com >
2025-12-19 18:22:00 +00:00
V
06748eb4c4
fix: Include extra field for context log ( #1535 )
2025-12-19 17:54:03 +00:00
Yugan
2aa1ad2a69
feat: standardize timeout values to floats in seconds ( #1766 )
2025-12-19 12:22:56 +00:00
Ondrej Mosnáček
65b36de4eb
fix: use correct python command name in test_stdio.py ( #1782 )
...
Main branch checks / checks (push) Failing after 0s
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com >
2025-12-12 14:02:38 +00:00
Marcelo Trylesinski
a3a4b8d11a
Add streamable_http_client which accepts httpx.AsyncClient instead of httpx_client_factory ( #1177 )
...
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com >
2025-12-10 16:39:00 +00:00
Jeremiah Lowin
0dedbd9831
feat: client-side support for SEP-1577 sampling with tools ( #1722 )
2025-12-09 23:36:28 +00:00
Max Isbey
8b984d93a3
refactor(auth): remove unused _register_client method ( #1748 )
2025-12-08 21:50:20 +00:00
Felix Weinberger
fa851d93a2
feat: backwards-compatible create_message overloads for SEP-1577 ( #1713 )
2025-12-02 13:17:45 +00:00
Paul Carleton
f82b0c9371
Support client_credentials flow with JWT and Basic auth ( #1663 )
...
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com >
2025-12-02 12:53:55 +00:00
Paul Carleton
f22501315e
feat: implement SEP-991 URL-based client ID (CIMD) support ( #1652 )
...
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com >
2025-11-24 17:21:03 +00:00
Jon Shea
c51936f61f
Add client_secret_basic authentication support ( #1334 )
...
Co-authored-by: Paul Carleton <paulc@anthropic.com >
2025-11-20 20:53:37 +00:00
Liang Wu
9c8f763aa8
chore: Lazy import jsonschema library ( #1596 )
...
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com >
2025-11-19 15:30:52 +00:00
Andrii Blyzniuk
5489e8b6fb
fix get_client_metadata_scopes on 401 ( #1631 )
...
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com >
2025-11-16 17:18:50 +00:00
inaku
a357380cfa
feat: Pass through and expose additional parameters in ClientSessionGroup.call_tool and .connect_to_server ( #1576 )
2025-11-16 15:57:43 +00:00
Max Isbey
91ccdb3d65
Fix OAuth discovery fallback and URL ordering ( #1624 )
2025-11-13 19:37:24 +00:00