fastmcp 2.8.0__tar.gz → 2.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/release.yml +11 -2
  2. {fastmcp-2.8.0 → fastmcp-2.9.0}/.pre-commit-config.yaml +1 -1
  3. fastmcp-2.9.0/CLAUDE.md +36 -0
  4. {fastmcp-2.8.0 → fastmcp-2.9.0}/PKG-INFO +47 -27
  5. {fastmcp-2.8.0 → fastmcp-2.9.0}/README.md +45 -25
  6. fastmcp-2.9.0/docs/.cursor/rules/mintlify.mdc +364 -0
  7. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/changelog.mdx +68 -1
  8. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/clients/auth/bearer.mdx +7 -4
  9. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/clients/auth/oauth.mdx +1 -1
  10. fastmcp-2.9.0/docs/clients/client.mdx +291 -0
  11. fastmcp-2.9.0/docs/clients/logging.mdx +76 -0
  12. fastmcp-2.9.0/docs/clients/progress.mdx +70 -0
  13. fastmcp-2.9.0/docs/clients/prompts.mdx +187 -0
  14. fastmcp-2.9.0/docs/clients/resources.mdx +171 -0
  15. fastmcp-2.9.0/docs/clients/roots.mdx +42 -0
  16. fastmcp-2.9.0/docs/clients/sampling.mdx +152 -0
  17. fastmcp-2.9.0/docs/clients/tools.mdx +143 -0
  18. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/clients/transports.mdx +4 -4
  19. fastmcp-2.9.0/docs/community/README.md +22 -0
  20. fastmcp-2.9.0/docs/community/showcase.mdx +59 -0
  21. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/deployment/asgi.mdx +11 -5
  22. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/deployment/running-server.mdx +11 -8
  23. fastmcp-2.9.0/docs/docs.json +312 -0
  24. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/getting-started/installation.mdx +3 -2
  25. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/getting-started/welcome.mdx +5 -3
  26. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/integrations/anthropic.mdx +6 -6
  27. fastmcp-2.9.0/docs/integrations/chatgpt.mdx +158 -0
  28. fastmcp-2.9.0/docs/integrations/claude-code.mdx +60 -0
  29. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/integrations/claude-desktop.mdx +9 -5
  30. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/integrations/gemini.mdx +2 -2
  31. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/integrations/openai.mdx +6 -6
  32. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/patterns/cli.mdx +33 -8
  33. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/patterns/tool-transformation.mdx +1 -0
  34. fastmcp-2.9.0/docs/python-sdk/fastmcp-cli-__init__.mdx +9 -0
  35. fastmcp-2.9.0/docs/python-sdk/fastmcp-cli-claude.mdx +43 -0
  36. fastmcp-2.9.0/docs/python-sdk/fastmcp-cli-cli.mdx +86 -0
  37. fastmcp-2.9.0/docs/python-sdk/fastmcp-cli-run.mdx +106 -0
  38. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-__init__.mdx +8 -0
  39. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-auth-__init__.mdx +8 -0
  40. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-auth-bearer.mdx +18 -0
  41. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-auth-oauth.mdx +102 -0
  42. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-client.mdx +94 -0
  43. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-logging.mdx +14 -0
  44. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-oauth_callback.mdx +63 -0
  45. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-progress.mdx +8 -0
  46. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-roots.mdx +20 -0
  47. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-sampling.mdx +14 -0
  48. fastmcp-2.9.0/docs/python-sdk/fastmcp-client-transports.mdx +191 -0
  49. fastmcp-2.9.0/docs/python-sdk/fastmcp-exceptions.mdx +65 -0
  50. fastmcp-2.9.0/docs/python-sdk/fastmcp-prompts-__init__.mdx +8 -0
  51. fastmcp-2.9.0/docs/python-sdk/fastmcp-prompts-prompt.mdx +84 -0
  52. fastmcp-2.9.0/docs/python-sdk/fastmcp-prompts-prompt_manager.mdx +43 -0
  53. fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-__init__.mdx +8 -0
  54. fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-resource.mdx +90 -0
  55. fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-resource_manager.mdx +111 -0
  56. fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-template.mdx +104 -0
  57. fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-types.mdx +83 -0
  58. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-__init__.mdx +8 -0
  59. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-__init__.mdx +8 -0
  60. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-auth.mdx +10 -0
  61. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-providers-__init__.mdx +8 -0
  62. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx +69 -0
  63. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-providers-bearer_env.mdx +22 -0
  64. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx +15 -0
  65. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-context.mdx +118 -0
  66. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-dependencies.mdx +36 -0
  67. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-http.mdx +113 -0
  68. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-middleware.mdx +56 -0
  69. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-openapi.mdx +58 -0
  70. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-proxy.mdx +101 -0
  71. fastmcp-2.9.0/docs/python-sdk/fastmcp-server-server.mdx +542 -0
  72. fastmcp-2.9.0/docs/python-sdk/fastmcp-settings.mdx +59 -0
  73. fastmcp-2.9.0/docs/python-sdk/fastmcp-tools-__init__.mdx +8 -0
  74. fastmcp-2.9.0/docs/python-sdk/fastmcp-tools-tool.mdx +68 -0
  75. fastmcp-2.9.0/docs/python-sdk/fastmcp-tools-tool_manager.mdx +58 -0
  76. fastmcp-2.9.0/docs/python-sdk/fastmcp-tools-tool_transform.mdx +117 -0
  77. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-__init__.mdx +9 -0
  78. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-cache.mdx +30 -0
  79. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-components.mdx +52 -0
  80. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-exceptions.mdx +20 -0
  81. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-http.mdx +18 -0
  82. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-inspect.mdx +41 -0
  83. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-json_schema.mdx +25 -0
  84. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-logging.mdx +41 -0
  85. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-mcp_config.mdx +50 -0
  86. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-openapi.mdx +118 -0
  87. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-tests.mdx +42 -0
  88. fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-types.mdx +112 -0
  89. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/auth/bearer.mdx +69 -24
  90. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/composition.mdx +81 -9
  91. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/context.mdx +1 -0
  92. fastmcp-2.9.0/docs/servers/middleware.mdx +574 -0
  93. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/prompts.mdx +113 -49
  94. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/proxy.mdx +3 -3
  95. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/resources.mdx +37 -18
  96. fastmcp-2.8.0/docs/servers/fastmcp.mdx → fastmcp-2.9.0/docs/servers/server.mdx +115 -26
  97. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/tools.mdx +68 -26
  98. fastmcp-2.9.0/docs/snippets/youtube-embed.mdx +12 -0
  99. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/tutorials/rest-api.mdx +3 -3
  100. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/updates.mdx +31 -3
  101. fastmcp-2.9.0/examples/atproto_mcp/README.md +146 -0
  102. fastmcp-2.9.0/examples/atproto_mcp/demo.py +225 -0
  103. fastmcp-2.9.0/examples/atproto_mcp/pyproject.toml +24 -0
  104. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/__init__.py +3 -0
  105. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/__main__.py +9 -0
  106. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/__init__.py +19 -0
  107. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py +16 -0
  108. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/_posts.py +284 -0
  109. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/_profile.py +33 -0
  110. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/_read.py +124 -0
  111. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/_atproto/_social.py +108 -0
  112. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/server.py +128 -0
  113. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/settings.py +17 -0
  114. fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp/types.py +121 -0
  115. fastmcp-2.9.0/examples/get_file.py +33 -0
  116. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/screenshot.py +2 -1
  117. fastmcp-2.9.0/justfile +30 -0
  118. {fastmcp-2.8.0 → fastmcp-2.9.0}/pyproject.toml +1 -1
  119. fastmcp-2.9.0/src/fastmcp/__init__.py +50 -0
  120. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/cli/cli.py +99 -1
  121. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/cli/run.py +1 -3
  122. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/auth/oauth.py +1 -2
  123. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/client.py +24 -9
  124. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/sampling.py +5 -9
  125. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/transports.py +24 -7
  126. fastmcp-2.9.0/src/fastmcp/contrib/mcp_mixin/README.md +116 -0
  127. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py +14 -0
  128. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/prompts/prompt.py +94 -14
  129. fastmcp-2.9.0/src/fastmcp/prompts/prompt_manager.py +201 -0
  130. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/resources/resource.py +11 -1
  131. fastmcp-2.9.0/src/fastmcp/resources/resource_manager.py +492 -0
  132. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/resources/template.py +27 -1
  133. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/auth/providers/bearer.py +32 -10
  134. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/auth/providers/in_memory.py +2 -2
  135. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/context.py +53 -12
  136. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/http.py +8 -0
  137. fastmcp-2.9.0/src/fastmcp/server/middleware/__init__.py +6 -0
  138. fastmcp-2.9.0/src/fastmcp/server/middleware/error_handling.py +206 -0
  139. fastmcp-2.9.0/src/fastmcp/server/middleware/logging.py +165 -0
  140. fastmcp-2.9.0/src/fastmcp/server/middleware/middleware.py +236 -0
  141. fastmcp-2.9.0/src/fastmcp/server/middleware/rate_limiting.py +231 -0
  142. fastmcp-2.9.0/src/fastmcp/server/middleware/timing.py +156 -0
  143. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/openapi.py +22 -19
  144. fastmcp-2.9.0/src/fastmcp/server/proxy.py +401 -0
  145. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/server.py +432 -327
  146. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/settings.py +22 -9
  147. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/tools/tool.py +16 -11
  148. fastmcp-2.9.0/src/fastmcp/tools/tool_manager.py +215 -0
  149. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/tools/tool_transform.py +9 -5
  150. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/components.py +22 -2
  151. fastmcp-2.9.0/src/fastmcp/utilities/inspect.py +326 -0
  152. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/json_schema.py +67 -23
  153. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/mcp_config.py +13 -7
  154. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/openapi.py +5 -3
  155. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/tests.py +1 -1
  156. fastmcp-2.9.0/src/fastmcp/utilities/types.py +294 -0
  157. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/auth/providers/test_bearer.py +98 -6
  158. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/auth/test_oauth_client.py +2 -2
  159. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/cli/test_cli.py +35 -0
  160. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_client.py +133 -6
  161. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_openapi.py +5 -5
  162. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_sse.py +3 -3
  163. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_streamable_http.py +71 -22
  164. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/contrib/test_bulk_tool_caller.py +1 -3
  165. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/deprecated/test_deprecated.py +24 -81
  166. fastmcp-2.9.0/tests/deprecated/test_mount_import_arg_order.py +275 -0
  167. fastmcp-2.9.0/tests/deprecated/test_mount_separators.py +113 -0
  168. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/deprecated/test_resource_prefixes.py +7 -5
  169. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/deprecated/test_settings.py +24 -16
  170. fastmcp-2.9.0/tests/prompts/test_prompt.py +484 -0
  171. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/prompts/test_prompt_manager.py +23 -24
  172. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/resources/test_resource_manager.py +73 -53
  173. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/resources/test_resource_template.py +1 -0
  174. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/http/test_custom_routes.py +1 -1
  175. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/http/test_http_dependencies.py +3 -3
  176. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/http/test_http_middleware.py +2 -2
  177. fastmcp-2.9.0/tests/server/middleware/test_error_handling.py +601 -0
  178. fastmcp-2.9.0/tests/server/middleware/test_logging.py +426 -0
  179. fastmcp-2.9.0/tests/server/middleware/test_middleware.py +567 -0
  180. fastmcp-2.9.0/tests/server/middleware/test_rate_limiting.py +448 -0
  181. fastmcp-2.9.0/tests/server/middleware/test_timing.py +312 -0
  182. fastmcp-2.9.0/tests/server/openapi/__init__.py +0 -0
  183. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/openapi/test_openapi.py +188 -184
  184. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_app_state.py +2 -2
  185. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_auth_integration.py +3 -3
  186. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_context.py +37 -0
  187. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_import_server.py +237 -38
  188. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_mount.py +386 -67
  189. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_proxy.py +2 -2
  190. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_resource_prefix_formats.py +6 -6
  191. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_server.py +15 -9
  192. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_server_interactions.py +243 -13
  193. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_tool_annotations.py +6 -3
  194. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_tool_exclude_args.py +5 -3
  195. fastmcp-2.9.0/tests/tools/__init__.py +0 -0
  196. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/tools/test_tool.py +132 -2
  197. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/tools/test_tool_manager.py +48 -42
  198. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/tools/test_tool_transform.py +32 -0
  199. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/openapi/test_openapi_advanced.py +22 -0
  200. fastmcp-2.9.0/tests/utilities/test_inspect.py +388 -0
  201. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_json_schema.py +17 -5
  202. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_mcp_config.py +6 -6
  203. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_types.py +212 -0
  204. {fastmcp-2.8.0 → fastmcp-2.9.0}/uv.lock +150 -148
  205. fastmcp-2.8.0/docs/clients/advanced-features.mdx +0 -152
  206. fastmcp-2.8.0/docs/clients/client.mdx +0 -372
  207. fastmcp-2.8.0/docs/docs.json +0 -165
  208. fastmcp-2.8.0/justfile +0 -9
  209. fastmcp-2.8.0/src/fastmcp/__init__.py +0 -24
  210. fastmcp-2.8.0/src/fastmcp/contrib/mcp_mixin/README.md +0 -39
  211. fastmcp-2.8.0/src/fastmcp/prompts/prompt_manager.py +0 -124
  212. fastmcp-2.8.0/src/fastmcp/resources/resource_manager.py +0 -317
  213. fastmcp-2.8.0/src/fastmcp/server/proxy.py +0 -295
  214. fastmcp-2.8.0/src/fastmcp/tools/tool_manager.py +0 -146
  215. fastmcp-2.8.0/src/fastmcp/utilities/types.py +0 -128
  216. fastmcp-2.8.0/tests/deprecated/test_mount_separators.py +0 -88
  217. fastmcp-2.8.0/tests/prompts/test_prompt.py +0 -242
  218. {fastmcp-2.8.0 → fastmcp-2.9.0}/.cursor/rules/core-mcp-objects.mdc +0 -0
  219. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  220. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  221. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/ISSUE_TEMPLATE/enhancement.yml +0 -0
  222. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/dependabot.yml +0 -0
  223. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/labeler.yml +0 -0
  224. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/workflows/labeler.yml +0 -0
  225. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/workflows/publish.yml +0 -0
  226. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/workflows/run-static.yml +0 -0
  227. {fastmcp-2.8.0 → fastmcp-2.9.0}/.github/workflows/run-tests.yml +0 -0
  228. {fastmcp-2.8.0 → fastmcp-2.9.0}/.gitignore +0 -0
  229. {fastmcp-2.8.0 → fastmcp-2.9.0}/AGENTS.md +0 -0
  230. {fastmcp-2.8.0 → fastmcp-2.9.0}/LICENSE +0 -0
  231. {fastmcp-2.8.0 → fastmcp-2.9.0}/Windows_Notes.md +0 -0
  232. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/assets/demo-inspector.png +0 -0
  233. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/assets/favicon.ico +0 -0
  234. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/assets/images/tutorial-rest-api-result.png +0 -0
  235. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/assets/logo.png +0 -0
  236. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/assets/updates/release-2-7.png +0 -0
  237. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/getting-started/quickstart.mdx +0 -0
  238. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/integrations/contrib.mdx +0 -0
  239. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/patterns/decorating-methods.mdx +0 -0
  240. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/patterns/http-requests.mdx +0 -0
  241. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/patterns/testing.mdx +0 -0
  242. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/servers/openapi.mdx +0 -0
  243. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/snippets/version-badge.mdx +0 -0
  244. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/style.css +0 -0
  245. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/tutorials/create-mcp-server.mdx +0 -0
  246. {fastmcp-2.8.0 → fastmcp-2.9.0}/docs/tutorials/mcp.mdx +0 -0
  247. {fastmcp-2.8.0/examples/smart_home/src/smart_home → fastmcp-2.9.0/examples/atproto_mcp/src/atproto_mcp}/py.typed +0 -0
  248. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/complex_inputs.py +0 -0
  249. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/config_server.py +0 -0
  250. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/desktop.py +0 -0
  251. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/echo.py +0 -0
  252. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/in_memory_proxy_example.py +0 -0
  253. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/memory.py +0 -0
  254. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/mount_example.py +0 -0
  255. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/sampling.py +0 -0
  256. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/serializer.py +0 -0
  257. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/simple_echo.py +0 -0
  258. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/README.md +0 -0
  259. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/pyproject.toml +0 -0
  260. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/__init__.py +0 -0
  261. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/__main__.py +0 -0
  262. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/hub.py +0 -0
  263. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/lights/__init__.py +0 -0
  264. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/lights/hue_utils.py +0 -0
  265. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/lights/server.py +0 -0
  266. {fastmcp-2.8.0/src/fastmcp → fastmcp-2.9.0/examples/smart_home/src/smart_home}/py.typed +0 -0
  267. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/src/smart_home/settings.py +0 -0
  268. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/smart_home/uv.lock +0 -0
  269. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/tags_example.py +0 -0
  270. {fastmcp-2.8.0 → fastmcp-2.9.0}/examples/text_me.py +0 -0
  271. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/cli/__init__.py +0 -0
  272. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/cli/claude.py +0 -0
  273. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/__init__.py +0 -0
  274. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/auth/__init__.py +0 -0
  275. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/auth/bearer.py +0 -0
  276. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/logging.py +0 -0
  277. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/oauth_callback.py +0 -0
  278. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/progress.py +0 -0
  279. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/client/roots.py +0 -0
  280. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/README.md +0 -0
  281. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/bulk_tool_caller/README.md +0 -0
  282. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/bulk_tool_caller/__init__.py +0 -0
  283. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +0 -0
  284. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/bulk_tool_caller/example.py +0 -0
  285. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/mcp_mixin/__init__.py +0 -0
  286. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/contrib/mcp_mixin/example.py +0 -0
  287. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/exceptions.py +0 -0
  288. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/prompts/__init__.py +0 -0
  289. /fastmcp-2.8.0/src/fastmcp/server/auth/providers/__init__.py → /fastmcp-2.9.0/src/fastmcp/py.typed +0 -0
  290. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/resources/__init__.py +0 -0
  291. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/resources/types.py +0 -0
  292. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/__init__.py +0 -0
  293. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/auth/__init__.py +0 -0
  294. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/auth/auth.py +0 -0
  295. {fastmcp-2.8.0/tests → fastmcp-2.9.0/src/fastmcp/server/auth/providers}/__init__.py +0 -0
  296. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/auth/providers/bearer_env.py +0 -0
  297. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/server/dependencies.py +0 -0
  298. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/tools/__init__.py +0 -0
  299. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/__init__.py +0 -0
  300. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/cache.py +0 -0
  301. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/exceptions.py +0 -0
  302. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/http.py +0 -0
  303. {fastmcp-2.8.0 → fastmcp-2.9.0}/src/fastmcp/utilities/logging.py +0 -0
  304. {fastmcp-2.8.0/tests/auth → fastmcp-2.9.0/tests}/__init__.py +0 -0
  305. {fastmcp-2.8.0/tests/cli → fastmcp-2.9.0/tests/auth}/__init__.py +0 -0
  306. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/auth/providers/test_bearer_env.py +0 -0
  307. {fastmcp-2.8.0/tests/client → fastmcp-2.9.0/tests/cli}/__init__.py +0 -0
  308. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/cli/test_run.py +0 -0
  309. {fastmcp-2.8.0/tests/prompts → fastmcp-2.9.0/tests/client}/__init__.py +0 -0
  310. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_logs.py +0 -0
  311. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_progress.py +0 -0
  312. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_roots.py +0 -0
  313. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_sampling.py +0 -0
  314. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/client/test_stdio.py +0 -0
  315. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/conftest.py +0 -0
  316. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/contrib/__init__.py +0 -0
  317. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/contrib/test_mcp_mixin.py +0 -0
  318. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/deprecated/__init__.py +0 -0
  319. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/deprecated/test_route_type_ignore.py +0 -0
  320. {fastmcp-2.8.0/tests/resources → fastmcp-2.9.0/tests/prompts}/__init__.py +0 -0
  321. {fastmcp-2.8.0/tests/server → fastmcp-2.9.0/tests/resources}/__init__.py +0 -0
  322. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/resources/test_file_resources.py +0 -0
  323. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/resources/test_function_resources.py +0 -0
  324. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/resources/test_resources.py +0 -0
  325. {fastmcp-2.8.0/tests/server/http → fastmcp-2.9.0/tests/server}/__init__.py +0 -0
  326. {fastmcp-2.8.0/tests/server/openapi → fastmcp-2.9.0/tests/server/http}/__init__.py +0 -0
  327. {fastmcp-2.8.0/tests/tools → fastmcp-2.9.0/tests/server/middleware}/__init__.py +0 -0
  328. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/openapi/test_openapi_path_parameters.py +0 -0
  329. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/openapi/test_route_map_fn.py +0 -0
  330. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_file_server.py +0 -0
  331. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_logging.py +0 -0
  332. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/server/test_run_server.py +0 -0
  333. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/test_examples.py +0 -0
  334. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/test_servers/fastmcp_server.py +0 -0
  335. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/test_servers/sse.py +0 -0
  336. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/test_servers/stdio.py +0 -0
  337. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/__init__.py +0 -0
  338. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/openapi/__init__.py +0 -0
  339. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/openapi/conftest.py +0 -0
  340. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/openapi/test_openapi.py +0 -0
  341. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/openapi/test_openapi_fastapi.py +0 -0
  342. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_cache.py +0 -0
  343. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_logging.py +0 -0
  344. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_tests.py +0 -0
  345. {fastmcp-2.8.0 → fastmcp-2.9.0}/tests/utilities/test_typeadapter.py +0 -0
@@ -9,7 +9,7 @@ changelog:
9
9
  - feature
10
10
  exclude:
11
11
  labels:
12
- - breaking change
12
+ - contrib
13
13
 
14
14
  - title: Enhancements 🔧
15
15
  labels:
@@ -17,22 +17,31 @@ changelog:
17
17
  exclude:
18
18
  labels:
19
19
  - breaking change
20
+ - contrib
20
21
 
21
22
  - title: Fixes 🐞
22
23
  labels:
23
24
  - bug
24
25
  exclude:
25
26
  labels:
26
- - breaking change
27
+ - contrib
27
28
 
28
29
  - title: Breaking Changes 🛫
29
30
  labels:
30
31
  - breaking change
32
+ exclude:
33
+ labels:
34
+ - contrib
31
35
 
32
36
  - title: Docs 📚
33
37
  labels:
34
38
  - documentation
35
39
 
40
+ - title: Examples & Contrib 💡
41
+ labels:
42
+ - example
43
+ - contrib
44
+
36
45
  - title: Dependencies 📦
37
46
  labels:
38
47
  - dependencies
@@ -1,4 +1,4 @@
1
- fail_fast: true
1
+ fail_fast: false
2
2
 
3
3
  repos:
4
4
  - repo: https://github.com/abravalheri/validate-pyproject
@@ -0,0 +1,36 @@
1
+ # FastMCP Development Guidelines
2
+
3
+ ## Testing and Investigation
4
+
5
+ ### In-Memory Transport - Always Preferred
6
+
7
+ When testing or investigating FastMCP servers, **always prefer the in-memory transport** unless you specifically need HTTP transport features. Pass a FastMCP server directly to a Client to eliminate separate processes and network complexity.
8
+
9
+ ```python
10
+ # Create your FastMCP server
11
+ mcp = FastMCP("TestServer")
12
+
13
+ @mcp.tool
14
+ def greet(name: str) -> str:
15
+ return f"Hello, {name}!"
16
+
17
+ # Pass server directly to client - uses in-memory transport
18
+ async with Client(mcp) as client:
19
+ result = await client.call_tool("greet", {"name": "World"})
20
+ ```
21
+
22
+ ### When to Use HTTP Transport
23
+
24
+ Only use HTTP transport when testing network-specific features. Prefer StreamableHttp over SSE as it's the modern approach.
25
+
26
+ ```python
27
+ # Only when network testing is required
28
+ async with Client(transport=StreamableHttpTransport(server_url)) as client:
29
+ result = await client.ping()
30
+ ```
31
+
32
+ ## Development Workflow
33
+
34
+ - You must always run pre-commit if you open a PR, because it is run as part of a required check.
35
+ - When opening PRs, apply labels appropriately for bugs/breaking changes/enhancements/features. Generally, improvements are enhancements (not features) unless told otherwise.
36
+ - NEVER modify files in docs/python-sdk/**, as they are auto-generated.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastmcp
3
- Version: 2.8.0
3
+ Version: 2.9.0
4
4
  Summary: The fast, Pythonic way to build MCP servers.
5
5
  Project-URL: Homepage, https://gofastmcp.com
6
6
  Project-URL: Repository, https://github.com/jlowin/fastmcp
@@ -20,7 +20,7 @@ Requires-Python: >=3.10
20
20
  Requires-Dist: authlib>=1.5.2
21
21
  Requires-Dist: exceptiongroup>=1.2.2
22
22
  Requires-Dist: httpx>=0.28.1
23
- Requires-Dist: mcp<2.0.0,>=1.9.2
23
+ Requires-Dist: mcp<2.0.0,>=1.9.4
24
24
  Requires-Dist: openapi-pydantic>=0.5.1
25
25
  Requires-Dist: python-dotenv>=1.1.0
26
26
  Requires-Dist: rich>=13.9.4
@@ -33,6 +33,7 @@ Description-Content-Type: text/markdown
33
33
 
34
34
  <!-- omit in toc -->
35
35
  # FastMCP v2 🚀
36
+
36
37
  <strong>The fast, Pythonic way to build MCP servers and clients.</strong>
37
38
 
38
39
  *FastMCP is made with 💙 by [Prefect](https://www.prefect.io/)*
@@ -46,13 +47,16 @@ Description-Content-Type: text/markdown
46
47
  </div>
47
48
 
48
49
  > [!Note]
50
+ >
49
51
  > #### Beyond the Protocol
50
- >
51
- > FastMCP is the standard framework for working with the Model Context Protocol. FastMCP 1.0 was incorporated into the [official low-level Python SDK](https://github.com/modelcontextprotocol/python-sdk), and FastMCP 2.0 *(this project)* provides a complete toolkit for working with the MCP ecosystem.
52
52
  >
53
- > FastMCP has a comprehensive set of features that go far beyond the core MCP specification, all in service of providing **the simplest path to production**. These include client support, server composition, auth, automatic generation from OpenAPI specs, remote server proxying, built-in testing tools, integrations, and more.
53
+ > FastMCP is the standard framework for working with the Model Context Protocol. FastMCP 1.0 was incorporated into the [official MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) in 2024.
54
+ >
55
+ > This is FastMCP 2.0, the **actively maintained version** that provides a complete toolkit for working with the MCP ecosystem.
54
56
  >
55
- > Ready to upgrade or get started? Follow the [installation instructions](/getting-started/installation), which include specific steps for upgrading from the official MCP SDK.
57
+ > FastMCP 2.0 has a comprehensive set of features that go far beyond the core MCP specification, all in service of providing **the simplest path to production**. These include deployment, auth, clients, server proxying and composition, generating servers from REST APIs, dynamic tool rewriting, built-in testing tools, integrations, and more.
58
+ >
59
+ > Ready to upgrade or get started? Follow the [installation instructions](https://gofastmcp.com/getting-started/installation), which include steps for upgrading from the official MCP SDK.
56
60
 
57
61
  ---
58
62
 
@@ -74,6 +78,7 @@ if __name__ == "__main__":
74
78
  ```
75
79
 
76
80
  Run the server locally:
81
+
77
82
  ```bash
78
83
  fastmcp run server.py
79
84
  ```
@@ -82,9 +87,10 @@ fastmcp run server.py
82
87
 
83
88
  FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns. This readme provides only a high-level overview.
84
89
 
85
- Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily.
90
+ Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily.
86
91
 
87
92
  There are two ways to access the LLM-friendly documentation:
93
+
88
94
  - [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
89
95
  - [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
90
96
 
@@ -174,7 +180,7 @@ Learn more in the [**FastMCP Server Documentation**](https://gofastmcp.com/serve
174
180
 
175
181
  ### Tools
176
182
 
177
- Tools allow LLMs to perform actions by executing your Python functions (sync or async). Ideal for computations, API calls, or side effects (like `POST`/`PUT`). FastMCP handles schema generation from type hints and docstrings. Tools can return various types, including text, JSON-serializable objects, and even images using the [`fastmcp.Image`](https://gofastmcp.com/servers/tools#return-values) helper.
183
+ Tools allow LLMs to perform actions by executing your Python functions (sync or async). Ideal for computations, API calls, or side effects (like `POST`/`PUT`). FastMCP handles schema generation from type hints and docstrings. Tools can return various types, including text, JSON-serializable objects, and even images or audio aided by the FastMCP media helper classes.
178
184
 
179
185
  ```python
180
186
  @mcp.tool
@@ -220,12 +226,13 @@ Learn more in the [**Prompts Documentation**](https://gofastmcp.com/servers/prom
220
226
  ### Context
221
227
 
222
228
  Access MCP session capabilities within your tools, resources, or prompts by adding a `ctx: Context` parameter. Context provides methods for:
223
- * **Logging:** Log messages to MCP clients with `ctx.info()`, `ctx.error()`, etc.
224
- * **LLM Sampling:** Use `ctx.sample()` to request completions from the client's LLM.
225
- * **HTTP Request:** Use `ctx.http_request()` to make HTTP requests to other servers.
226
- * **Resource Access:** Use `ctx.read_resource()` to access resources on the server
227
- * **Progress Reporting:** Use `ctx.report_progress()` to report progress to the client.
228
- * and more...
229
+
230
+ - **Logging:** Log messages to MCP clients with `ctx.info()`, `ctx.error()`, etc.
231
+ - **LLM Sampling:** Use `ctx.sample()` to request completions from the client's LLM.
232
+ - **HTTP Request:** Use `ctx.http_request()` to make HTTP requests to other servers.
233
+ - **Resource Access:** Use `ctx.read_resource()` to access resources on the server
234
+ - **Progress Reporting:** Use `ctx.report_progress()` to report progress to the client.
235
+ - and more...
229
236
 
230
237
  To access the context, add a parameter annotated as `Context` to any mcp-decorated function. FastMCP will automatically inject the correct context object when the function is called.
231
238
 
@@ -365,16 +372,19 @@ if __name__ == "__main__":
365
372
  FastMCP supports three transport protocols:
366
373
 
367
374
  **STDIO (Default)**: Best for local tools and command-line scripts.
375
+
368
376
  ```python
369
377
  mcp.run(transport="stdio") # Default, so transport argument is optional
370
378
  ```
371
379
 
372
380
  **Streamable HTTP**: Recommended for web deployments.
381
+
373
382
  ```python
374
- mcp.run(transport="streamable-http", host="127.0.0.1", port=8000, path="/mcp")
383
+ mcp.run(transport="http", host="127.0.0.1", port=8000, path="/mcp")
375
384
  ```
376
385
 
377
386
  **SSE**: For compatibility with existing SSE clients.
387
+
378
388
  ```python
379
389
  mcp.run(transport="sse", host="127.0.0.1", port=8000)
380
390
  ```
@@ -387,22 +397,26 @@ Contributions are the core of open source! We welcome improvements and features.
387
397
 
388
398
  ### Prerequisites
389
399
 
390
- * Python 3.10+
391
- * [uv](https://docs.astral.sh/uv/) (Recommended for environment management)
400
+ - Python 3.10+
401
+ - [uv](https://docs.astral.sh/uv/) (Recommended for environment management)
392
402
 
393
403
  ### Setup
394
404
 
395
- 1. Clone the repository:
405
+ 1. Clone the repository:
406
+
396
407
  ```bash
397
408
  git clone https://github.com/jlowin/fastmcp.git
398
409
  cd fastmcp
399
410
  ```
400
- 2. Create and sync the environment:
411
+
412
+ 2. Create and sync the environment:
413
+
401
414
  ```bash
402
415
  uv sync
403
416
  ```
417
+
404
418
  This installs all dependencies, including dev tools.
405
-
419
+
406
420
  3. Activate the virtual environment (e.g., `source .venv/bin/activate` or via your IDE).
407
421
 
408
422
  ### Unit Tests
@@ -410,10 +424,13 @@ Contributions are the core of open source! We welcome improvements and features.
410
424
  FastMCP has a comprehensive unit test suite. All PRs must introduce or update tests as appropriate and pass the full suite.
411
425
 
412
426
  Run tests using pytest:
427
+
413
428
  ```bash
414
429
  pytest
415
430
  ```
431
+
416
432
  or if you want an overview of the code coverage
433
+
417
434
  ```bash
418
435
  uv run pytest --cov=src --cov=examples --cov-report=html
419
436
  ```
@@ -423,10 +440,13 @@ uv run pytest --cov=src --cov=examples --cov-report=html
423
440
  FastMCP uses `pre-commit` for code formatting, linting, and type-checking. All PRs must pass these checks (they run automatically in CI).
424
441
 
425
442
  Install the hooks locally:
443
+
426
444
  ```bash
427
445
  uv run pre-commit install
428
446
  ```
447
+
429
448
  The hooks will now run automatically on `git commit`. You can also run them manually at any time:
449
+
430
450
  ```bash
431
451
  pre-commit run --all-files
432
452
  # or via uv
@@ -435,11 +455,11 @@ uv run pre-commit run --all-files
435
455
 
436
456
  ### Pull Requests
437
457
 
438
- 1. Fork the repository on GitHub.
439
- 2. Create a feature branch from `main`.
440
- 3. Make your changes, including tests and documentation updates.
441
- 4. Ensure tests and pre-commit hooks pass.
442
- 5. Commit your changes and push to your fork.
443
- 6. Open a pull request against the `main` branch of `jlowin/fastmcp`.
458
+ 1. Fork the repository on GitHub.
459
+ 2. Create a feature branch from `main`.
460
+ 3. Make your changes, including tests and documentation updates.
461
+ 4. Ensure tests and pre-commit hooks pass.
462
+ 5. Commit your changes and push to your fork.
463
+ 6. Open a pull request against the `main` branch of `jlowin/fastmcp`.
444
464
 
445
- Please open an issue or discussion for questions or suggestions before starting significant work!
465
+ Please open an issue or discussion for questions or suggestions before starting significant work!
@@ -2,6 +2,7 @@
2
2
 
3
3
  <!-- omit in toc -->
4
4
  # FastMCP v2 🚀
5
+
5
6
  <strong>The fast, Pythonic way to build MCP servers and clients.</strong>
6
7
 
7
8
  *FastMCP is made with 💙 by [Prefect](https://www.prefect.io/)*
@@ -15,13 +16,16 @@
15
16
  </div>
16
17
 
17
18
  > [!Note]
19
+ >
18
20
  > #### Beyond the Protocol
19
- >
20
- > FastMCP is the standard framework for working with the Model Context Protocol. FastMCP 1.0 was incorporated into the [official low-level Python SDK](https://github.com/modelcontextprotocol/python-sdk), and FastMCP 2.0 *(this project)* provides a complete toolkit for working with the MCP ecosystem.
21
21
  >
22
- > FastMCP has a comprehensive set of features that go far beyond the core MCP specification, all in service of providing **the simplest path to production**. These include client support, server composition, auth, automatic generation from OpenAPI specs, remote server proxying, built-in testing tools, integrations, and more.
22
+ > FastMCP is the standard framework for working with the Model Context Protocol. FastMCP 1.0 was incorporated into the [official MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) in 2024.
23
+ >
24
+ > This is FastMCP 2.0, the **actively maintained version** that provides a complete toolkit for working with the MCP ecosystem.
23
25
  >
24
- > Ready to upgrade or get started? Follow the [installation instructions](/getting-started/installation), which include specific steps for upgrading from the official MCP SDK.
26
+ > FastMCP 2.0 has a comprehensive set of features that go far beyond the core MCP specification, all in service of providing **the simplest path to production**. These include deployment, auth, clients, server proxying and composition, generating servers from REST APIs, dynamic tool rewriting, built-in testing tools, integrations, and more.
27
+ >
28
+ > Ready to upgrade or get started? Follow the [installation instructions](https://gofastmcp.com/getting-started/installation), which include steps for upgrading from the official MCP SDK.
25
29
 
26
30
  ---
27
31
 
@@ -43,6 +47,7 @@ if __name__ == "__main__":
43
47
  ```
44
48
 
45
49
  Run the server locally:
50
+
46
51
  ```bash
47
52
  fastmcp run server.py
48
53
  ```
@@ -51,9 +56,10 @@ fastmcp run server.py
51
56
 
52
57
  FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns. This readme provides only a high-level overview.
53
58
 
54
- Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily.
59
+ Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily.
55
60
 
56
61
  There are two ways to access the LLM-friendly documentation:
62
+
57
63
  - [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
58
64
  - [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
59
65
 
@@ -143,7 +149,7 @@ Learn more in the [**FastMCP Server Documentation**](https://gofastmcp.com/serve
143
149
 
144
150
  ### Tools
145
151
 
146
- Tools allow LLMs to perform actions by executing your Python functions (sync or async). Ideal for computations, API calls, or side effects (like `POST`/`PUT`). FastMCP handles schema generation from type hints and docstrings. Tools can return various types, including text, JSON-serializable objects, and even images using the [`fastmcp.Image`](https://gofastmcp.com/servers/tools#return-values) helper.
152
+ Tools allow LLMs to perform actions by executing your Python functions (sync or async). Ideal for computations, API calls, or side effects (like `POST`/`PUT`). FastMCP handles schema generation from type hints and docstrings. Tools can return various types, including text, JSON-serializable objects, and even images or audio aided by the FastMCP media helper classes.
147
153
 
148
154
  ```python
149
155
  @mcp.tool
@@ -189,12 +195,13 @@ Learn more in the [**Prompts Documentation**](https://gofastmcp.com/servers/prom
189
195
  ### Context
190
196
 
191
197
  Access MCP session capabilities within your tools, resources, or prompts by adding a `ctx: Context` parameter. Context provides methods for:
192
- * **Logging:** Log messages to MCP clients with `ctx.info()`, `ctx.error()`, etc.
193
- * **LLM Sampling:** Use `ctx.sample()` to request completions from the client's LLM.
194
- * **HTTP Request:** Use `ctx.http_request()` to make HTTP requests to other servers.
195
- * **Resource Access:** Use `ctx.read_resource()` to access resources on the server
196
- * **Progress Reporting:** Use `ctx.report_progress()` to report progress to the client.
197
- * and more...
198
+
199
+ - **Logging:** Log messages to MCP clients with `ctx.info()`, `ctx.error()`, etc.
200
+ - **LLM Sampling:** Use `ctx.sample()` to request completions from the client's LLM.
201
+ - **HTTP Request:** Use `ctx.http_request()` to make HTTP requests to other servers.
202
+ - **Resource Access:** Use `ctx.read_resource()` to access resources on the server
203
+ - **Progress Reporting:** Use `ctx.report_progress()` to report progress to the client.
204
+ - and more...
198
205
 
199
206
  To access the context, add a parameter annotated as `Context` to any mcp-decorated function. FastMCP will automatically inject the correct context object when the function is called.
200
207
 
@@ -334,16 +341,19 @@ if __name__ == "__main__":
334
341
  FastMCP supports three transport protocols:
335
342
 
336
343
  **STDIO (Default)**: Best for local tools and command-line scripts.
344
+
337
345
  ```python
338
346
  mcp.run(transport="stdio") # Default, so transport argument is optional
339
347
  ```
340
348
 
341
349
  **Streamable HTTP**: Recommended for web deployments.
350
+
342
351
  ```python
343
- mcp.run(transport="streamable-http", host="127.0.0.1", port=8000, path="/mcp")
352
+ mcp.run(transport="http", host="127.0.0.1", port=8000, path="/mcp")
344
353
  ```
345
354
 
346
355
  **SSE**: For compatibility with existing SSE clients.
356
+
347
357
  ```python
348
358
  mcp.run(transport="sse", host="127.0.0.1", port=8000)
349
359
  ```
@@ -356,22 +366,26 @@ Contributions are the core of open source! We welcome improvements and features.
356
366
 
357
367
  ### Prerequisites
358
368
 
359
- * Python 3.10+
360
- * [uv](https://docs.astral.sh/uv/) (Recommended for environment management)
369
+ - Python 3.10+
370
+ - [uv](https://docs.astral.sh/uv/) (Recommended for environment management)
361
371
 
362
372
  ### Setup
363
373
 
364
- 1. Clone the repository:
374
+ 1. Clone the repository:
375
+
365
376
  ```bash
366
377
  git clone https://github.com/jlowin/fastmcp.git
367
378
  cd fastmcp
368
379
  ```
369
- 2. Create and sync the environment:
380
+
381
+ 2. Create and sync the environment:
382
+
370
383
  ```bash
371
384
  uv sync
372
385
  ```
386
+
373
387
  This installs all dependencies, including dev tools.
374
-
388
+
375
389
  3. Activate the virtual environment (e.g., `source .venv/bin/activate` or via your IDE).
376
390
 
377
391
  ### Unit Tests
@@ -379,10 +393,13 @@ Contributions are the core of open source! We welcome improvements and features.
379
393
  FastMCP has a comprehensive unit test suite. All PRs must introduce or update tests as appropriate and pass the full suite.
380
394
 
381
395
  Run tests using pytest:
396
+
382
397
  ```bash
383
398
  pytest
384
399
  ```
400
+
385
401
  or if you want an overview of the code coverage
402
+
386
403
  ```bash
387
404
  uv run pytest --cov=src --cov=examples --cov-report=html
388
405
  ```
@@ -392,10 +409,13 @@ uv run pytest --cov=src --cov=examples --cov-report=html
392
409
  FastMCP uses `pre-commit` for code formatting, linting, and type-checking. All PRs must pass these checks (they run automatically in CI).
393
410
 
394
411
  Install the hooks locally:
412
+
395
413
  ```bash
396
414
  uv run pre-commit install
397
415
  ```
416
+
398
417
  The hooks will now run automatically on `git commit`. You can also run them manually at any time:
418
+
399
419
  ```bash
400
420
  pre-commit run --all-files
401
421
  # or via uv
@@ -404,11 +424,11 @@ uv run pre-commit run --all-files
404
424
 
405
425
  ### Pull Requests
406
426
 
407
- 1. Fork the repository on GitHub.
408
- 2. Create a feature branch from `main`.
409
- 3. Make your changes, including tests and documentation updates.
410
- 4. Ensure tests and pre-commit hooks pass.
411
- 5. Commit your changes and push to your fork.
412
- 6. Open a pull request against the `main` branch of `jlowin/fastmcp`.
427
+ 1. Fork the repository on GitHub.
428
+ 2. Create a feature branch from `main`.
429
+ 3. Make your changes, including tests and documentation updates.
430
+ 4. Ensure tests and pre-commit hooks pass.
431
+ 5. Commit your changes and push to your fork.
432
+ 6. Open a pull request against the `main` branch of `jlowin/fastmcp`.
413
433
 
414
- Please open an issue or discussion for questions or suggestions before starting significant work!
434
+ Please open an issue or discussion for questions or suggestions before starting significant work!