Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: modelcontextprotocol/python-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.1
Choose a base ref
...
head repository: modelcontextprotocol/python-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Dec 3, 2024

  1. bump

    dsp-ant committed Dec 3, 2024
    Copy the full SHA
    15ed7cb View commit details
  2. Fix READMEs of examples

    dsp-ant committed Dec 3, 2024
    Copy the full SHA
    44ec763 View commit details

Commits on Dec 4, 2024

  1. Copy the full SHA
    e4c0074 View commit details
  2. Merge pull request #89 from oskarraszkiewicz/main

    Fix simple-prompt example README
    dsp-ant authored Dec 4, 2024
    Copy the full SHA
    6391c9e View commit details

Commits on Dec 9, 2024

  1. Merge branch 'v1.1.x'

    dsp-ant committed Dec 9, 2024
    Copy the full SHA
    aaf32b5 View commit details

Commits on Dec 11, 2024

  1. Copy the full SHA
    a0216c3 View commit details

Commits on Dec 12, 2024

  1. Downgrade sse-starlette

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    8425c9c View commit details
  2. 1.1.2

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    ce25842 View commit details
  3. Merge branch 'v1.1.x'

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    21f2f82 View commit details
  4. Copy the full SHA
    ef9b4cf View commit details
  5. Merge branch 'v1.1.x'

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    93bce51 View commit details
  6. ruff format

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    1d4a0d3 View commit details
  7. Add checks to release branch

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    dd1a069 View commit details
  8. Merge branch 'v1.1.x'

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    e98291e View commit details
  9. Fix deprecation warning

    dsp-ant committed Dec 12, 2024
    Copy the full SHA
    edb37c8 View commit details

Commits on Dec 18, 2024

  1. Copy the full SHA
    07db4a3 View commit details
  2. refactor: modernize type hints and improve async context handling

    - Update type hints to use Python 3.10 syntax (dict, list, X | None)
    - Replace requests with httpx for HTTP client consistency
    - Improve async context management using AsyncExitStack
    - Simplify server cleanup method
    3choff committed Dec 18, 2024
    Copy the full SHA
    466e1e8 View commit details
  3. Copy the full SHA
    80a39f2 View commit details

Commits on Dec 21, 2024

  1. Integrate FastMCP

    This commit integrates FastMCP, a high-level MCP server implementation originally written by Jeremiah Lowin,
    into the official MCP SDK. It also updates dependencies and adds new dev dependencies.
    It moves the existing SDK into a .lowlevel .
    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    557e90d View commit details
  2. fix: Update test to match Pydantic's JSON schema output for model ref…

    …erences with defaults
    
    Pydantic now uses allOf to combine model references with default values in JSON schema output.
    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    fe75f43 View commit details
  3. refactor: Update FastMCP examples to use new import path

    Update all FastMCP examples to use mcp.server.fastmcp instead of fastmcp.
    Add tests to verify example servers work correctly.
    
    Changes:
    - Update import paths in all example files
    - Create test_examples.py to verify functionality
    - Fix test assertions to match actual response format
    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    15cd7df View commit details
  4. feat: Add CLI package

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    87cee0f View commit details
  5. docs: Update README.md to include FastMCP

    Update the README.md to include FastMCP as the recommended way to build MCP servers. FastMCP is a high-level, Pythonic interface that makes it easy to build MCP servers with minimal boilerplate. The low-level implementation is still available for more control.
    
    🤖 Generated with Claude CLI.
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    dsp-ant and claude committed Dec 21, 2024
    Copy the full SHA
    dad0194 View commit details
  6. Copy the full SHA
    aa3b550 View commit details
  7. Copy the full SHA
    b90da48 View commit details
  8. Copy the full SHA
    bed35f3 View commit details
  9. Copy the full SHA
    f2128a7 View commit details
  10. Copy the full SHA
    45cea71 View commit details
  11. Copy the full SHA
    ca31212 View commit details
  12. docs: Add back advanced usage sections to README

    Add back sections on low-level server implementation, client usage, MCP primitives and server capabilities that were previously removed.
    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    7bbf71e View commit details
  13. Copy the full SHA
    a79f51f View commit details
  14. remove comment

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    561397c View commit details
  15. fix type issues

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    0b09fa5 View commit details
  16. Copy the full SHA
    d2c3e21 View commit details
  17. add precommits

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    9d58fed View commit details
  18. add uvicorn dependency

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    5d9b544 View commit details
  19. fix pydantic version

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    680afee View commit details
  20. fix tests

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    44e1abb View commit details
  21. fix: use pydantic Field with alias for _meta fields

    Pydantic treats fields starting with underscore as private/hidden. To fix this,
    we need to use Field with alias='_meta' to properly handle these fields while
    keeping the external API unchanged. This fixes #103 where meta fields were not
    being properly assigned in request contexts.
    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    37f6a32 View commit details
  22. Fix deprecation warning

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    52e69ef View commit details
  23. Merge pull request #108 from modelcontextprotocol/davidsp/fix-103

    Fix Bug: request_meta is not available in server.request_context #103
    dsp-ant authored Dec 21, 2024
    Copy the full SHA
    e691c51 View commit details
  24. Merge branch 'v1.1.x'

    dsp-ant committed Dec 21, 2024
    Copy the full SHA
    2c8ea49 View commit details

Commits on Dec 23, 2024

  1. Merge pull request #106 from modelcontextprotocol/davidsp/fastmcp

    feat: Integrate FastMCP
    dsp-ant authored Dec 23, 2024
    Copy the full SHA
    59fff69 View commit details
  2. Copy the full SHA
    552f797 View commit details
  3. Copy the full SHA
    eba1ad2 View commit details

Commits on Dec 29, 2024

  1. Copy the full SHA
    6194d06 View commit details
  2. fix: Install still runs the fastmcp command, which is now unecessary …

    …(/not installed). We can just run it with mcp.
    samefarrar committed Dec 29, 2024
    Copy the full SHA
    e65404a View commit details
  3. Copy the full SHA
    4f36581 View commit details
  4. ruff format

    SecretiveShell committed Dec 29, 2024
    Copy the full SHA
    99727a9 View commit details

Commits on Dec 30, 2024

  1. Copy the full SHA
    0970ef4 View commit details
Showing with 36,354 additions and 1,842 deletions.
  1. +2 −0 .git-blame-ignore-revs
  2. +55 −0 .github/ISSUE_TEMPLATE/bug.yaml
  3. +0 −38 .github/ISSUE_TEMPLATE/bug_report.md
  4. +1 −0 .github/ISSUE_TEMPLATE/config.yaml
  5. +29 −0 .github/ISSUE_TEMPLATE/feature-request.yaml
  6. +0 −20 .github/ISSUE_TEMPLATE/feature_request.md
  7. +33 −0 .github/ISSUE_TEMPLATE/question.yaml
  8. +5 −1 .github/workflows/main-checks.yml
  9. +33 −0 .github/workflows/publish-docs-manually.yml
  10. +53 −26 .github/workflows/publish-pypi.yml
  11. +41 −36 .github/workflows/shared.yml
  12. +8 −0 .gitignore
  13. +58 −0 .pre-commit-config.yaml
  14. +134 −0 CLAUDE.md
  15. +4 −4 CODE_OF_CONDUCT.md
  16. +27 −7 CONTRIBUTING.md
  17. +1,190 −162 README.md
  18. +6 −8 RELEASE.md
  19. +1 −0 SECURITY.md
  20. +1 −0 docs/api.md
  21. +5 −0 docs/index.md
  22. +74 −0 examples/clients/simple-auth-client/README.md
  23. +1 −0 examples/clients/simple-auth-client/mcp_simple_auth_client/__init__.py
  24. +363 −0 examples/clients/simple-auth-client/mcp_simple_auth_client/main.py
  25. +52 −0 examples/clients/simple-auth-client/pyproject.toml
  26. +535 −0 examples/clients/simple-auth-client/uv.lock
  27. 0 { → examples/clients/simple-chatbot}/.python-version
  28. +113 −0 examples/clients/simple-chatbot/README.MD
  29. +1 −0 examples/clients/simple-chatbot/mcp_simple_chatbot/.env.example
  30. +439 −0 examples/clients/simple-chatbot/mcp_simple_chatbot/main.py
  31. +4 −0 examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txt
  32. +12 −0 examples/clients/simple-chatbot/mcp_simple_chatbot/servers_config.json
  33. BIN examples/clients/simple-chatbot/mcp_simple_chatbot/test.db
  34. +48 −0 examples/clients/simple-chatbot/pyproject.toml
  35. +555 −0 examples/clients/simple-chatbot/uv.lock
  36. +30 −0 examples/fastmcp/complex_inputs.py
  37. +25 −0 examples/fastmcp/desktop.py
  38. +30 −0 examples/fastmcp/echo.py
  39. +333 −0 examples/fastmcp/memory.py
  40. +21 −0 examples/fastmcp/parameter_descriptions.py
  41. +18 −0 examples/fastmcp/readme-quickstart.py
  42. +29 −0 examples/fastmcp/screenshot.py
  43. +14 −0 examples/fastmcp/simple_echo.py
  44. +68 −0 examples/fastmcp/text_me.py
  45. +61 −0 examples/fastmcp/unicode_example.py
  46. +225 −0 examples/fastmcp/weather_structured.py
  47. +134 −0 examples/servers/simple-auth/README.md
  48. +1 −0 examples/servers/simple-auth/mcp_simple_auth/__init__.py
  49. +7 −0 examples/servers/simple-auth/mcp_simple_auth/__main__.py
  50. +187 −0 examples/servers/simple-auth/mcp_simple_auth/auth_server.py
  51. +139 −0 examples/servers/simple-auth/mcp_simple_auth/legacy_as_server.py
  52. +169 −0 examples/servers/simple-auth/mcp_simple_auth/server.py
  53. +270 −0 examples/servers/simple-auth/mcp_simple_auth/simple_auth_provider.py
  54. +105 −0 examples/servers/simple-auth/mcp_simple_auth/token_verifier.py
  55. +33 −0 examples/servers/simple-auth/pyproject.toml
  56. +31 −18 examples/servers/simple-prompt/README.md
  57. +2 −2 examples/servers/simple-prompt/mcp_simple_prompt/__main__.py
  58. +9 −13 examples/servers/simple-prompt/mcp_simple_prompt/server.py
  59. +24 −12 examples/servers/simple-resource/README.md
  60. +2 −2 examples/servers/simple-resource/mcp_simple_resource/__main__.py
  61. +27 −21 examples/servers/simple-resource/mcp_simple_resource/server.py
  62. +39 −0 examples/servers/simple-streamablehttp-stateless/README.md
  63. 0 examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/__init__.py
  64. +7 −0 examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/__main__.py
  65. +139 −0 examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py
  66. +36 −0 examples/servers/simple-streamablehttp-stateless/pyproject.toml
  67. +53 −0 examples/servers/simple-streamablehttp/README.md
  68. 0 examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/__init__.py
  69. +4 −0 examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/__main__.py
  70. +105 −0 examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/event_store.py
  71. +167 −0 examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/server.py
  72. +36 −0 examples/servers/simple-streamablehttp/pyproject.toml
  73. +23 −15 examples/servers/simple-tool/README.md
  74. +2 −2 examples/servers/simple-tool/mcp_simple_tool/__main__.py
  75. +14 −21 examples/servers/simple-tool/mcp_simple_tool/server.py
  76. +98 −0 examples/servers/structured_output_lowlevel.py
  77. +18 −0 examples/snippets/pyproject.toml
  78. +36 −0 examples/snippets/servers/__init__.py
  79. +18 −0 examples/snippets/servers/basic_prompt.py
  80. +20 −0 examples/snippets/servers/basic_resource.py
  81. +16 −0 examples/snippets/servers/basic_tool.py
  82. +49 −0 examples/snippets/servers/completion.py
  83. +41 −0 examples/snippets/servers/elicitation.py
  84. +18 −0 examples/snippets/servers/notifications.py
  85. +24 −0 examples/snippets/servers/sampling.py
  86. +20 −0 examples/snippets/servers/tool_progress.py
  87. +120 −0 mkdocs.yml
  88. +88 −21 pyproject.toml
  89. +159 −0 scripts/update_readme_snippets.py
  90. +2 −0 src/mcp/__init__.py
  91. +6 −0 src/mcp/cli/__init__.py
  92. +148 −0 src/mcp/cli/claude.py
  93. +488 −0 src/mcp/cli/cli.py
  94. +40 −31 src/mcp/client/__main__.py
  95. +581 −0 src/mcp/client/auth.py
  96. +256 −32 src/mcp/client/session.py
  97. +366 −0 src/mcp/client/session_group.py
  98. +36 −34 src/mcp/client/sse.py
  99. +0 −128 src/mcp/client/stdio.py
  100. +276 −0 src/mcp/client/stdio/__init__.py
  101. +509 −0 src/mcp/client/streamable_http.py
  102. +86 −0 src/mcp/client/websocket.py
  103. +1 −0 src/mcp/os/__init__.py
  104. +1 −0 src/mcp/os/posix/__init__.py
  105. +60 −0 src/mcp/os/posix/utilities.py
  106. +1 −0 src/mcp/os/win32/__init__.py
  107. +338 −0 src/mcp/os/win32/utilities.py
  108. +4 −499 src/mcp/server/__init__.py
  109. +3 −0 src/mcp/server/auth/__init__.py
  110. +5 −0 src/mcp/server/auth/errors.py
  111. +3 −0 src/mcp/server/auth/handlers/__init__.py
  112. +224 −0 src/mcp/server/auth/handlers/authorize.py
  113. +29 −0 src/mcp/server/auth/handlers/metadata.py
  114. +120 −0 src/mcp/server/auth/handlers/register.py
  115. +94 −0 src/mcp/server/auth/handlers/revoke.py
  116. +238 −0 src/mcp/server/auth/handlers/token.py
  117. +10 −0 src/mcp/server/auth/json_response.py
  118. +3 −0 src/mcp/server/auth/middleware/__init__.py
  119. +48 −0 src/mcp/server/auth/middleware/auth_context.py
  120. +128 −0 src/mcp/server/auth/middleware/bearer_auth.py
  121. +51 −0 src/mcp/server/auth/middleware/client_auth.py
  122. +306 −0 src/mcp/server/auth/provider.py
  123. +223 −0 src/mcp/server/auth/routes.py
  124. +30 −0 src/mcp/server/auth/settings.py
  125. +111 −0 src/mcp/server/elicitation.py
  126. +9 −0 src/mcp/server/fastmcp/__init__.py
  127. +21 −0 src/mcp/server/fastmcp/exceptions.py
  128. +4 −0 src/mcp/server/fastmcp/prompts/__init__.py
  129. +153 −0 src/mcp/server/fastmcp/prompts/base.py
  130. +48 −0 src/mcp/server/fastmcp/prompts/manager.py
  131. +33 −0 src/mcp/server/fastmcp/prompts/prompt_manager.py
  132. +23 −0 src/mcp/server/fastmcp/resources/__init__.py
  133. +45 −0 src/mcp/server/fastmcp/resources/base.py
  134. +97 −0 src/mcp/server/fastmcp/resources/resource_manager.py
  135. +83 −0 src/mcp/server/fastmcp/resources/templates.py
  136. +196 −0 src/mcp/server/fastmcp/resources/types.py
  137. +1,164 −0 src/mcp/server/fastmcp/server.py
  138. +4 −0 src/mcp/server/fastmcp/tools/__init__.py
  139. +119 −0 src/mcp/server/fastmcp/tools/base.py
  140. +83 −0 src/mcp/server/fastmcp/tools/tool_manager.py
  141. +1 −0 src/mcp/server/fastmcp/utilities/__init__.py
  142. +494 −0 src/mcp/server/fastmcp/utilities/func_metadata.py
  143. +43 −0 src/mcp/server/fastmcp/utilities/logging.py
  144. +54 −0 src/mcp/server/fastmcp/utilities/types.py
  145. +3 −0 src/mcp/server/lowlevel/__init__.py
  146. +9 −0 src/mcp/server/lowlevel/helper_types.py
  147. +681 −0 src/mcp/server/lowlevel/server.py
  148. +1 −0 src/mcp/server/models.py
  149. +109 −38 src/mcp/server/session.py
  150. +111 −40 src/mcp/server/sse.py
  151. +15 −10 src/mcp/server/stdio.py
  152. +903 −0 src/mcp/server/streamable_http.py
  153. +277 −0 src/mcp/server/streamable_http_manager.py
  154. +203 −0 src/mcp/server/streaming_asgi_transport.py
  155. +127 −0 src/mcp/server/transport_security.py
  156. +14 −13 src/mcp/server/websocket.py
  157. +83 −0 src/mcp/shared/_httpx_utils.py
  158. +144 −0 src/mcp/shared/auth.py
  159. +69 −0 src/mcp/shared/auth_utils.py
  160. +9 −3 src/mcp/shared/context.py
  161. +5 −0 src/mcp/shared/exceptions.py
  162. +29 −17 src/mcp/shared/memory.py
  163. +43 −0 src/mcp/shared/message.py
  164. +45 −0 src/mcp/shared/metadata_utils.py
  165. +25 −7 src/mcp/shared/progress.py
  166. +308 −126 src/mcp/shared/session.py
  167. +1 −1 src/mcp/shared/version.py
  168. +374 −95 src/mcp/types.py
  169. +137 −0 tests/client/conftest.py
  170. +582 −0 tests/client/test_auth.py
  171. +75 −0 tests/client/test_config.py
  172. +213 −0 tests/client/test_list_methods_cursor.py
  173. +57 −0 tests/client/test_list_roots_callback.py
  174. +83 −0 tests/client/test_logging_callback.py
  175. +198 −0 tests/client/test_output_schema_validation.py
  176. +67 −0 tests/client/test_resource_cleanup.py
  177. +58 −0 tests/client/test_sampling_callback.py
  178. +424 −25 tests/client/test_session.py
  179. +367 −0 tests/client/test_session_group.py
  180. +609 −9 tests/client/test_stdio.py
  181. +2 −25 tests/conftest.py
  182. +31 −0 tests/issues/test_100_tool_listing.py
  183. +243 −0 tests/issues/test_1027_win_unreachable_cleanup.py
  184. +42 −0 tests/issues/test_129_resource_templates.py
  185. +114 −0 tests/issues/test_141_resource_templates.py
  186. +118 −0 tests/issues/test_152_resource_mime_type.py
  187. +41 −0 tests/issues/test_176_progress_token.py
  188. +86 −0 tests/issues/test_188_concurrency.py
  189. +91 −0 tests/issues/test_192_request_id.py
  190. +85 −0 tests/issues/test_342_base64_encoding.py
  191. +50 −0 tests/issues/test_355_type_error.py
  192. +64 −0 tests/issues/test_552_windows_hang.py
  193. +117 −0 tests/issues/test_88_random_error.py
  194. +160 −0 tests/issues/test_malformed_input.py
  195. +122 −0 tests/server/auth/middleware/test_auth_context.py
  196. +458 −0 tests/server/auth/middleware/test_bearer_auth.py
  197. +286 −0 tests/server/auth/test_error_handling.py
  198. 0 tests/server/fastmcp/__init__.py
  199. +3 −0 tests/server/fastmcp/auth/__init__.py
  200. +1,203 −0 tests/server/fastmcp/auth/test_auth_integration.py
  201. 0 tests/server/fastmcp/prompts/__init__.py
  202. +188 −0 tests/server/fastmcp/prompts/test_base.py
  203. +108 −0 tests/server/fastmcp/prompts/test_manager.py
  204. 0 tests/server/fastmcp/resources/__init__.py
  205. +117 −0 tests/server/fastmcp/resources/test_file_resources.py
  206. +157 −0 tests/server/fastmcp/resources/test_function_resources.py
  207. +141 −0 tests/server/fastmcp/resources/test_resource_manager.py
  208. +188 −0 tests/server/fastmcp/resources/test_resource_template.py
  209. +101 −0 tests/server/fastmcp/resources/test_resources.py
  210. 0 tests/server/fastmcp/servers/__init__.py
  211. +128 −0 tests/server/fastmcp/servers/test_file_server.py
  212. +210 −0 tests/server/fastmcp/test_elicitation.py
  213. +978 −0 tests/server/fastmcp/test_func_metadata.py
  214. +592 −0 tests/server/fastmcp/test_integration.py
  215. +30 −0 tests/server/fastmcp/test_parameter_descriptions.py
  216. +1,093 −0 tests/server/fastmcp/test_server.py
  217. +215 −0 tests/server/fastmcp/test_title.py
  218. +635 −0 tests/server/fastmcp/test_tool_manager.py
  219. +180 −0 tests/server/test_completion_with_context.py
  220. +236 −0 tests/server/test_lifespan.py
  221. +310 −0 tests/server/test_lowlevel_input_validation.py
  222. +433 −0 tests/server/test_lowlevel_output_validation.py
  223. +99 −0 tests/server/test_lowlevel_tool_annotations.py
  224. +110 −0 tests/server/test_read_resource.py
  225. +129 −18 tests/server/test_session.py
  226. +293 −0 tests/server/test_sse_security.py
  227. +13 −20 tests/server/test_stdio.py
  228. +199 −0 tests/server/test_streamable_http_manager.py
  229. +293 −0 tests/server/test_streamable_http_security.py
  230. +112 −0 tests/shared/test_auth_utils.py
  231. +24 −0 tests/shared/test_httpx_utils.py
  232. +19 −0 tests/shared/test_memory.py
  233. +335 −0 tests/shared/test_progress_notifications.py
  234. +179 −0 tests/shared/test_session.py
  235. +503 −0 tests/shared/test_sse.py
  236. +1,566 −0 tests/shared/test_streamable_http.py
  237. +10 −0 tests/shared/test_win32_utils.py
  238. +208 −0 tests/shared/test_ws.py
  239. +94 −0 tests/test_examples.py
  240. +4 −1 tests/test_types.py
  241. +1,624 −241 uv.lock
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
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: true
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 📝
6 changes: 5 additions & 1 deletion .github/workflows/main-checks.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,11 @@ name: Main branch checks

on:
push:
branches: [main]
branches:
- main
- "v*.*.*"
tags:
- "v*.*.*"

jobs:
checks:
33 changes: 33 additions & 0 deletions .github/workflows/publish-docs-manually.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Docs manually

on:
workflow_dispatch:

jobs:
docs-publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Install uv
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
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: uv sync --frozen --group docs
- run: uv run --frozen --no-sync mkdocs gh-deploy --force
79 changes: 53 additions & 26 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -10,27 +10,25 @@ jobs:
runs-on: ubuntu-latest
needs: [checks]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

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

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up Python 3.12
run: uv python install 3.12

- name: Install the project
run: uv sync --frozen --all-extras --dev
- name: Build
run: uv build

- name: Build
run: uv build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

checks:
uses: ./.github/workflows/shared.yml
@@ -42,14 +40,43 @@ jobs:
needs:
- release-build
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

docs-publish:
runs-on: ubuntu-latest
needs: ["pypi-publish"]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Install uv
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
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: uv sync --frozen --group docs
- run: uv run --frozen --no-sync mkdocs gh-deploy --force
Loading