Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
58b989c
Fix `lifespan_context` access example in README (#437)
SigureMo Apr 9, 2025
d6e611f
Match ruff version on CI and local (#471)
Kludex Apr 10, 2025
da54ea0
Allow generic parameters to be passed onto `Context` on FastMCP tools
jkawamoto Apr 10, 2025
c4beb3e
Support custom client info throughout client APIs (#474)
jerome3o-anthropic Apr 10, 2025
70115b9
Fix tests for Pydantic 2.11 (#465)
medaminezghal Apr 11, 2025
8c9269c
Move uvicorn import to usage (#502)
danlapid Apr 15, 2025
babb477
Python lint: Ruff rules for comprehensions and performance (#512)
cclauss Apr 15, 2025
b4c7db6
Format files with ruff (#562)
ihrpr Apr 23, 2025
697b6e8
replace inefficient use of `to_jsonable_python` (#545)
samuelcolvin Apr 26, 2025
96e5327
add a timeout arguments on per-request basis (as per MCP specificatio…
grll Apr 29, 2025
0171354
add pytest-pretty dev dependency (#546)
samuelcolvin Apr 29, 2025
1a330ac
Add ToolAnnotations support in FastMCP and lowlevel servers (#482)
bhosmer-ant Apr 30, 2025
82bd8bc
Properly clean up response streams in BaseSession (#515)
bhosmer-ant May 1, 2025
2210c1b
Add support for serverside oauth (#255)
praboud-ant May 1, 2025
78f0b11
StreamableHttp - Server transport with state management (#553)
ihrpr May 2, 2025
72b66a5
StreamableHttp - stateless server support (#554)
ihrpr May 2, 2025
46523af
StreamableHttp - GET request standalone SSE (#561)
ihrpr May 2, 2025
9dfc925
StreamableHttp client transport (#573)
ihrpr May 2, 2025
3978c6e
StreamableHttp -- resumability support for servers (#587)
ihrpr May 2, 2025
da0cf22
Wrap JSONRPC messages with SessionMessage for metadata support (#590)
ihrpr May 2, 2025
cf8b66b
use metadata from SessionMessage to propagate related_request_id (#591)
ihrpr May 2, 2025
74f5fcf
StreamableHttp - client refactoring and resumability support (#595)
ihrpr May 2, 2025
5d8eaf7
Streamable Http - clean up server memory streams (#604)
ihrpr May 2, 2025
83968b5
Handle SSE Disconnects Properly (#612)
akash329d May 2, 2025
58c5e72
SSE FastMCP - do not go though auth when it's not needed (#619)
ihrpr May 2, 2025
3b1b213
Add message queue for SSE messages POST endpoint (#459)
akash329d May 7, 2025
e0d443c
Add mount_path support for proper SSE endpoint routing with multiple …
tim-watcha May 7, 2025
c8a14c9
docs: fix broken link to OAuthServerProvider in Authentication sectio…
samad-yar-khan May 7, 2025
9d99aee
Revert "Add message queue for SSE messages POST endpoint (#459)" (#649)
ihrpr May 7, 2025
a1307ab
Fix the issue of get Authorization header fails during bearer auth (#…
yabea May 7, 2025
a027d75
Auth SSE simple server example (#610)
ihrpr May 7, 2025
280bab3
Fix: Use absolute path to uv executable in Claude Desktop config (#440)
arcAman07 May 8, 2025
e4e119b
Streamable HTTP - improve usability, fast mcp and auth (#641)
ihrpr May 8, 2025
72003d9
StreamableHttp - update docs (#664)
ihrpr May 8, 2025
ed25167
Introduce a function to create a standard AsyncClient with options (#…
ihrpr May 8, 2025
c6fb822
Fix streamable http sampling (#693)
ihrpr May 12, 2025
76919cf
Fix typo in authentication section of README (#676)
mopg May 12, 2025
f745d69
fix: 204 is an acceptable response to DELETEing the session (#697)
nbarbettini May 12, 2025
5289d06
Minor tweaks to README for Streamable HTTP (#690)
evalstate May 12, 2025
1cb7407
Properly infer prefix for SSE messages (#659)
jlowin May 12, 2025
fdb538b
Simple Auth Example to use shttp in addition to sse (#695)
ihrpr May 12, 2025
7b6a903
Create `ClientSessionGroup` for managing multiple session connections…
mkeid May 13, 2025
173e0ee
fix typo: server has get_context attribute instead of request_context…
shimizukawa May 13, 2025
8b58386
docs: clarify LLM API configuration in mcp_simple_chatbot README (#487)
ddltn May 13, 2025
37b54b4
fix: Add checks and better error messages on server object for mcp ru…
john0312 May 13, 2025
c578212
Fix hanging on streams when stdio_client exiting (#559)
LionNatsu May 13, 2025
9e66f7c
feat: add message to ProgressNotification (#435)
aksheyd May 13, 2025
b8f7b02
Update CI configuration to support multiple OS environments (#708)
DanielAvdar May 14, 2025
a00b20a
feat: add cursor pagination support to all client list methods (#718)
jerome3o-anthropic May 15, 2025
0a388b6
Add example for stateless server with JSON response (#704)
5enxia May 15, 2025
b3fbee9
Include server examples folder in pyright check (#667)
ihrpr May 15, 2025
13f0182
Set 2025-03-26 as the latest protocol version (#719)
ihrpr May 15, 2025
c2f8730
Fix example for multiple stateless servers (#720)
ihrpr May 15, 2025
1bdeed3
fix: Update @mcp.resource to use function documentation as default de…
jingyugao May 15, 2025
5d33861
Add progress notification callback for client (#721)
ihrpr May 15, 2025
6353dd1
Servers to accept older versions of client (#722)
ihrpr May 15, 2025
e33cd41
Add OAuth authentication client for HTTPX (#751)
ihrpr May 19, 2025
5a9340a
fastmcp: allow passing Tool directly to FastMCP constructor (#699)
vbarda May 20, 2025
43ded92
add auth client sse (#760)
ihrpr May 20, 2025
2ca2de7
Change default binding from 0.0.0.0 to 127.0.0.1 to align with securi…
ciccolo-anthropic May 20, 2025
e80c015
fix: Pass cursor parameter to server (#745)
nbarbettini May 21, 2025
0e2a341
Fix `ClientSessionGroup` cleanup logic (#787)
mkeid May 23, 2025
4cd4fe0
Chatbot example: clean up servers in correct order (#353)
clareliguori May 23, 2025
7c8ad51
llamallama-3.2-90b-vision-preview is deprecated (#523)
Arash-IND May 23, 2025
10cf0f7
Support custom httpx client creation (#752)
nickcoai May 23, 2025
073471c
Python lint: Ruff rule PLW1510 -- subprocess-run-without-check (#794)
cclauss May 23, 2025
d187643
add support for parallel run (#739)
lk-naath May 23, 2025
f2f4dbd
Fix async callable object tools (#568)
stephanlensky May 23, 2025
294fc6b
[DOC] Fix example usage of get_context (plus a little more) (#801)
hesreallyhim May 26, 2025
8a2359f
Pin uv version (#806)
Kludex May 26, 2025
6e418e6
Fix building auth metadata paths (#779)
Rodriguespn May 26, 2025
9dad266
Fix auth tests and ruff format (#818)
ihrpr May 27, 2025
7901552
send errors to pending requests if server closes (#333)
mroch May 27, 2025
532b117
RFC: Lower log levels used for connections (#821)
nickcoai May 27, 2025
70014a2
Support for http request injection propagation to tools (#816)
ihrpr May 28, 2025
f5dd324
Prevent stdio connection hang for missing server path. (#401)
TimChild May 28, 2025
d55cb2b
Fix and update `OAuthAuthorizationServerProvider` snippet in `README.…
alvarobartt May 28, 2025
7f94bef
Client sampling and roots capabilities set to None if not implemented…
lorenzocesconetto May 29, 2025
05b7156
Support for http request injection propagation in StreamableHttp (#833)
ihrpr May 29, 2025
5441767
improve server logging (#867)
samuelcolvin Jun 2, 2025
8276632
fix wrong order of comments (#899)
vincent-pli Jun 7, 2025
2bce10b
Support Cursor OAuth client registration (#895)
sam-tombury Jun 7, 2025
7123556
feat: support audio content (#725)
LucaButBoring Jun 7, 2025
b0b44c2
Use `total_seconds` instead of `seconds` on timeout (#896)
Kludex Jun 7, 2025
2cbc435
normalize string ID to int in server messages for compatibility (#851)
wangxm345566462 Jun 8, 2025
1a9ead0
relax validation (#879)
dr3s Jun 9, 2025
29c69e6
Fix uncaught exception in MCP server (#822)
ddworken Jun 10, 2025
f7265f7
Use `FileUrl` on the `resources/list` call in the `simple-resource` e…
nandsha Jun 11, 2025
5439619
Use 120 characters instead of 88 (#856)
Kludex Jun 11, 2025
d831cc4
Add commit to git-blame-ignore-revs (#933)
Kludex Jun 11, 2025
ba149e3
Create issue templates (#935)
Kludex Jun 11, 2025
185fa49
Use pre-commit on CI (#937)
Kludex Jun 11, 2025
d69b290
chore: create union for working with message content (#939)
LucaButBoring Jun 12, 2025
20dc0fb
Allow to pass timeout as float (#941)
Kludex Jun 12, 2025
0bcecff
set timeout for sse in httpx_client_factory (#943)
ihrpr Jun 12, 2025
df15e95
feat: implement MCP-Protocol-Version header requirement for HTTP tran…
felixweinberger Jun 12, 2025
1bb16fa
clean-up: removed unused ci file (#950)
DarkDk123 Jun 13, 2025
bac2705
ci: add timeout on the test job (#955)
Kludex Jun 13, 2025
f3cd20c
Rename ResourceReference to ResourceTemplateReference (#947)
ihrpr Jun 13, 2025
1eb1bba
feat: add _meta to more objects (#963)
felixweinberger Jun 16, 2025
7b42065
Fix uncaught exception in MCP server (#967)
ddworken Jun 17, 2025
a3bcabd
Include context into completions (#966)
ihrpr Jun 17, 2025
69e6572
Add support for Elicitation (#625)
ihrpr Jun 17, 2025
5429ac6
Update _meta usage guidance in types (#971)
ihrpr Jun 17, 2025
029f434
Allow longer duration in test_188_concurrency (#969)
msabramo Jun 17, 2025
a2f8766
Add title to tools, resources, prompts (#972)
felixweinberger Jun 17, 2025
86bb54c
Add support for DNS rebinding protections (#861)
ddworken Jun 17, 2025
d0443a1
Add resource Link (#974)
ihrpr Jun 17, 2025
17f9c00
MCP server separation into Authorization Server (AS) and Resource Ser…
ihrpr Jun 23, 2025
679b229
RFC 8707 Resource Indicators Implementation (#991)
ihrpr Jun 23, 2025
ecc9165
Fix Windows subprocess NotImplementedError (STDIO clients) (#596)
theailanguage Jun 24, 2025
ce007de
Remove github from auth examples (#1011)
ihrpr Jun 24, 2025
6747688
Fix `/.well-known/oauth-authorization-server` dropping path (#1014)
ihrpr Jun 24, 2025
4d45bb8
refactor: rename DummyProcess to FallbackProcess in Windows stdio (#1…
felixweinberger Jun 24, 2025
41f3bc3
Make "resource" optional on earlier protocols (#1017)
dr3s Jun 25, 2025
0b11bdb
ci: add --frozen flag to all uv commands in workflows (#970)
dsp-ant Jun 25, 2025
c8bbfc0
Add schema validation to lowlevel server (#1005)
bhosmer-ant Jun 25, 2025
43bb24f
feat: Add structured output support for tool functions (#993)
bhosmer-ant Jun 26, 2025
4b65963
Update latest protocol version to 2025-06-18 (#1036)
ihrpr Jun 26, 2025
0323831
unpin jsonschema version (#1037)
ihrpr Jun 26, 2025
dced223
Remove frozen from build (#1040)
ihrpr Jun 26, 2025
3f0964d
Remove setting global logging config (#1048)
njbrake Jun 27, 2025
7942184
Bump Pydantic in the lockfile (#1041)
medaminezghal Jun 27, 2025
6f43d1f
Flaky test fix (#1050)
AishwaryaKalloli Jun 29, 2025
9301924
chore: bump ruff (#1085)
Kludex Jul 4, 2025
31076ab
docs: fix dev server command in README (#848) (#859)
Lasdw6 Jul 4, 2025
7bc190b
fix: support "form_post" to be one of response modes in authorization…
ke-yu Jul 4, 2025
adf3271
Embed code snippets for README from executable examples (#1055)
ihrpr Jul 4, 2025
3fa7bc7
tests: add lowest dependency tests (#1067)
Kludex Jul 6, 2025
3d67e72
Fix async resource functions not being awaited (#1092)
ihrpr Jul 6, 2025
906ceea
fix: Expose completions capability (#865)
fredericbarthelet Jul 7, 2025
5c9cf29
Fix Pydantic field alias consistency in structured output (#1099)
sjwhole Jul 7, 2025
08d364d
Update text to make clear Elicitation is not directly associated with…
evalstate Jul 7, 2025
cf72565
Unify process termination on POSIX & Windows (+ tests) (#1044)
felixweinberger Jul 8, 2025
e033621
Improve child process termination on POSIX & Windows (#1078)
felixweinberger Jul 8, 2025
beacd6e
remove max message size (#1105)
ihrpr Jul 8, 2025
b16c2a8
#552 (#707)
DanielAvdar Jul 8, 2025
bd84329
Doc update + validation in SseServerTransport + existing test fixes: …
AishwaryaKalloli Jul 9, 2025
4fee123
clean up log.error (#1109)
ihrpr Jul 9, 2025
c067ef2
Fix completions (#1107)
ihrpr Jul 9, 2025
9b4c2dd
fix pyright check in CI (#1108)
ihrpr Jul 9, 2025
3abefee
fweinberger/align shutdown with spec (#1091)
felixweinberger Jul 9, 2025
7b1078b
Fix: Prevent session manager shutdown on individual session crash (#841)
soby Jul 9, 2025
f55831e
Adding description field to the FastMCP get_prompt method (#614)
megandsouza03 Jul 9, 2025
6d092af
chore: add markdownlint on pre-commit hook and lint md files (#996)
dingo4dev Jul 10, 2025
b2d4322
Fix missing line in generated snippets (#1117)
ihrpr Jul 10, 2025
ee54acb
The lifespan_context object here is not a dictionary like the other e…
johnbikes Jul 10, 2025
81fe63a
Ensure failed oauth registration response is read before accessing re…
jlowin Jul 10, 2025
0a4e8d4
Avoiding to parse string arguments containing valid JSON if the argum…
cjg Jul 10, 2025
fd11eca
Update routing for streamable HTTP to avoid 307 redirect (#1115)
yurikunash Jul 11, 2025
d28a1a6
add regression tests for #1113 (#1122)
bhosmer-ant Jul 11, 2025
49991fd
Fix BaseModel method name conflicts in func_metadata (#1123)
bhosmer-ant Jul 14, 2025
9bf5160
README - replace code snippets with examples (#1136)
ihrpr Jul 14, 2025
a10fec7
README - replace code snippets with examples - direct execution and d…
ihrpr Jul 14, 2025
b8cb367
Close server session after handle stateless request (#1116)
hopeful0 Jul 14, 2025
95b44fb
tests: use `inline_snapshot.Is` on parametrized test (#945)
Kludex Jul 14, 2025
bd9885f
Add regression test for stateless request memory cleanup (#1140)
felixweinberger Jul 15, 2025
eb5146d
Implement RFC9728 - Support WWW-Authenticate header by MCP client (#1…
yurikunash Jul 15, 2025
0130f5b
Add streamable HTTP starlette example to Python SDK docs (#1111)
pamelafox Jul 15, 2025
6566c08
fix markdown error in README in main (#1147)
ihrpr Jul 15, 2025
0b4ce00
README - replace code snippets with examples - add lowlevel to snippe…
ihrpr Jul 16, 2025
e975d05
README - replace code snippets with examples - streamable http (#1155)
ihrpr Jul 16, 2025
a99711d
chore: don't allow users to create issues outside the templates (#1163)
Kludex Jul 17, 2025
c0bc666
Tests(cli): Add coverage for helper functions (#635)
davenpi Jul 17, 2025
dd79297
Docs: Update CallToolResult parsing in README (#812)
functicons Jul 17, 2025
11162d7
docs: add pre-commit install guide on CONTRIBUTING.md (#995)
dingo4dev Jul 17, 2025
813da6a
fix flaky fix-test_streamablehttp_client_resumption test (#1166)
ihrpr Jul 17, 2025
41184ba
README - replace code snippets with examples -- auth examples (#1164)
ihrpr Jul 17, 2025
99c4f3c
Support falling back to OIDC metadata for auth (#1061)
LucaButBoring Jul 17, 2025
ba58ebc
Add CODEOWNERS file for sdk (#1169)
ihrpr Jul 18, 2025
0b1b52b
fix flaky test test_88_random_error (#1171)
ihrpr Jul 18, 2025
7570ba3
Make sure `RequestId` is not coerced as `int` (#1178)
Kludex Jul 21, 2025
c260e29
Fix: Replace threading.Lock with anyio.Lock for Ray deployment compat…
only-weng Jul 21, 2025
6a84a2f
fix: fix OAuth flow request object handling (#1174)
clareliguori Jul 21, 2025
6d2e6d4
update codeowners group (#1191)
ihrpr Jul 23, 2025
35777b9
fix: perform auth server metadata discovery fallbacks on any 4xx (#1193)
LucaButBoring Jul 24, 2025
b34e720
server: skip duplicate response on CancelledError (#1153)
lukacf Jul 25, 2025
959d4e3
Unpack settings in FastMCP (#1198)
Kludex Jul 26, 2025
6c61058
chore: Remove unused prompt_manager.py file (#1229)
chughtapan Aug 4, 2025
68e25d4
Improved supported for ProtectedResourceMetadata (#1235)
yannj-fr Aug 4, 2025
34e3664
chore: Remove unused variable notification_options (#1238)
sreenaths Aug 5, 2025
d475928
Improve README around the Context object (#1203)
jbkkd Aug 5, 2025
e68e513
fix: allow to pass `list[str]` to `token_endpoint_auth_signing_alg_va…
yannj-fr Aug 6, 2025
ef4e167
Remove strict validation on `response_modes_supported` member of `OAu…
joesavage-silabs Aug 7, 2025
c7671e4
Add pyright strict mode on the whole project (#1254)
Kludex Aug 11, 2025
a82c69b
Consistent casing for default headers Accept and Content-Type (#1263)
glinf Aug 12, 2025
0926613
Update dependencies and fix type issues (#1268)
dsp-ant Aug 14, 2025
d1ac8d6
fix: prevent async generator cleanup errors in StreamableHTTP transpo…
mous222 Aug 14, 2025
824ef8a
chore: uncomment .idea/ in .gitignore (#1287)
maxisbey Aug 20, 2025
ff02c59
docs: clarify streamable_http_path configuration when mounting server…
felixweinberger Aug 21, 2025
09e3a05
feat: Add CORS configuration for browser-based MCP clients (#1059)
jerome3o-anthropic Aug 21, 2025
f4b2957
Added Audio to FastMCP (#1130)
dragonier23 Aug 22, 2025
e750a06
fix: avoid uncessary retries in OAuth authenticated requests (#1206)
keurcien Aug 22, 2025
9a8592e
Add PATHEXT to default STDIO env vars in windows (#1256)
timesler Aug 22, 2025
eaf7cf4
fix: error too many values to unpack (expected 2) (#1279)
sandangel Aug 23, 2025
9c6fd15
SDK Parity: Avoid Parsing Server Response for non-JsonRPCMessage Requ…
justin-yi-wang Aug 26, 2025
07ae8c0
types: Setting default value for method: Literal (#1292)
sreenaths Aug 26, 2025
1644b82
changes structured temperature to not deadly (#1328)
monkeywithacupcake Aug 31, 2025
356dfa6
Update simple-resource example to use non-deprecated read_resource re…
pja-ant Sep 1, 2025
346e794
docs: Update README to include link to API docs for #1329 (#1330)
reidg44 Sep 1, 2025
47d35f0
Allow ping requests before initialization (#1312)
eleftherias Sep 1, 2025
c47c767
Python lint: Ruff rules for pylint and code complexity (#525)
cclauss Sep 5, 2025
c3717e7
Fix context injection for resources and prompts (#1336)
dsp-ant Sep 11, 2025
ca5cb4c
fix(fastmcp): propagate mimeType in resource template list (#1186)
pchoudhury22 Sep 17, 2025
b41b917
fix: allow elicitations accepted without content (#1285)
owengo Sep 17, 2025
ca34666
Use --frozen in pre-commit config (#1375)
pja-ant Sep 17, 2025
a82f4ac
fix: close the session when read_stream closed
terry-xiaoyu Mar 31, 2025
9d248d3
support mqtt transport
terry-xiaoyu Mar 30, 2025
f4fa9cc
change user property name mcp_client_id to mcp-client-id
terry-xiaoyu Apr 1, 2025
6fe4401
separate the mqtt transport to base class and sub classes
terry-xiaoyu Apr 1, 2025
4b95182
add mqtt transport for mcp clients
terry-xiaoyu Apr 3, 2025
5bce93f
rename service to server
terry-xiaoyu Apr 5, 2025
a78cf47
refactor some callbacks of mcp client
terry-xiaoyu Apr 5, 2025
d4520ee
fix: session crashes on response_stream_reader EOF
terry-xiaoyu Apr 5, 2025
17e8adc
improve client_apis_demo.py
terry-xiaoyu Apr 5, 2025
6edbbf8
add server-id into contorl topic
terry-xiaoyu Apr 17, 2025
3fb9d85
support broker suggested MCP server name
terry-xiaoyu Apr 17, 2025
b755b90
log mqtt settings
terry-xiaoyu May 14, 2025
0c755d2
add server-id into the rpc topic; change client_id_prefix to client_id
terry-xiaoyu May 23, 2025
09030e5
change MQTT-CLIENT-ID to MCP-MQTT-CLIENT-ID
terry-xiaoyu May 24, 2025
617797b
fix: got incorrect server_name in clients
terry-xiaoyu May 24, 2025
c572d12
wait for connection success when start a mqtt client
terry-xiaoyu Jun 6, 2025
2290987
fix: handle connection refused exceptions
terry-xiaoyu Jun 7, 2025
7277afd
use the same topic to send list_changed and resource updated notifica…
terry-xiaoyu Jun 19, 2025
b9ac0b5
mcp client support disconnect a specific mcp server
terry-xiaoyu Jun 20, 2025
c476a33
fix: Pop client session if it failed to initialized
HJianBo Jun 25, 2025
39c5014
support broker suggested server-name-filters
terry-xiaoyu Jul 21, 2025
f6d3370
fix: make the params backward-compatible
terry-xiaoyu Jul 22, 2025
29b9dae
fix: mqtt mcp client crash on clean up server_ids
terry-xiaoyu Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Applied 120 line-length rule to all files: https://github.com/modelcontextprotocol/python-sdk/pull/856
543961968c0634e93d919d509cce23a1d6a56c21
2 changes: 2 additions & 0 deletions .gitattribute
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated
uv.lock linguist-generated=true
23 changes: 23 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CODEOWNERS for MCP Python SDK
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Default maintainers for everything
* @modelcontextprotocol/python-sdk

# Auth-related code requires additional review from auth team
/src/mcp/client/auth.py @modelcontextprotocol/python-sdk-auth
/src/mcp/server/auth/ @modelcontextprotocol/python-sdk-auth
/src/mcp/server/transport_security.py @modelcontextprotocol/python-sdk-auth
/src/mcp/shared/auth*.py @modelcontextprotocol/python-sdk-auth

# Auth-related tests
/tests/client/test_auth.py @modelcontextprotocol/python-sdk-auth
/tests/server/auth/ @modelcontextprotocol/python-sdk-auth
/tests/server/test_*security.py @modelcontextprotocol/python-sdk-auth
/tests/server/fastmcp/auth/ @modelcontextprotocol/python-sdk-auth
/tests/shared/test_auth*.py @modelcontextprotocol/python-sdk-auth

# Auth-related examples
/examples/clients/simple-auth-client/ @modelcontextprotocol/python-sdk-auth
/examples/snippets/clients/oauth_client.py @modelcontextprotocol/python-sdk-auth
/examples/snippets/servers/oauth_server.py @modelcontextprotocol/python-sdk-auth
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 🐛 MCP Python SDK Bug
description: Report a bug or unexpected behavior in the MCP Python SDK
labels: ["need confirmation"]

body:
- type: markdown
attributes:
value: Thank you for contributing to the MCP Python SDK! ✊

- type: checkboxes
id: checks
attributes:
label: Initial Checks
description: Just making sure you're using the latest version of MCP Python SDK.
options:
- label: I confirm that I'm using the latest version of MCP Python SDK
required: true
- label: I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
required: true

- type: textarea
id: description
attributes:
label: Description
description: |
Please explain what you're seeing and what you would expect to see.

Please provide as much detail as possible to make understanding and solving your problem as quick as possible. 🙏
validations:
required: true

- type: textarea
id: example
attributes:
label: Example Code
description: >
If applicable, please add a self-contained,
[minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example)
demonstrating the bug.

placeholder: |
from mcp.server.fastmcp import FastMCP

...
render: Python

- type: textarea
id: version
attributes:
label: Python & MCP Python SDK
description: |
Which version of Python and MCP Python SDK are you using?
render: Text
validations:
required: true
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🚀 MCP Python SDK Feature Request
description: "Suggest a new feature for the MCP Python SDK"
labels: ["feature request"]

body:
- type: markdown
attributes:
value: Thank you for contributing to the MCP Python SDK! ✊

- type: textarea
id: description
attributes:
label: Description
description: |
Please give as much detail as possible about the feature you would like to suggest. 🙏

You might like to add:
* A demo of how code might look when using the feature
* Your use case(s) for the feature
* Reference to other projects that have a similar feature
validations:
required: true

- type: textarea
id: references
attributes:
label: References
description: |
Please add any links or references that might help us understand your feature request better. 📚
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ❓ MCP Python SDK Question
description: "Ask a question about the MCP Python SDK"
labels: ["question"]

body:
- type: markdown
attributes:
value: Thank you for reaching out to the MCP Python SDK community! We're here to help! 🤝

- type: textarea
id: question
attributes:
label: Question
description: |
Please provide as much detail as possible about your question. 🙏
You might like to include:
* Code snippets showing what you've tried
* Error messages you're encountering (if any)
* Expected vs actual behavior
* Your use case and what you're trying to achieve
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional Context
description: |
Please provide any additional context that might help us better understand your question, such as:
* Your MCP Python SDK version
* Your Python version
* Relevant configuration or environment details 📝
25 changes: 0 additions & 25 deletions .github/workflows/check-lock.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/publish-docs-manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
version: 0.7.2

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
Expand All @@ -29,4 +30,4 @@ jobs:
mkdocs-material-

- run: uv sync --frozen --group docs
- run: uv run --no-sync mkdocs gh-deploy --force
- run: uv run --frozen --no-sync mkdocs gh-deploy --force
4 changes: 3 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
version: 0.7.2

- name: Set up Python 3.12
run: uv python install 3.12
Expand Down Expand Up @@ -67,6 +68,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
version: 0.7.2

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
Expand All @@ -77,4 +79,4 @@ jobs:
mkdocs-material-

- run: uv sync --frozen --group docs
- run: uv run --no-sync mkdocs gh-deploy --force
- run: uv run --frozen --no-sync mkdocs gh-deploy --force
60 changes: 37 additions & 23 deletions .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,69 @@ name: Shared Checks
on:
workflow_call:

permissions:
contents: read

env:
COLUMNS: 150

jobs:
format:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: 0.7.2

- name: Install the project
run: uv sync --frozen --all-extras --dev --python 3.12
- name: Install dependencies
run: uv sync --frozen --all-extras --python 3.10

- name: Run ruff format check
run: uv run --no-sync ruff check .
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --verbose
env:
SKIP: no-commit-to-branch

test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
continue-on-error: true
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
dep-resolution: ["lowest-direct", "highest"]
os: [ubuntu-latest, windows-latest]

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
version: 0.7.2

- name: Install the project
run: uv sync --frozen --all-extras --dev --python 3.12
run: uv sync --frozen --all-extras --python ${{ matrix.python-version }} --resolution ${{ matrix.dep-resolution }}

- name: Run pyright
run: uv run --no-sync pyright
- name: Run pytest
run: uv run --frozen --no-sync pytest

test:
readme-snippets:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: 0.7.2

- name: Install the project
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --frozen --all-extras --python 3.10

- name: Run pytest
run: uv run --no-sync pytest
- name: Check README snippets are up to date
run: uv run --frozen scripts/update_readme_snippets.py --check
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache/
cover/

# Translations
Expand Down Expand Up @@ -162,8 +163,12 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# vscode
.vscode/
.windsurfrules
**/CLAUDE.local.md

# claude code
.claude/
Loading