fastmcp 2.6.0__tar.gz → 2.6.1__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 (221) hide show
  1. {fastmcp-2.6.0 → fastmcp-2.6.1}/PKG-INFO +20 -9
  2. {fastmcp-2.6.0 → fastmcp-2.6.1}/README.md +19 -8
  3. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/clients/auth/bearer.mdx +1 -1
  4. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/clients/auth/oauth.mdx +3 -3
  5. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/deployment/running-server.mdx +2 -2
  6. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/docs.json +3 -2
  7. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/getting-started/welcome.mdx +1 -2
  8. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/integrations/anthropic.mdx +7 -1
  9. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/integrations/claude-desktop.mdx +1 -1
  10. fastmcp-2.6.1/docs/integrations/gemini.mdx +108 -0
  11. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/integrations/openai.mdx +8 -2
  12. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/auth/bearer.mdx +6 -2
  13. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/composition.mdx +1 -1
  14. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/fastmcp.mdx +3 -29
  15. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/snippets/version-badge.mdx +3 -4
  16. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/style.css +13 -11
  17. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/auth/oauth.py +0 -3
  18. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/auth/providers/in_memory.py +1 -6
  19. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/server.py +0 -10
  20. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/deprecated/test_deprecated.py +0 -11
  21. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_auth_integration.py +1 -1
  22. fastmcp-2.6.1/tests/tools/__init__.py +0 -0
  23. fastmcp-2.6.0/server.py +0 -26
  24. {fastmcp-2.6.0 → fastmcp-2.6.1}/.cursor/rules/core-mcp-objects.mdc +0 -0
  25. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  26. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  27. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/ISSUE_TEMPLATE/enhancement.yml +0 -0
  28. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/labeler.yml +0 -0
  29. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/release.yml +0 -0
  30. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/workflows/labeler.yml +0 -0
  31. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/workflows/publish.yml +0 -0
  32. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/workflows/run-static.yml +0 -0
  33. {fastmcp-2.6.0 → fastmcp-2.6.1}/.github/workflows/run-tests.yml +0 -0
  34. {fastmcp-2.6.0 → fastmcp-2.6.1}/.gitignore +0 -0
  35. {fastmcp-2.6.0 → fastmcp-2.6.1}/.pre-commit-config.yaml +0 -0
  36. {fastmcp-2.6.0 → fastmcp-2.6.1}/AGENTS.md +0 -0
  37. {fastmcp-2.6.0 → fastmcp-2.6.1}/LICENSE +0 -0
  38. {fastmcp-2.6.0 → fastmcp-2.6.1}/Windows_Notes.md +0 -0
  39. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/assets/demo-inspector.png +0 -0
  40. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/assets/favicon.ico +0 -0
  41. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/assets/logo.png +0 -0
  42. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/clients/advanced-features.mdx +0 -0
  43. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/clients/client.mdx +0 -0
  44. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/clients/transports.mdx +0 -0
  45. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/deployment/asgi.mdx +0 -0
  46. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/getting-started/installation.mdx +0 -0
  47. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/getting-started/quickstart.mdx +0 -0
  48. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/integrations/contrib.mdx +0 -0
  49. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/patterns/cli.mdx +0 -0
  50. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/patterns/decorating-methods.mdx +0 -0
  51. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/patterns/http-requests.mdx +0 -0
  52. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/patterns/testing.mdx +0 -0
  53. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/context.mdx +0 -0
  54. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/openapi.mdx +0 -0
  55. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/prompts.mdx +0 -0
  56. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/proxy.mdx +0 -0
  57. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/resources.mdx +0 -0
  58. {fastmcp-2.6.0 → fastmcp-2.6.1}/docs/servers/tools.mdx +0 -0
  59. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/complex_inputs.py +0 -0
  60. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/desktop.py +0 -0
  61. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/echo.py +0 -0
  62. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/in_memory_proxy_example.py +0 -0
  63. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/memory.py +0 -0
  64. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/mount_example.py +0 -0
  65. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/sampling.py +0 -0
  66. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/screenshot.py +0 -0
  67. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/serializer.py +0 -0
  68. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/simple_echo.py +0 -0
  69. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/README.md +0 -0
  70. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/pyproject.toml +0 -0
  71. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/__init__.py +0 -0
  72. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/__main__.py +0 -0
  73. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/hub.py +0 -0
  74. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/lights/__init__.py +0 -0
  75. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/lights/hue_utils.py +0 -0
  76. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/lights/server.py +0 -0
  77. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/py.typed +0 -0
  78. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/src/smart_home/settings.py +0 -0
  79. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/smart_home/uv.lock +0 -0
  80. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/tags_example.py +0 -0
  81. {fastmcp-2.6.0 → fastmcp-2.6.1}/examples/text_me.py +0 -0
  82. {fastmcp-2.6.0 → fastmcp-2.6.1}/justfile +0 -0
  83. {fastmcp-2.6.0 → fastmcp-2.6.1}/pyproject.toml +0 -0
  84. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/__init__.py +0 -0
  85. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/cli/__init__.py +0 -0
  86. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/cli/claude.py +0 -0
  87. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/cli/cli.py +0 -0
  88. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/cli/run.py +0 -0
  89. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/__init__.py +0 -0
  90. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/auth/__init__.py +0 -0
  91. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/auth/bearer.py +0 -0
  92. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/client.py +0 -0
  93. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/logging.py +0 -0
  94. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/oauth_callback.py +0 -0
  95. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/progress.py +0 -0
  96. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/roots.py +0 -0
  97. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/sampling.py +0 -0
  98. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/client/transports.py +0 -0
  99. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/README.md +0 -0
  100. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/bulk_tool_caller/README.md +0 -0
  101. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/bulk_tool_caller/__init__.py +0 -0
  102. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +0 -0
  103. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/bulk_tool_caller/example.py +0 -0
  104. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/mcp_mixin/README.md +0 -0
  105. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/mcp_mixin/__init__.py +0 -0
  106. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/mcp_mixin/example.py +0 -0
  107. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py +0 -0
  108. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/exceptions.py +0 -0
  109. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/prompts/__init__.py +0 -0
  110. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/prompts/prompt.py +0 -0
  111. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/prompts/prompt_manager.py +0 -0
  112. /fastmcp-2.6.0/src/fastmcp/server/auth/providers/__init__.py → /fastmcp-2.6.1/src/fastmcp/py.typed +0 -0
  113. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/resources/__init__.py +0 -0
  114. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/resources/resource.py +0 -0
  115. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/resources/resource_manager.py +0 -0
  116. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/resources/template.py +0 -0
  117. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/resources/types.py +0 -0
  118. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/__init__.py +0 -0
  119. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/auth/__init__.py +0 -0
  120. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/auth/auth.py +0 -0
  121. {fastmcp-2.6.0/tests → fastmcp-2.6.1/src/fastmcp/server/auth/providers}/__init__.py +0 -0
  122. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/auth/providers/bearer.py +0 -0
  123. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/auth/providers/bearer_env.py +0 -0
  124. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/context.py +0 -0
  125. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/dependencies.py +0 -0
  126. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/http.py +0 -0
  127. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/openapi.py +0 -0
  128. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/server/proxy.py +0 -0
  129. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/settings.py +0 -0
  130. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/tools/__init__.py +0 -0
  131. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/tools/tool.py +0 -0
  132. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/tools/tool_manager.py +0 -0
  133. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/__init__.py +0 -0
  134. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/cache.py +0 -0
  135. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/decorators.py +0 -0
  136. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/exceptions.py +0 -0
  137. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/http.py +0 -0
  138. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/json_schema.py +0 -0
  139. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/logging.py +0 -0
  140. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/mcp_config.py +0 -0
  141. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/openapi.py +0 -0
  142. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/tests.py +0 -0
  143. {fastmcp-2.6.0 → fastmcp-2.6.1}/src/fastmcp/utilities/types.py +0 -0
  144. {fastmcp-2.6.0/tests/auth → fastmcp-2.6.1/tests}/__init__.py +0 -0
  145. {fastmcp-2.6.0/tests/cli → fastmcp-2.6.1/tests/auth}/__init__.py +0 -0
  146. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/auth/providers/test_bearer.py +0 -0
  147. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/auth/providers/test_bearer_env.py +0 -0
  148. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/auth/test_oauth_client.py +0 -0
  149. {fastmcp-2.6.0/tests/client → fastmcp-2.6.1/tests/cli}/__init__.py +0 -0
  150. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/cli/test_cli.py +0 -0
  151. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/cli/test_run.py +0 -0
  152. {fastmcp-2.6.0/tests/deprecated → fastmcp-2.6.1/tests/client}/__init__.py +0 -0
  153. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_client.py +0 -0
  154. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_logs.py +0 -0
  155. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_openapi.py +0 -0
  156. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_progress.py +0 -0
  157. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_roots.py +0 -0
  158. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_sampling.py +0 -0
  159. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_sse.py +0 -0
  160. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_stdio.py +0 -0
  161. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/client/test_streamable_http.py +0 -0
  162. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/conftest.py +0 -0
  163. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/contrib/__init__.py +0 -0
  164. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/contrib/test_bulk_tool_caller.py +0 -0
  165. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/contrib/test_mcp_mixin.py +0 -0
  166. {fastmcp-2.6.0/tests/prompts → fastmcp-2.6.1/tests/deprecated}/__init__.py +0 -0
  167. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/deprecated/test_mount_separators.py +0 -0
  168. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/deprecated/test_resource_prefixes.py +0 -0
  169. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/deprecated/test_route_type_ignore.py +0 -0
  170. {fastmcp-2.6.0/tests/resources → fastmcp-2.6.1/tests/prompts}/__init__.py +0 -0
  171. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/prompts/test_prompt.py +0 -0
  172. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/prompts/test_prompt_manager.py +0 -0
  173. {fastmcp-2.6.0/tests/server → fastmcp-2.6.1/tests/resources}/__init__.py +0 -0
  174. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/resources/test_file_resources.py +0 -0
  175. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/resources/test_function_resources.py +0 -0
  176. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/resources/test_resource_manager.py +0 -0
  177. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/resources/test_resource_template.py +0 -0
  178. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/resources/test_resources.py +0 -0
  179. {fastmcp-2.6.0/tests/server/http → fastmcp-2.6.1/tests/server}/__init__.py +0 -0
  180. {fastmcp-2.6.0/tests/server/openapi → fastmcp-2.6.1/tests/server/http}/__init__.py +0 -0
  181. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/http/test_custom_routes.py +0 -0
  182. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/http/test_http_dependencies.py +0 -0
  183. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/http/test_http_middleware.py +0 -0
  184. {fastmcp-2.6.0/tests/tools → fastmcp-2.6.1/tests/server/openapi}/__init__.py +0 -0
  185. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/openapi/test_openapi.py +0 -0
  186. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/openapi/test_openapi_path_parameters.py +0 -0
  187. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/openapi/test_route_map_fn.py +0 -0
  188. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_app_state.py +0 -0
  189. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_context.py +0 -0
  190. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_file_server.py +0 -0
  191. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_import_server.py +0 -0
  192. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_logging.py +0 -0
  193. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_mount.py +0 -0
  194. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_proxy.py +0 -0
  195. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_resource_prefix_formats.py +0 -0
  196. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_run_server.py +0 -0
  197. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_server.py +0 -0
  198. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_server_interactions.py +0 -0
  199. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_tool_annotations.py +0 -0
  200. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/server/test_tool_exclude_args.py +0 -0
  201. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/test_examples.py +0 -0
  202. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/test_servers/fastmcp_server.py +0 -0
  203. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/test_servers/sse.py +0 -0
  204. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/test_servers/stdio.py +0 -0
  205. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/tools/test_tool.py +0 -0
  206. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/tools/test_tool_manager.py +0 -0
  207. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/__init__.py +0 -0
  208. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/openapi/__init__.py +0 -0
  209. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/openapi/conftest.py +0 -0
  210. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/openapi/test_openapi.py +0 -0
  211. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/openapi/test_openapi_advanced.py +0 -0
  212. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/openapi/test_openapi_fastapi.py +0 -0
  213. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_cache.py +0 -0
  214. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_decorated_function.py +0 -0
  215. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_json_schema.py +0 -0
  216. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_logging.py +0 -0
  217. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_mcp_config.py +0 -0
  218. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_tests.py +0 -0
  219. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_typeadapter.py +0 -0
  220. {fastmcp-2.6.0 → fastmcp-2.6.1}/tests/utilities/test_types.py +0 -0
  221. {fastmcp-2.6.0 → fastmcp-2.6.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastmcp
3
- Version: 2.6.0
3
+ Version: 2.6.1
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
@@ -104,6 +104,7 @@ There are two ways to access the LLM-friendly documentation:
104
104
  - [Proxy Servers](#proxy-servers)
105
105
  - [Composing MCP Servers](#composing-mcp-servers)
106
106
  - [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
107
+ - [Authentication \& Security](#authentication--security)
107
108
  - [Running Your Server](#running-your-server)
108
109
  - [Contributing](#contributing)
109
110
  - [Prerequisites](#prerequisites)
@@ -116,20 +117,20 @@ There are two ways to access the LLM-friendly documentation:
116
117
 
117
118
  ## What is MCP?
118
119
 
119
- The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
120
+ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It is often described as "the USB-C port for AI", providing a uniform way to connect LLMs to resources they can use. It may be easier to think of it as an API, but specifically designed for LLM interactions. MCP servers can:
120
121
 
121
- - Expose data through **Resources** (similar to `GET` requests; load info into context)
122
- - Provide functionality through **Tools** (similar to `POST`/`PUT` requests; execute actions)
123
- - Define interaction patterns through **Prompts** (reusable templates)
122
+ - Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
123
+ - Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
124
+ - Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
124
125
  - And more!
125
126
 
126
- FastMCP provides a high-level, Pythonic interface for building and interacting with these servers.
127
+ FastMCP provides a high-level, Pythonic interface for building, managing, and interacting with these servers.
127
128
 
128
129
  ## Why FastMCP?
129
130
 
130
131
  The MCP protocol is powerful but implementing it involves a lot of boilerplate - server setup, protocol handlers, content types, error management. FastMCP handles all the complex protocol details and server management, so you can focus on building great tools. It's designed to be high-level and Pythonic; in most cases, decorating a function is all you need.
131
132
 
132
- While the core server concepts of FastMCP 1.0 laid the groundwork and were contributed to the official MCP SDK, **FastMCP 2.0 (this project) is the actively developed successor**, adding significant enhancements and entirely new capabilities like a powerful **client library**, server **proxying**, **composition** patterns, **OpenAPI/FastAPI integration**, and much more.
133
+ FastMCP 2.0 has evolved into a comprehensive platform that goes far beyond basic protocol implementation. While 1.0 provided server-building capabilities (and is now part of the official MCP SDK), 2.0 offers a complete ecosystem including client libraries, authentication systems, deployment tools, integrations with major AI platforms, testing frameworks, and production-ready infrastructure patterns.
133
134
 
134
135
  FastMCP aims to be:
135
136
 
@@ -139,7 +140,7 @@ FastMCP aims to be:
139
140
 
140
141
  🐍 **Pythonic:** Feels natural to Python developers
141
142
 
142
- 🔍 **Complete:** FastMCP aims to provide a full implementation of the core MCP specification for both servers and clients
143
+ 🔍 **Complete:** A comprehensive platform for all MCP use cases, from dev to prod
143
144
 
144
145
  ## Installation
145
146
 
@@ -157,7 +158,7 @@ These are the building blocks for creating MCP servers and clients with FastMCP.
157
158
 
158
159
  ### The `FastMCP` Server
159
160
 
160
- The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like [authentication providers](https://gofastmcp.com/servers/fastmcp#authentication).
161
+ The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like authentication.
161
162
 
162
163
  ```python
163
164
  from fastmcp import FastMCP
@@ -330,6 +331,16 @@ Automatically generate FastMCP servers from existing OpenAPI specifications (`Fa
330
331
 
331
332
  Learn more: [**OpenAPI Integration**](https://gofastmcp.com/patterns/openapi) | [**FastAPI Integration**](https://gofastmcp.com/patterns/fastapi).
332
333
 
334
+ ### Authentication & Security
335
+
336
+ FastMCP provides built-in authentication support to secure both your MCP servers and clients in production environments. Protect your server endpoints from unauthorized access and authenticate your clients against secured MCP servers using industry-standard protocols.
337
+
338
+ - **Server Protection**: Secure your FastMCP server endpoints with configurable authentication providers
339
+ - **Client Authentication**: Connect to authenticated MCP servers with automatic credential management
340
+ - **Production Ready**: Support for common authentication patterns used in enterprise environments
341
+
342
+ Learn more in the **Authentication Documentation** for [servers](https://gofastmcp.com/servers/auth) and [clients](https://gofastmcp.com/clients/auth).
343
+
333
344
  ## Running Your Server
334
345
 
335
346
  The main way to run a FastMCP server is by calling the `run()` method on your server instance:
@@ -74,6 +74,7 @@ There are two ways to access the LLM-friendly documentation:
74
74
  - [Proxy Servers](#proxy-servers)
75
75
  - [Composing MCP Servers](#composing-mcp-servers)
76
76
  - [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
77
+ - [Authentication \& Security](#authentication--security)
77
78
  - [Running Your Server](#running-your-server)
78
79
  - [Contributing](#contributing)
79
80
  - [Prerequisites](#prerequisites)
@@ -86,20 +87,20 @@ There are two ways to access the LLM-friendly documentation:
86
87
 
87
88
  ## What is MCP?
88
89
 
89
- The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
90
+ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It is often described as "the USB-C port for AI", providing a uniform way to connect LLMs to resources they can use. It may be easier to think of it as an API, but specifically designed for LLM interactions. MCP servers can:
90
91
 
91
- - Expose data through **Resources** (similar to `GET` requests; load info into context)
92
- - Provide functionality through **Tools** (similar to `POST`/`PUT` requests; execute actions)
93
- - Define interaction patterns through **Prompts** (reusable templates)
92
+ - Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
93
+ - Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
94
+ - Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
94
95
  - And more!
95
96
 
96
- FastMCP provides a high-level, Pythonic interface for building and interacting with these servers.
97
+ FastMCP provides a high-level, Pythonic interface for building, managing, and interacting with these servers.
97
98
 
98
99
  ## Why FastMCP?
99
100
 
100
101
  The MCP protocol is powerful but implementing it involves a lot of boilerplate - server setup, protocol handlers, content types, error management. FastMCP handles all the complex protocol details and server management, so you can focus on building great tools. It's designed to be high-level and Pythonic; in most cases, decorating a function is all you need.
101
102
 
102
- While the core server concepts of FastMCP 1.0 laid the groundwork and were contributed to the official MCP SDK, **FastMCP 2.0 (this project) is the actively developed successor**, adding significant enhancements and entirely new capabilities like a powerful **client library**, server **proxying**, **composition** patterns, **OpenAPI/FastAPI integration**, and much more.
103
+ FastMCP 2.0 has evolved into a comprehensive platform that goes far beyond basic protocol implementation. While 1.0 provided server-building capabilities (and is now part of the official MCP SDK), 2.0 offers a complete ecosystem including client libraries, authentication systems, deployment tools, integrations with major AI platforms, testing frameworks, and production-ready infrastructure patterns.
103
104
 
104
105
  FastMCP aims to be:
105
106
 
@@ -109,7 +110,7 @@ FastMCP aims to be:
109
110
 
110
111
  🐍 **Pythonic:** Feels natural to Python developers
111
112
 
112
- 🔍 **Complete:** FastMCP aims to provide a full implementation of the core MCP specification for both servers and clients
113
+ 🔍 **Complete:** A comprehensive platform for all MCP use cases, from dev to prod
113
114
 
114
115
  ## Installation
115
116
 
@@ -127,7 +128,7 @@ These are the building blocks for creating MCP servers and clients with FastMCP.
127
128
 
128
129
  ### The `FastMCP` Server
129
130
 
130
- The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like [authentication providers](https://gofastmcp.com/servers/fastmcp#authentication).
131
+ The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like authentication.
131
132
 
132
133
  ```python
133
134
  from fastmcp import FastMCP
@@ -300,6 +301,16 @@ Automatically generate FastMCP servers from existing OpenAPI specifications (`Fa
300
301
 
301
302
  Learn more: [**OpenAPI Integration**](https://gofastmcp.com/patterns/openapi) | [**FastAPI Integration**](https://gofastmcp.com/patterns/fastapi).
302
303
 
304
+ ### Authentication & Security
305
+
306
+ FastMCP provides built-in authentication support to secure both your MCP servers and clients in production environments. Protect your server endpoints from unauthorized access and authenticate your clients against secured MCP servers using industry-standard protocols.
307
+
308
+ - **Server Protection**: Secure your FastMCP server endpoints with configurable authentication providers
309
+ - **Client Authentication**: Connect to authenticated MCP servers with automatic credential management
310
+ - **Production Ready**: Support for common authentication patterns used in enterprise environments
311
+
312
+ Learn more in the **Authentication Documentation** for [servers](https://gofastmcp.com/servers/auth) and [clients](https://gofastmcp.com/clients/auth).
313
+
303
314
  ## Running Your Server
304
315
 
305
316
  The main way to run a FastMCP server is by calling the `run()` method on your server instance:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Bearer Token Authentication
3
3
  sidebarTitle: Bearer Auth
4
- description: Authenticate your FastMCP client using pre-existing OAuth 2.0 Bearer tokens.
4
+ description: Authenticate your FastMCP client with a Bearer token.
5
5
  icon: key
6
6
  ---
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: OAuth Authentication
3
3
  sidebarTitle: OAuth
4
- description: Authenticate your FastMCP client with servers using the OAuth 2.0 Authorization Code Grant, including user interaction via a web browser.
4
+ description: Authenticate your FastMCP client via OAuth 2.1.
5
5
  icon: window
6
6
  ---
7
7
 
@@ -13,7 +13,7 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
13
13
  OAuth authentication is only relevant for HTTP-based transports and requires user interaction via a web browser.
14
14
  </Tip>
15
15
 
16
- When your FastMCP client needs to access an MCP server protected by OAuth 2.0, and the process requires user interaction (like logging in and granting consent), you should use the Authorization Code Flow. FastMCP provides the `fastmcp.client.auth.OAuth` helper to simplify this entire process.
16
+ When your FastMCP client needs to access an MCP server protected by OAuth 2.1, and the process requires user interaction (like logging in and granting consent), you should use the Authorization Code Flow. FastMCP provides the `fastmcp.client.auth.OAuth` helper to simplify this entire process.
17
17
 
18
18
  This flow is common for user-facing applications where the application acts on behalf of the user.
19
19
 
@@ -35,7 +35,7 @@ async with Client("https://fastmcp.cloud/mcp", auth="oauth") as client:
35
35
 
36
36
  ### `OAuth` Helper
37
37
 
38
- To fully configure the OAuth flow, use the `OAuth` helper and pass it to the `auth` parameter of the `Client` or transport instance. `OAuth` manages the complexities of the OAuth 2.0 Authorization Code Grant with PKCE (Proof Key for Code Exchange) for enhanced security, and implements the full `httpx.Auth` interface.
38
+ To fully configure the OAuth flow, use the `OAuth` helper and pass it to the `auth` parameter of the `Client` or transport instance. `OAuth` manages the complexities of the OAuth 2.1 Authorization Code Grant with PKCE (Proof Key for Code Exchange) for enhanced security, and implements the full `httpx.Auth` interface.
39
39
 
40
40
  ```python {2, 4, 6}
41
41
  from fastmcp import Client
@@ -59,7 +59,7 @@ For development and testing, you can use the `dev` command to run your server wi
59
59
  fastmcp dev server.py
60
60
  ```
61
61
 
62
- See the [CLI documentation](/deployment/cli) for detailed information about all available commands and options.
62
+ See the [CLI documentation](/patterns/cli) for detailed information about all available commands and options.
63
63
 
64
64
  ## Transport Options
65
65
 
@@ -270,4 +270,4 @@ async def health_check(request: Request) -> PlainTextResponse:
270
270
 
271
271
  if __name__ == "__main__":
272
272
  mcp.run()
273
- ```
273
+ ```
@@ -93,8 +93,8 @@
93
93
  "group": "Authentication",
94
94
  "icon": "user-shield",
95
95
  "pages": [
96
- "clients/auth/bearer",
97
- "clients/auth/oauth"
96
+ "clients/auth/oauth",
97
+ "clients/auth/bearer"
98
98
  ]
99
99
  },
100
100
  "clients/advanced-features"
@@ -106,6 +106,7 @@
106
106
  "integrations/anthropic",
107
107
  "integrations/claude-desktop",
108
108
  "integrations/openai",
109
+ "integrations/gemini",
109
110
  "integrations/contrib"
110
111
  ]
111
112
  },
@@ -42,8 +42,7 @@ The Model Context Protocol lets you build servers that expose data and functiona
42
42
  - Define interaction patterns through `Prompts` (reusable templates for LLM interactions)
43
43
  - And more!
44
44
 
45
- There is a low-level Python SDK available for implementing the protocol directly, but FastMCP aims to make that easier by providing a high-level, Pythonic interface.
46
-
45
+ FastMCP provides a high-level, Pythonic interface for building, managing, and interacting with these servers.
47
46
 
48
47
  ## Why FastMCP?
49
48
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Anthropic
3
3
  sidebarTitle: Anthropic
4
- description: Access FastMCP servers from the Anthropic Messages API
4
+ description: Call FastMCP servers from the Anthropic API
5
5
  icon: message-smile
6
6
  ---
7
7
 
@@ -66,6 +66,12 @@ To use the Messages API with MCP servers, you'll need to install the Anthropic P
66
66
  pip install anthropic
67
67
  ```
68
68
 
69
+ You'll also need to authenticate with Anthropic. You can do this by setting the `ANTHROPIC_API_KEY` environment variable. Consult the Anthropic SDK documentation for more information.
70
+
71
+ ```bash
72
+ export ANTHROPIC_API_KEY="your-api-key"
73
+ ```
74
+
69
75
  Here is an example of how to call your server from Python. Note that you'll need to replace `https://your-server-url.com` with the actual URL of your server. In addition, we use `/sse` as the endpoint because we deployed an SSE server with the default path; you may need to use a different endpoint if you customized your server's deployment. **At this time you must also include the `extra_headers` parameter with the `anthropic-beta` header.**
70
76
 
71
77
  ```python {5, 13-22}
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Claude Desktop
3
3
  sidebarTitle: Claude Desktop
4
- description: Integrate FastMCP servers with Claude Desktop
4
+ description: Call FastMCP servers from Claude Desktop
5
5
  icon: desktop
6
6
  ---
7
7
 
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: Gemini SDK
3
+ sidebarTitle: Gemini SDK
4
+ description: Call FastMCP servers from the Google Gemini SDK
5
+ icon: message-smile
6
+ ---
7
+
8
+ import { VersionBadge } from "/snippets/version-badge.mdx"
9
+
10
+ Google's Gemini API includes built-in support for MCP servers in their Python and JavaScript SDKs, allowing you to connect directly to MCP servers and use their tools seamlessly with Gemini models.
11
+
12
+ ## Gemini Python SDK
13
+
14
+ Google's [Gemini Python SDK](https://ai.google.dev/gemini-api/docs) can use FastMCP clients directly.
15
+
16
+ <Note>
17
+ Google's MCP integration is currently experimental and available in the Python and JavaScript SDKs. The API automatically calls MCP tools when needed and can connect to both local and remote MCP servers.
18
+ </Note>
19
+
20
+ <Tip>
21
+ Currently, Gemini's MCP support only accesses **tools** from MCP servers—it queries the `list_tools` endpoint and exposes those functions to the AI. Other MCP features like resources and prompts are not currently supported.
22
+ </Tip>
23
+
24
+ ### Create a Server
25
+
26
+ First, create a FastMCP server with the tools you want to expose. For this example, we'll create a server with a single tool that rolls dice.
27
+
28
+ ```python server.py
29
+ import random
30
+ from fastmcp import FastMCP
31
+
32
+ mcp = FastMCP(name="Dice Roller")
33
+
34
+ @mcp.tool()
35
+ def roll_dice(n_dice: int) -> list[int]:
36
+ """Roll `n_dice` 6-sided dice and return the results."""
37
+ return [random.randint(1, 6) for _ in range(n_dice)]
38
+
39
+ if __name__ == "__main__":
40
+ mcp.run()
41
+ ```
42
+
43
+ ### Call the Server
44
+
45
+
46
+ To use the Gemini API with MCP, you'll need to install the Google Generative AI SDK:
47
+
48
+ ```bash
49
+ pip install google-genai
50
+ ```
51
+
52
+ You'll also need to authenticate with Google. You can do this by setting the `GEMINI_API_KEY` environment variable. Consult the Gemini SDK documentation for more information.
53
+
54
+ ```bash
55
+ export GEMINI_API_KEY="your-api-key"
56
+ ```
57
+
58
+ Gemini's SDK interacts directly with the MCP client session. To call the server, you'll need to instantiate a FastMCP client, enter its connection context, and pass the client session to the Gemini SDK.
59
+
60
+ ```python {5, 9, 15}
61
+ from fastmcp import Client
62
+ from google import genai
63
+ import asyncio
64
+
65
+ mcp_client = Client("server.py")
66
+ gemini_client = genai.Client()
67
+
68
+ async def main():
69
+ async with client:
70
+ response = await gemini_client.aio.models.generate_content(
71
+ model="gemini-2.0-flash",
72
+ contents="Roll 3 dice!",
73
+ config=genai.types.GenerateContentConfig(
74
+ temperature=0,
75
+ tools=[mcp_client.session], # Pass the FastMCP client session
76
+ ),
77
+ )
78
+ print(response.text)
79
+
80
+ if __name__ == "__main__":
81
+ asyncio.run(main())
82
+ ```
83
+
84
+ If you run this code, you'll see output like:
85
+
86
+ ```text
87
+ Okay, I rolled 3 dice and got a 5, 4, and 1.
88
+ ```
89
+
90
+ ### Remote & Authenticated Servers
91
+
92
+ In the above example, we connected to our local server using `stdio` transport. Because we're using a FastMCP client, you can also connect to any local or remote MCP server, using any [transport](/clients/transports) or [auth](/clients/auth) method supported by FastMCP, simply by changing the client configuration.
93
+
94
+ For example, to connect to a remote, authenticated server, you can use the following client:
95
+
96
+ ```python
97
+ from fastmcp import Client
98
+ from fastmcp.client.auth import BearerAuth
99
+
100
+ client = Client(
101
+ "https://my-server.com/sse",
102
+ auth=BearerAuth("<your-token>"),
103
+ )
104
+ ```
105
+
106
+ The rest of the code remains the same.
107
+
108
+
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: OpenAI
3
3
  sidebarTitle: OpenAI
4
- description: Access FastMCP servers from the OpenAI API
4
+ description: Call FastMCP servers from the OpenAI API
5
5
  icon: message-smile
6
6
  ---
7
7
 
@@ -9,7 +9,7 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
9
9
 
10
10
  OpenAI recently announced support for MCP servers in the Responses API. Note that at this time, MCP is not supported in ChatGPT.
11
11
 
12
- ## MCP in the Responses API
12
+ ## Responses API
13
13
 
14
14
  OpenAI's [Responses API](https://platform.openai.com/docs/api-reference/responses) supports [MCP servers](https://platform.openai.com/docs/guides/tools-remote-mcp) as remote tool sources, allowing you to extend AI capabilities with custom functions.
15
15
 
@@ -71,6 +71,12 @@ To use the Responses API, you'll need to install the OpenAI Python SDK (not incl
71
71
  pip install openai
72
72
  ```
73
73
 
74
+ You'll also need to authenticate with OpenAI. You can do this by setting the `OPENAI_API_KEY` environment variable. Consult the OpenAI SDK documentation for more information.
75
+
76
+ ```bash
77
+ export OPENAI_API_KEY="your-api-key"
78
+ ```
79
+
74
80
  Here is an example of how to call your server from Python. Note that you'll need to replace `https://your-server-url.com` with the actual URL of your server. In addition, we use `/sse` as the endpoint because we deployed an SSE server with the default path; you may need to use a different endpoint if you customized your server's deployment.
75
81
 
76
82
  ```python {4, 11-16}
@@ -12,6 +12,10 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
12
12
  Authentication and authorization are only relevant for HTTP-based transports.
13
13
  </Tip>
14
14
 
15
+ <Note>
16
+ The [MCP specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) requires servers to implement full OAuth 2.1 authorization flows with dynamic client registration, server metadata discovery, and complete token endpoints. FastMCP's Bearer Token authentication provides a simpler, more practical alternative by directly validating pre-issued JWT tokens—ideal for service-to-service communication and programmatic environments where full OAuth flows may be impractical, and in accordance with how the MCP ecosystem is pragmatically evolving. However, please note that since it doesn't implement the full OAuth 2.1 flow, this implementation does not strictly comply with the MCP specification.
17
+ </Note>
18
+
15
19
  Bearer Token authentication is a common way to secure HTTP-based APIs. In this model, the client sends a token (usually a JSON Web Token or JWT) in the `Authorization` header with the "Bearer" scheme. The server then validates this token to grant or deny access.
16
20
 
17
21
  FastMCP supports Bearer Token authentication for its HTTP-based transports (`streamable-http` and `sse`), allowing you to protect your server from unauthorized access.
@@ -32,7 +36,7 @@ This design allows you to integrate FastMCP servers into existing authentication
32
36
  To enable Bearer Token validation on your FastMCP server, use the `BearerAuthProvider` class. This provider validates incoming JWTs by verifying signatures, checking expiration, and optionally validating claims.
33
37
 
34
38
  <Warning>
35
- The `BearerAuthProvider` validates tokens; it does **not** issue them (or implement any part of an OAuth flow). You'll need to generate tokens separately, either using FastMCP utilities or an external Identity Provider (IdP) or OAuth 2.0 Authorization Server.
39
+ The `BearerAuthProvider` validates tokens; it does **not** issue them (or implement any part of an OAuth flow). You'll need to generate tokens separately, either using FastMCP utilities or an external Identity Provider (IdP) or OAuth 2.1 Authorization Server.
36
40
  </Warning>
37
41
 
38
42
  ### Basic Setup
@@ -100,7 +104,7 @@ JWKS is recommended for production as it supports automatic key rotation and mul
100
104
  For development and testing, FastMCP provides the `RSAKeyPair` utility class to generate tokens without needing an external OAuth provider.
101
105
 
102
106
  <Warning>
103
- The `RSAKeyPair` utility is intended for development and testing only. For production, use a proper OAuth 2.0 Authorization Server or Identity Provider.
107
+ The `RSAKeyPair` utility is intended for development and testing only. For production, use a proper OAuth 2.1 Authorization Server or Identity Provider.
104
108
  </Warning>
105
109
  ### Basic Token Generation
106
110
 
@@ -33,7 +33,7 @@ The choice of importing or mounting depends on your use case and requirements.
33
33
 
34
34
  ### Proxy Servers
35
35
 
36
- FastMCP supports [MCP proxying](/patterns/proxy), which allows you to mirror a local or remote server in a local FastMCP instance. Proxies are fully compatible with both importing and mounting.
36
+ FastMCP supports [MCP proxying](/servers/proxy), which allows you to mirror a local or remote server in a local FastMCP instance. Proxies are fully compatible with both importing and mounting.
37
37
 
38
38
  <VersionBadge version="2.4.0" />
39
39
 
@@ -25,7 +25,7 @@ mcp_with_instructions = FastMCP(
25
25
  instructions="""
26
26
  This server provides data analysis tools.
27
27
  Call get_average() to analyze numerical data.
28
- """
28
+ """,
29
29
  )
30
30
  ```
31
31
 
@@ -135,7 +135,7 @@ For detailed information on each transport, how to configure them (host, port, p
135
135
 
136
136
  FastMCP supports composing multiple servers together using `import_server` (static copy) and `mount` (live link). This allows you to organize large applications into modular components or reuse existing servers.
137
137
 
138
- See the [Server Composition](/patterns/composition) guide for full details, best practices, and examples.
138
+ See the [Server Composition](/servers/composition) guide for full details, best practices, and examples.
139
139
 
140
140
  ```python
141
141
  # Example: Importing a subserver
@@ -159,7 +159,7 @@ main.mount("sub", sub)
159
159
 
160
160
  FastMCP can act as a proxy for any MCP server (local or remote) using `FastMCP.as_proxy`, letting you bridge transports or add a frontend to existing servers. For example, you can expose a remote SSE server locally via stdio, or vice versa.
161
161
 
162
- See the [Proxying Servers](/patterns/proxy) guide for details and advanced usage.
162
+ See the [Proxying Servers](/servers/proxy) guide for details and advanced usage.
163
163
 
164
164
  ```python
165
165
  from fastmcp import FastMCP, Client
@@ -232,29 +232,3 @@ This customization is useful when you want to:
232
232
  <Tip>
233
233
  If the serializer function raises an exception, the tool will fall back to the default JSON serialization to avoid breaking the server.
234
234
  </Tip>
235
-
236
- ## Authentication
237
-
238
- <VersionBadge version="2.2.7" />
239
-
240
- FastMCP supports OAuth 2.0 authentication, allowing servers to protect their tools and resources. This is configured by providing an `auth_server_provider` and `auth` settings during `FastMCP` initialization.
241
-
242
- ```python
243
- from fastmcp import FastMCP
244
- from mcp.server.auth.settings import AuthSettings #, ... other auth imports
245
- # from your_auth_implementation import MyOAuthServerProvider # Placeholder
246
-
247
- # Create a server with authentication (conceptual example)
248
- # mcp = FastMCP(
249
- # name="SecureApp",
250
- # auth_server_provider=MyOAuthServerProvider(),
251
- # auth=AuthSettings(
252
- # issuer_url="https://myapp.com",
253
- # # ... other OAuth settings ...
254
- # required_scopes=["myscope"],
255
- # ),
256
- # )
257
- ```
258
- Due to the low-level nature of the current MCP SDK's auth provider interface, detailed implementation is beyond a quick example. Refer to the [MCP SDK documentation](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) for specifics on implementing an `OAuthAuthorizationServerProvider`. FastMCP integrates with this by passing the provider and settings to the underlying MCP server.
259
-
260
- A dedicated [Authentication guide](/deployment/authentication) will cover this in more detail once higher-level abstractions are available in FastMCP.
@@ -1,13 +1,12 @@
1
1
  export const VersionBadge = ({ version }) => {
2
2
  return (
3
3
  <code className="version-badge-container">
4
- <div className="version-badge">
4
+ <p className="version-badge">
5
5
  <span className="version-badge-label">New in version:</span>&nbsp;
6
- <span className="version-badge-version">{version}</span>
7
- </div>
6
+ <code className="version-badge-version">{version}</code>
7
+ </p>
8
8
  </code>
9
9
 
10
10
 
11
-
12
11
  );
13
12
  };
@@ -17,16 +17,18 @@ h6 code:not(pre code) {
17
17
  display: inline-block;
18
18
  align-items: center;
19
19
  gap: 0.3em;
20
- padding: 0.2em 0.8em;
21
- font-size: 1.1em;
22
- font-weight: 400;
23
-
20
+ font-size: 1em;
21
+ margin-top: 0px;
22
+ margin-bottom: 0px;
23
+ padding-top: 6px;
24
+ padding-bottom: 6px;
25
+ padding-left: 20px;
26
+ padding-right: 20px;
24
27
  font-family: "Inter", sans-serif;
25
- letter-spacing: 0.025em;
26
28
  color: #ff5400;
27
- background: #ffeee6;
28
- border: 1px solid rgb(255, 84, 0, 0.5);
29
- border-radius: 6px;
29
+ background: #fef2f2;
30
+ border: 1px solid rgba(220, 38, 38, 0.3);
31
+ border-radius: 12px;
30
32
  box-shadow: none;
31
33
  vertical-align: middle;
32
34
  position: relative;
@@ -44,7 +46,7 @@ h6 code:not(pre code) {
44
46
  }
45
47
 
46
48
  .dark .version-badge {
47
- color: #fff;
48
- background: #312e81;
49
- border: 1.5px solid #a78bfa;
49
+ color: #f1f5f9;
50
+ background: #334155;
51
+ border: 1px solid #64748b;
50
52
  }
@@ -68,9 +68,6 @@ class ServerOAuthMetadata(_MCPServerOAuthMetadata):
68
68
  class OAuthClientProvider(_MCPOAuthClientProvider):
69
69
  """
70
70
  OAuth client provider with more flexible OAuth metadata discovery.
71
-
72
- This subclass handles real-world OAuth servers that may not conform
73
- strictly to the MCP OAuth specification but are still valid OAuth 2.0 servers.
74
71
  """
75
72
 
76
73
  async def _discover_oauth_metadata(
@@ -1,8 +1,3 @@
1
- """
2
- This is a simple in-memory OAuth provider for testing purposes.
3
- It simulates the OAuth 2.0 flow locally without external calls.
4
- """
5
-
6
1
  import secrets
7
2
  import time
8
3
 
@@ -36,7 +31,7 @@ DEFAULT_REFRESH_TOKEN_EXPIRY_SECONDS = None # No expiry
36
31
  class InMemoryOAuthProvider(OAuthProvider):
37
32
  """
38
33
  An in-memory OAuth provider for testing purposes.
39
- It simulates the OAuth 2.0 flow locally without external calls.
34
+ It simulates the OAuth 2.1 flow locally without external calls.
40
35
  """
41
36
 
42
37
  def __init__(
@@ -131,16 +131,6 @@ class FastMCP(Generic[LifespanResultT]):
131
131
  tools: list[Tool | Callable[..., Any]] | None = None,
132
132
  **settings: Any,
133
133
  ):
134
- if settings:
135
- # TODO: remove settings. Deprecated since 2.3.4
136
- warnings.warn(
137
- "Passing runtime and transport-specific settings as kwargs "
138
- "to the FastMCP constructor is deprecated (as of 2.3.4), "
139
- "including most transport settings. If possible, provide settings when calling "
140
- "run() instead.",
141
- DeprecationWarning,
142
- stacklevel=2,
143
- )
144
134
  self.settings = fastmcp.settings.ServerSettings(**settings)
145
135
 
146
136
  # If mask_error_details is provided, override the settings value
@@ -9,17 +9,6 @@ from starlette.applications import Starlette
9
9
  from fastmcp import Client, FastMCP
10
10
 
11
11
 
12
- def test_fastmcp_kwargs_settings_deprecation_warning():
13
- """Test that passing settings as kwargs to FastMCP raises a deprecation warning."""
14
- with pytest.warns(
15
- DeprecationWarning,
16
- match="Passing runtime and transport-specific settings as kwargs to the FastMCP constructor is deprecated",
17
- ):
18
- server = FastMCP("TestServer", host="127.0.0.2", port=8001)
19
- assert server.settings.host == "127.0.0.2"
20
- assert server.settings.port == 8001
21
-
22
-
23
12
  def test_sse_app_deprecation_warning():
24
13
  """Test that sse_app raises a deprecation warning."""
25
14
  server = FastMCP("TestServer")
@@ -342,7 +342,7 @@ async def tokens(test_client, registered_client, auth_code, pkce_challenge, requ
342
342
 
343
343
  class TestAuthEndpoints:
344
344
  async def test_metadata_endpoint(self, test_client: httpx.AsyncClient):
345
- """Test the OAuth 2.0 metadata endpoint."""
345
+ """Test the OAuth 2.1 metadata endpoint."""
346
346
  print("Sending request to metadata endpoint")
347
347
  response = await test_client.get("/.well-known/oauth-authorization-server")
348
348
  print(f"Got response: {response.status_code}")
File without changes