fastmcp-slim 3.3.0b1__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 (269) hide show
  1. fastmcp_slim-3.3.0b1/.gitignore +80 -0
  2. fastmcp_slim-3.3.0b1/PKG-INFO +208 -0
  3. fastmcp_slim-3.3.0b1/README.md +120 -0
  4. fastmcp_slim-3.3.0b1/fastmcp/__init__.py +117 -0
  5. fastmcp_slim-3.3.0b1/fastmcp/apps/__init__.py +18 -0
  6. fastmcp_slim-3.3.0b1/fastmcp/apps/app.py +427 -0
  7. fastmcp_slim-3.3.0b1/fastmcp/apps/approval.py +198 -0
  8. fastmcp_slim-3.3.0b1/fastmcp/apps/choice.py +141 -0
  9. fastmcp_slim-3.3.0b1/fastmcp/apps/config.py +177 -0
  10. fastmcp_slim-3.3.0b1/fastmcp/apps/file_upload.py +405 -0
  11. fastmcp_slim-3.3.0b1/fastmcp/apps/form.py +229 -0
  12. fastmcp_slim-3.3.0b1/fastmcp/apps/generative.py +199 -0
  13. fastmcp_slim-3.3.0b1/fastmcp/cli/__init__.py +3 -0
  14. fastmcp_slim-3.3.0b1/fastmcp/cli/__main__.py +5 -0
  15. fastmcp_slim-3.3.0b1/fastmcp/cli/apps_dev.py +1825 -0
  16. fastmcp_slim-3.3.0b1/fastmcp/cli/auth.py +13 -0
  17. fastmcp_slim-3.3.0b1/fastmcp/cli/cimd.py +218 -0
  18. fastmcp_slim-3.3.0b1/fastmcp/cli/cli.py +1116 -0
  19. fastmcp_slim-3.3.0b1/fastmcp/cli/client.py +986 -0
  20. fastmcp_slim-3.3.0b1/fastmcp/cli/discovery.py +375 -0
  21. fastmcp_slim-3.3.0b1/fastmcp/cli/generate.py +806 -0
  22. fastmcp_slim-3.3.0b1/fastmcp/cli/install/__init__.py +26 -0
  23. fastmcp_slim-3.3.0b1/fastmcp/cli/install/claude_code.py +242 -0
  24. fastmcp_slim-3.3.0b1/fastmcp/cli/install/claude_desktop.py +232 -0
  25. fastmcp_slim-3.3.0b1/fastmcp/cli/install/cursor.py +321 -0
  26. fastmcp_slim-3.3.0b1/fastmcp/cli/install/gemini_cli.py +239 -0
  27. fastmcp_slim-3.3.0b1/fastmcp/cli/install/goose.py +208 -0
  28. fastmcp_slim-3.3.0b1/fastmcp/cli/install/mcp_json.py +191 -0
  29. fastmcp_slim-3.3.0b1/fastmcp/cli/install/shared.py +195 -0
  30. fastmcp_slim-3.3.0b1/fastmcp/cli/install/stdio.py +156 -0
  31. fastmcp_slim-3.3.0b1/fastmcp/cli/run.py +489 -0
  32. fastmcp_slim-3.3.0b1/fastmcp/cli/tasks.py +110 -0
  33. fastmcp_slim-3.3.0b1/fastmcp/client/__init__.py +36 -0
  34. fastmcp_slim-3.3.0b1/fastmcp/client/auth/__init__.py +4 -0
  35. fastmcp_slim-3.3.0b1/fastmcp/client/auth/bearer.py +17 -0
  36. fastmcp_slim-3.3.0b1/fastmcp/client/auth/oauth.py +430 -0
  37. fastmcp_slim-3.3.0b1/fastmcp/client/client.py +911 -0
  38. fastmcp_slim-3.3.0b1/fastmcp/client/dependencies.py +20 -0
  39. fastmcp_slim-3.3.0b1/fastmcp/client/elicitation.py +88 -0
  40. fastmcp_slim-3.3.0b1/fastmcp/client/logging.py +54 -0
  41. fastmcp_slim-3.3.0b1/fastmcp/client/messages.py +128 -0
  42. fastmcp_slim-3.3.0b1/fastmcp/client/mixins/__init__.py +13 -0
  43. fastmcp_slim-3.3.0b1/fastmcp/client/mixins/prompts.py +325 -0
  44. fastmcp_slim-3.3.0b1/fastmcp/client/mixins/resources.py +382 -0
  45. fastmcp_slim-3.3.0b1/fastmcp/client/mixins/task_management.py +157 -0
  46. fastmcp_slim-3.3.0b1/fastmcp/client/mixins/tools.py +476 -0
  47. fastmcp_slim-3.3.0b1/fastmcp/client/oauth_callback.py +251 -0
  48. fastmcp_slim-3.3.0b1/fastmcp/client/progress.py +41 -0
  49. fastmcp_slim-3.3.0b1/fastmcp/client/roots.py +78 -0
  50. fastmcp_slim-3.3.0b1/fastmcp/client/sampling/__init__.py +71 -0
  51. fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/__init__.py +0 -0
  52. fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/anthropic.py +449 -0
  53. fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/google_genai.py +403 -0
  54. fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/openai.py +513 -0
  55. fastmcp_slim-3.3.0b1/fastmcp/client/tasks.py +584 -0
  56. fastmcp_slim-3.3.0b1/fastmcp/client/telemetry.py +57 -0
  57. fastmcp_slim-3.3.0b1/fastmcp/client/transports/__init__.py +36 -0
  58. fastmcp_slim-3.3.0b1/fastmcp/client/transports/base.py +82 -0
  59. fastmcp_slim-3.3.0b1/fastmcp/client/transports/config.py +224 -0
  60. fastmcp_slim-3.3.0b1/fastmcp/client/transports/http.py +220 -0
  61. fastmcp_slim-3.3.0b1/fastmcp/client/transports/inference.py +170 -0
  62. fastmcp_slim-3.3.0b1/fastmcp/client/transports/memory.py +115 -0
  63. fastmcp_slim-3.3.0b1/fastmcp/client/transports/sse.py +158 -0
  64. fastmcp_slim-3.3.0b1/fastmcp/client/transports/stdio.py +567 -0
  65. fastmcp_slim-3.3.0b1/fastmcp/contrib/README.md +19 -0
  66. fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/README.md +35 -0
  67. fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/__init__.py +3 -0
  68. fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +151 -0
  69. fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/example.py +17 -0
  70. fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/README.md +164 -0
  71. fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/__init__.py +3 -0
  72. fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/component_manager.py +121 -0
  73. fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/example.py +59 -0
  74. fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/README.md +147 -0
  75. fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/__init__.py +8 -0
  76. fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/example.py +52 -0
  77. fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/mcp_mixin.py +321 -0
  78. fastmcp_slim-3.3.0b1/fastmcp/decorators.py +41 -0
  79. fastmcp_slim-3.3.0b1/fastmcp/dependencies.py +40 -0
  80. fastmcp_slim-3.3.0b1/fastmcp/exceptions.py +63 -0
  81. fastmcp_slim-3.3.0b1/fastmcp/experimental/__init__.py +0 -0
  82. fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/__init__.py +0 -0
  83. fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/handlers/__init__.py +5 -0
  84. fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/handlers/openai.py +5 -0
  85. fastmcp_slim-3.3.0b1/fastmcp/experimental/server/openapi/__init__.py +42 -0
  86. fastmcp_slim-3.3.0b1/fastmcp/experimental/transforms/__init__.py +1 -0
  87. fastmcp_slim-3.3.0b1/fastmcp/experimental/transforms/code_mode.py +573 -0
  88. fastmcp_slim-3.3.0b1/fastmcp/experimental/utilities/openapi/__init__.py +37 -0
  89. fastmcp_slim-3.3.0b1/fastmcp/mcp_config.py +383 -0
  90. fastmcp_slim-3.3.0b1/fastmcp/prompts/__init__.py +20 -0
  91. fastmcp_slim-3.3.0b1/fastmcp/prompts/base.py +440 -0
  92. fastmcp_slim-3.3.0b1/fastmcp/prompts/function_prompt.py +515 -0
  93. fastmcp_slim-3.3.0b1/fastmcp/py.typed +0 -0
  94. fastmcp_slim-3.3.0b1/fastmcp/resources/__init__.py +32 -0
  95. fastmcp_slim-3.3.0b1/fastmcp/resources/base.py +497 -0
  96. fastmcp_slim-3.3.0b1/fastmcp/resources/function_resource.py +343 -0
  97. fastmcp_slim-3.3.0b1/fastmcp/resources/template.py +673 -0
  98. fastmcp_slim-3.3.0b1/fastmcp/resources/types.py +188 -0
  99. fastmcp_slim-3.3.0b1/fastmcp/server/__init__.py +19 -0
  100. fastmcp_slim-3.3.0b1/fastmcp/server/app.py +19 -0
  101. fastmcp_slim-3.3.0b1/fastmcp/server/apps.py +22 -0
  102. fastmcp_slim-3.3.0b1/fastmcp/server/auth/__init__.py +75 -0
  103. fastmcp_slim-3.3.0b1/fastmcp/server/auth/auth.py +848 -0
  104. fastmcp_slim-3.3.0b1/fastmcp/server/auth/authorization.py +182 -0
  105. fastmcp_slim-3.3.0b1/fastmcp/server/auth/cimd.py +797 -0
  106. fastmcp_slim-3.3.0b1/fastmcp/server/auth/handlers/__init__.py +0 -0
  107. fastmcp_slim-3.3.0b1/fastmcp/server/auth/handlers/authorize.py +326 -0
  108. fastmcp_slim-3.3.0b1/fastmcp/server/auth/jwt_issuer.py +283 -0
  109. fastmcp_slim-3.3.0b1/fastmcp/server/auth/middleware.py +96 -0
  110. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/__init__.py +14 -0
  111. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/consent.py +560 -0
  112. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/models.py +261 -0
  113. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/proxy.py +2201 -0
  114. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/ui.py +300 -0
  115. fastmcp_slim-3.3.0b1/fastmcp/server/auth/oidc_proxy.py +498 -0
  116. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/__init__.py +0 -0
  117. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/auth0.py +137 -0
  118. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/aws.py +231 -0
  119. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/azure.py +860 -0
  120. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/clerk.py +390 -0
  121. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/debug.py +114 -0
  122. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/descope.py +209 -0
  123. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/discord.py +290 -0
  124. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/github.py +305 -0
  125. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/google.py +367 -0
  126. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/in_memory.py +366 -0
  127. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/introspection.py +305 -0
  128. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/jwt.py +616 -0
  129. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/keycloak.py +74 -0
  130. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/oci.py +189 -0
  131. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/propelauth.py +234 -0
  132. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/scalekit.py +212 -0
  133. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/supabase.py +181 -0
  134. fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/workos.py +430 -0
  135. fastmcp_slim-3.3.0b1/fastmcp/server/auth/redirect_validation.py +248 -0
  136. fastmcp_slim-3.3.0b1/fastmcp/server/auth/ssrf.py +356 -0
  137. fastmcp_slim-3.3.0b1/fastmcp/server/context.py +1457 -0
  138. fastmcp_slim-3.3.0b1/fastmcp/server/dependencies.py +1385 -0
  139. fastmcp_slim-3.3.0b1/fastmcp/server/elicitation.py +508 -0
  140. fastmcp_slim-3.3.0b1/fastmcp/server/event_store.py +177 -0
  141. fastmcp_slim-3.3.0b1/fastmcp/server/http.py +406 -0
  142. fastmcp_slim-3.3.0b1/fastmcp/server/lifespan.py +198 -0
  143. fastmcp_slim-3.3.0b1/fastmcp/server/low_level.py +351 -0
  144. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/__init__.py +15 -0
  145. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/authorization.py +321 -0
  146. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/caching.py +590 -0
  147. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/dereference.py +78 -0
  148. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/error_handling.py +226 -0
  149. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/logging.py +256 -0
  150. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/middleware.py +205 -0
  151. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/ping.py +73 -0
  152. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/rate_limiting.py +231 -0
  153. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/response_limiting.py +137 -0
  154. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/timing.py +156 -0
  155. fastmcp_slim-3.3.0b1/fastmcp/server/middleware/tool_injection.py +141 -0
  156. fastmcp_slim-3.3.0b1/fastmcp/server/mixins/__init__.py +7 -0
  157. fastmcp_slim-3.3.0b1/fastmcp/server/mixins/lifespan.py +299 -0
  158. fastmcp_slim-3.3.0b1/fastmcp/server/mixins/mcp_operations.py +373 -0
  159. fastmcp_slim-3.3.0b1/fastmcp/server/mixins/transport.py +369 -0
  160. fastmcp_slim-3.3.0b1/fastmcp/server/openapi/__init__.py +57 -0
  161. fastmcp_slim-3.3.0b1/fastmcp/server/openapi/components.py +30 -0
  162. fastmcp_slim-3.3.0b1/fastmcp/server/openapi/routing.py +48 -0
  163. fastmcp_slim-3.3.0b1/fastmcp/server/openapi/server.py +125 -0
  164. fastmcp_slim-3.3.0b1/fastmcp/server/providers/__init__.py +71 -0
  165. fastmcp_slim-3.3.0b1/fastmcp/server/providers/addressing.py +69 -0
  166. fastmcp_slim-3.3.0b1/fastmcp/server/providers/aggregate.py +308 -0
  167. fastmcp_slim-3.3.0b1/fastmcp/server/providers/base.py +627 -0
  168. fastmcp_slim-3.3.0b1/fastmcp/server/providers/fastmcp_provider.py +731 -0
  169. fastmcp_slim-3.3.0b1/fastmcp/server/providers/filesystem.py +225 -0
  170. fastmcp_slim-3.3.0b1/fastmcp/server/providers/filesystem_discovery.py +390 -0
  171. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/__init__.py +11 -0
  172. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/__init__.py +15 -0
  173. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/prompts.py +258 -0
  174. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/resources.py +242 -0
  175. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/tools.py +423 -0
  176. fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/local_provider.py +465 -0
  177. fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/README.md +266 -0
  178. fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/__init__.py +39 -0
  179. fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/components.py +421 -0
  180. fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/provider.py +436 -0
  181. fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/routing.py +109 -0
  182. fastmcp_slim-3.3.0b1/fastmcp/server/providers/prefab_synthesis.py +247 -0
  183. fastmcp_slim-3.3.0b1/fastmcp/server/providers/proxy.py +1110 -0
  184. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/__init__.py +59 -0
  185. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/_common.py +107 -0
  186. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/claude_provider.py +44 -0
  187. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/directory_provider.py +153 -0
  188. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/skill_provider.py +449 -0
  189. fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/vendor_providers.py +142 -0
  190. fastmcp_slim-3.3.0b1/fastmcp/server/providers/wrapped_provider.py +148 -0
  191. fastmcp_slim-3.3.0b1/fastmcp/server/proxy.py +43 -0
  192. fastmcp_slim-3.3.0b1/fastmcp/server/sampling/__init__.py +10 -0
  193. fastmcp_slim-3.3.0b1/fastmcp/server/sampling/run.py +747 -0
  194. fastmcp_slim-3.3.0b1/fastmcp/server/sampling/sampling_tool.py +204 -0
  195. fastmcp_slim-3.3.0b1/fastmcp/server/server.py +2480 -0
  196. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/__init__.py +38 -0
  197. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/capabilities.py +44 -0
  198. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/config.py +147 -0
  199. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/context.py +334 -0
  200. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/elicitation.py +347 -0
  201. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/handlers.py +231 -0
  202. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/keys.py +165 -0
  203. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/notifications.py +308 -0
  204. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/requests.py +477 -0
  205. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/routing.py +76 -0
  206. fastmcp_slim-3.3.0b1/fastmcp/server/tasks/subscriptions.py +222 -0
  207. fastmcp_slim-3.3.0b1/fastmcp/server/telemetry.py +148 -0
  208. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/__init__.py +240 -0
  209. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/catalog.py +245 -0
  210. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/namespace.py +193 -0
  211. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/prompts_as_tools.py +169 -0
  212. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/resources_as_tools.py +180 -0
  213. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/__init__.py +31 -0
  214. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/base.py +269 -0
  215. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/bm25.py +144 -0
  216. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/regex.py +55 -0
  217. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/tool_transform.py +96 -0
  218. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/version_filter.py +148 -0
  219. fastmcp_slim-3.3.0b1/fastmcp/server/transforms/visibility.py +526 -0
  220. fastmcp_slim-3.3.0b1/fastmcp/settings.py +381 -0
  221. fastmcp_slim-3.3.0b1/fastmcp/telemetry.py +122 -0
  222. fastmcp_slim-3.3.0b1/fastmcp/tools/__init__.py +20 -0
  223. fastmcp_slim-3.3.0b1/fastmcp/tools/base.py +612 -0
  224. fastmcp_slim-3.3.0b1/fastmcp/tools/function_parsing.py +313 -0
  225. fastmcp_slim-3.3.0b1/fastmcp/tools/function_tool.py +548 -0
  226. fastmcp_slim-3.3.0b1/fastmcp/tools/tool_transform.py +1028 -0
  227. fastmcp_slim-3.3.0b1/fastmcp/types.py +32 -0
  228. fastmcp_slim-3.3.0b1/fastmcp/utilities/__init__.py +1 -0
  229. fastmcp_slim-3.3.0b1/fastmcp/utilities/async_utils.py +82 -0
  230. fastmcp_slim-3.3.0b1/fastmcp/utilities/auth.py +91 -0
  231. fastmcp_slim-3.3.0b1/fastmcp/utilities/cli.py +268 -0
  232. fastmcp_slim-3.3.0b1/fastmcp/utilities/components.py +262 -0
  233. fastmcp_slim-3.3.0b1/fastmcp/utilities/docstring_parsing.py +65 -0
  234. fastmcp_slim-3.3.0b1/fastmcp/utilities/exceptions.py +49 -0
  235. fastmcp_slim-3.3.0b1/fastmcp/utilities/http.py +8 -0
  236. fastmcp_slim-3.3.0b1/fastmcp/utilities/inspect.py +494 -0
  237. fastmcp_slim-3.3.0b1/fastmcp/utilities/json_schema.py +671 -0
  238. fastmcp_slim-3.3.0b1/fastmcp/utilities/json_schema_type.py +796 -0
  239. fastmcp_slim-3.3.0b1/fastmcp/utilities/lifespan.py +56 -0
  240. fastmcp_slim-3.3.0b1/fastmcp/utilities/logging.py +244 -0
  241. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/__init__.py +25 -0
  242. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/__init__.py +0 -0
  243. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/__init__.py +6 -0
  244. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/base.py +29 -0
  245. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/uv.py +271 -0
  246. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py +447 -0
  247. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/schema.json +365 -0
  248. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/__init__.py +0 -0
  249. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/base.py +29 -0
  250. fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py +217 -0
  251. fastmcp_slim-3.3.0b1/fastmcp/utilities/mime.py +27 -0
  252. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/README.md +211 -0
  253. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/__init__.py +61 -0
  254. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/director.py +375 -0
  255. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/formatters.py +355 -0
  256. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/json_schema_converter.py +346 -0
  257. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/models.py +88 -0
  258. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/parser.py +825 -0
  259. fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/schemas.py +607 -0
  260. fastmcp_slim-3.3.0b1/fastmcp/utilities/pagination.py +80 -0
  261. fastmcp_slim-3.3.0b1/fastmcp/utilities/skills.py +257 -0
  262. fastmcp_slim-3.3.0b1/fastmcp/utilities/tests.py +274 -0
  263. fastmcp_slim-3.3.0b1/fastmcp/utilities/timeout.py +47 -0
  264. fastmcp_slim-3.3.0b1/fastmcp/utilities/token_cache.py +173 -0
  265. fastmcp_slim-3.3.0b1/fastmcp/utilities/types.py +499 -0
  266. fastmcp_slim-3.3.0b1/fastmcp/utilities/ui.py +626 -0
  267. fastmcp_slim-3.3.0b1/fastmcp/utilities/version_check.py +153 -0
  268. fastmcp_slim-3.3.0b1/fastmcp/utilities/versions.py +333 -0
  269. fastmcp_slim-3.3.0b1/pyproject.toml +117 -0
@@ -0,0 +1,80 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ build/
6
+ dist/
7
+ wheels/
8
+ *.egg-info/
9
+ *.egg
10
+ MANIFEST
11
+ .pytest_cache/
12
+ .loq_cache
13
+ .coverage
14
+ htmlcov/
15
+ .tox/
16
+ nosetests.xml
17
+ coverage.xml
18
+ *.cover
19
+
20
+ # Virtual environments
21
+ .venv
22
+ venv/
23
+ env/
24
+ ENV/
25
+ .env
26
+
27
+ # System files
28
+ .DS_Store
29
+
30
+ # Version file
31
+ src/fastmcp/_version.py
32
+
33
+ # Editors and IDEs
34
+ .cursorrules
35
+ .vscode/
36
+ .idea/
37
+ *.swp
38
+ *.swo
39
+ *~
40
+ .project
41
+ .pydevproject
42
+ .settings/
43
+
44
+ # Jupyter Notebook
45
+ .ipynb_checkpoints
46
+
47
+ # Type checking
48
+ .mypy_cache/
49
+ .dmypy.json
50
+ dmypy.json
51
+ .pyre/
52
+ .pytype/
53
+
54
+ # Local development
55
+ .python-version
56
+ .envrc
57
+ .envrc.private
58
+ .direnv/
59
+
60
+ # Logs and databases
61
+ *.log
62
+ *.sqlite
63
+ *.db
64
+ *.ddb
65
+
66
+ # Claude worktree management
67
+ .claude-wt/worktrees
68
+ .claude/worktrees/
69
+
70
+ # Agents
71
+ /PLAN.md
72
+ /TODO.md
73
+ /STATUS.md
74
+ plans/
75
+
76
+ # Common FastMCP test files
77
+ /test.py
78
+ /server.py
79
+ /client.py
80
+ /test.json
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastmcp-slim
3
+ Version: 3.3.0b1
4
+ Summary: The dependency-slim FastMCP package.
5
+ Project-URL: Homepage, https://gofastmcp.com
6
+ Project-URL: Repository, https://github.com/PrefectHQ/fastmcp
7
+ Project-URL: Documentation, https://gofastmcp.com
8
+ Author: Jeremiah Lowin
9
+ License-Expression: Apache-2.0
10
+ Keywords: agent,fastmcp,llm,mcp,mcp client,mcp server,model context protocol
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: platformdirs>=4.0.0
21
+ Requires-Dist: pydantic-settings>=2.0.0
22
+ Requires-Dist: pydantic[email]>=2.11.7
23
+ Requires-Dist: python-dotenv>=1.1.0
24
+ Requires-Dist: rich>=13.9.4
25
+ Requires-Dist: typing-extensions>=4.0.0
26
+ Provides-Extra: anthropic
27
+ Requires-Dist: anthropic>=0.48.0; extra == 'anthropic'
28
+ Provides-Extra: apps
29
+ Requires-Dist: prefab-ui>=0.18.0; extra == 'apps'
30
+ Provides-Extra: azure
31
+ Requires-Dist: azure-identity>=1.16.0; extra == 'azure'
32
+ Requires-Dist: pyjwt>=2.12.0; extra == 'azure'
33
+ Provides-Extra: client
34
+ Requires-Dist: authlib>=1.6.11; extra == 'client'
35
+ Requires-Dist: exceptiongroup>=1.2.2; extra == 'client'
36
+ Requires-Dist: httpx<1.0,>=0.28.1; extra == 'client'
37
+ Requires-Dist: mcp<2.0,>=1.24.0; extra == 'client'
38
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'client'
39
+ Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'client'
40
+ Provides-Extra: code-mode
41
+ Requires-Dist: pydantic-monty==0.0.16; extra == 'code-mode'
42
+ Provides-Extra: full
43
+ Requires-Dist: authlib>=1.6.11; extra == 'full'
44
+ Requires-Dist: cyclopts>=4.0.0; extra == 'full'
45
+ Requires-Dist: exceptiongroup>=1.2.2; extra == 'full'
46
+ Requires-Dist: griffelib>=2.0.0; extra == 'full'
47
+ Requires-Dist: httpx<1.0,>=0.28.1; extra == 'full'
48
+ Requires-Dist: jsonref>=1.1.0; extra == 'full'
49
+ Requires-Dist: jsonschema-path>=0.3.4; extra == 'full'
50
+ Requires-Dist: mcp<2.0,>=1.24.0; extra == 'full'
51
+ Requires-Dist: openapi-pydantic>=0.5.1; extra == 'full'
52
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'full'
53
+ Requires-Dist: packaging>=24.0; extra == 'full'
54
+ Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'full'
55
+ Requires-Dist: pyperclip>=1.9.0; extra == 'full'
56
+ Requires-Dist: python-multipart>=0.0.26; extra == 'full'
57
+ Requires-Dist: pyyaml<7.0,>=6.0; extra == 'full'
58
+ Requires-Dist: uncalled-for>=0.2.0; extra == 'full'
59
+ Requires-Dist: uvicorn>=0.35; extra == 'full'
60
+ Requires-Dist: watchfiles>=1.0.0; extra == 'full'
61
+ Requires-Dist: websockets>=15.0.1; extra == 'full'
62
+ Provides-Extra: gemini
63
+ Requires-Dist: google-genai>=1.18.0; extra == 'gemini'
64
+ Requires-Dist: jsonref>=1.1.0; extra == 'gemini'
65
+ Provides-Extra: openai
66
+ Requires-Dist: openai>=1.102.0; extra == 'openai'
67
+ Provides-Extra: server
68
+ Requires-Dist: authlib>=1.6.11; extra == 'server'
69
+ Requires-Dist: exceptiongroup>=1.2.2; extra == 'server'
70
+ Requires-Dist: griffelib>=2.0.0; extra == 'server'
71
+ Requires-Dist: httpx<1.0,>=0.28.1; extra == 'server'
72
+ Requires-Dist: jsonref>=1.1.0; extra == 'server'
73
+ Requires-Dist: jsonschema-path>=0.3.4; extra == 'server'
74
+ Requires-Dist: mcp<2.0,>=1.24.0; extra == 'server'
75
+ Requires-Dist: openapi-pydantic>=0.5.1; extra == 'server'
76
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'server'
77
+ Requires-Dist: packaging>=24.0; extra == 'server'
78
+ Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'server'
79
+ Requires-Dist: python-multipart>=0.0.26; extra == 'server'
80
+ Requires-Dist: pyyaml<7.0,>=6.0; extra == 'server'
81
+ Requires-Dist: uncalled-for>=0.2.0; extra == 'server'
82
+ Requires-Dist: uvicorn>=0.35; extra == 'server'
83
+ Requires-Dist: watchfiles>=1.0.0; extra == 'server'
84
+ Requires-Dist: websockets>=15.0.1; extra == 'server'
85
+ Provides-Extra: tasks
86
+ Requires-Dist: pydocket>=0.20.0; extra == 'tasks'
87
+ Description-Content-Type: text/markdown
88
+
89
+ <div align="center">
90
+
91
+ <!-- omit in toc -->
92
+
93
+ <picture>
94
+ <source width="550" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4-dark.png">
95
+ <source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png">
96
+ <img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png">
97
+ </picture>
98
+
99
+ # FastMCP 🚀
100
+
101
+ <strong>Move fast and make things.</strong>
102
+
103
+ *Made with 💙 by [Prefect](https://www.prefect.io/)*
104
+
105
+ [![Docs](https://img.shields.io/badge/docs-gofastmcp.com-blue)](https://gofastmcp.com)
106
+ [![Discord](https://img.shields.io/badge/community-discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/uu8dJCgttd)
107
+ [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
108
+ [![Tests](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml/badge.svg)](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml)
109
+ [![License](https://img.shields.io/github/license/PrefectHQ/fastmcp.svg)](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE)
110
+
111
+ <a href="https://trendshift.io/repositories/13266" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13266" alt="prefecthq%2Ffastmcp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
112
+ </div>
113
+
114
+ ---
115
+
116
+ The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production:
117
+
118
+ ```python
119
+ from fastmcp import FastMCP
120
+
121
+ mcp = FastMCP("Demo 🚀")
122
+
123
+ @mcp.tool
124
+ def add(a: int, b: int) -> int:
125
+ """Add two numbers"""
126
+ return a + b
127
+
128
+ if __name__ == "__main__":
129
+ mcp.run()
130
+ ```
131
+
132
+ ## Why FastMCP
133
+
134
+ Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: **with FastMCP, best practices are built in.**
135
+
136
+ **That's why FastMCP is the standard framework for working with MCP.** FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages.
137
+
138
+ FastMCP has three pillars:
139
+
140
+ <table>
141
+ <tr>
142
+ <td align="center" valign="top" width="33%">
143
+ <a href="https://gofastmcp.com/servers/server">
144
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" />
145
+ <br /><strong>Servers</strong>
146
+ </a>
147
+ <br />Expose tools, resources, and prompts to LLMs.
148
+ </td>
149
+ <td align="center" valign="top" width="33%">
150
+ <a href="https://gofastmcp.com/apps/overview">
151
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" />
152
+ <br /><strong>Apps</strong>
153
+ </a>
154
+ <br />Give your tools interactive UIs rendered directly in the conversation.
155
+ </td>
156
+ <td align="center" valign="top" width="33%">
157
+ <a href="https://gofastmcp.com/clients/client">
158
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" />
159
+ <br /><strong>Clients</strong>
160
+ </a>
161
+ <br />Connect to any MCP server — local or remote, programmatic or CLI.
162
+ </td>
163
+ </tr>
164
+ </table>
165
+
166
+ **[Servers](https://gofastmcp.com/servers/server)** wrap your Python functions into MCP-compliant tools, resources, and prompts. **[Clients](https://gofastmcp.com/clients/client)** connect to any server with full protocol support. And **[Apps](https://gofastmcp.com/apps/overview)** give your tools interactive UIs rendered directly in the conversation.
167
+
168
+ Ready to build? Start with the [installation guide](https://gofastmcp.com/getting-started/installation) or jump straight to the [quickstart](https://gofastmcp.com/getting-started/quickstart).
169
+
170
+ ## Run FastMCP in production with Horizon
171
+
172
+ FastMCP is the standard way to build MCP servers. **[Prefect Horizon](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_body)** is the enterprise MCP gateway for running them safely.
173
+
174
+ Built by the FastMCP team, Horizon packages the best practices we've learned shipping the world's most popular MCP framework.
175
+
176
+ Deploy FastMCP servers from GitHub with branch previews and instant rollback. Create a private registry of every MCP your company uses. Secure access with SSO and tool-level RBAC. Get audit logs, observability, and governance across your MCP stack. Remix approved tools into purpose-built endpoints for teams and agents.
177
+
178
+ Start with FastMCP. [Scale with Horizon →](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_cta)
179
+
180
+ ## Installation
181
+
182
+ We recommend installing FastMCP with [uv](https://docs.astral.sh/uv/):
183
+
184
+ ```bash
185
+ uv pip install fastmcp
186
+ ```
187
+
188
+ For full installation instructions, including verification and upgrading, see the [**Installation Guide**](https://gofastmcp.com/getting-started/installation).
189
+
190
+ **Upgrading?** We have guides for:
191
+ - [Upgrading from FastMCP v2](https://gofastmcp.com/getting-started/upgrading/from-fastmcp-2)
192
+ - [Upgrading from the MCP Python SDK](https://gofastmcp.com/getting-started/upgrading/from-mcp-sdk)
193
+ - [Upgrading from the low-level SDK](https://gofastmcp.com/getting-started/upgrading/from-low-level-sdk)
194
+
195
+ ## 📚 Documentation
196
+
197
+ FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns.
198
+
199
+ Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily:
200
+
201
+ - [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
202
+ - [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
203
+
204
+ **Community:** Join our [Discord server](https://discord.gg/uu8dJCgttd) to connect with other FastMCP developers and share what you're building.
205
+
206
+ ## Contributing
207
+
208
+ We welcome contributions! See the [Contributing Guide](https://gofastmcp.com/development/contributing) for setup instructions, testing requirements, and PR guidelines.
@@ -0,0 +1,120 @@
1
+ <div align="center">
2
+
3
+ <!-- omit in toc -->
4
+
5
+ <picture>
6
+ <source width="550" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4-dark.png">
7
+ <source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png">
8
+ <img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png">
9
+ </picture>
10
+
11
+ # FastMCP 🚀
12
+
13
+ <strong>Move fast and make things.</strong>
14
+
15
+ *Made with 💙 by [Prefect](https://www.prefect.io/)*
16
+
17
+ [![Docs](https://img.shields.io/badge/docs-gofastmcp.com-blue)](https://gofastmcp.com)
18
+ [![Discord](https://img.shields.io/badge/community-discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/uu8dJCgttd)
19
+ [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
20
+ [![Tests](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml/badge.svg)](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml)
21
+ [![License](https://img.shields.io/github/license/PrefectHQ/fastmcp.svg)](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE)
22
+
23
+ <a href="https://trendshift.io/repositories/13266" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13266" alt="prefecthq%2Ffastmcp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
24
+ </div>
25
+
26
+ ---
27
+
28
+ The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production:
29
+
30
+ ```python
31
+ from fastmcp import FastMCP
32
+
33
+ mcp = FastMCP("Demo 🚀")
34
+
35
+ @mcp.tool
36
+ def add(a: int, b: int) -> int:
37
+ """Add two numbers"""
38
+ return a + b
39
+
40
+ if __name__ == "__main__":
41
+ mcp.run()
42
+ ```
43
+
44
+ ## Why FastMCP
45
+
46
+ Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: **with FastMCP, best practices are built in.**
47
+
48
+ **That's why FastMCP is the standard framework for working with MCP.** FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages.
49
+
50
+ FastMCP has three pillars:
51
+
52
+ <table>
53
+ <tr>
54
+ <td align="center" valign="top" width="33%">
55
+ <a href="https://gofastmcp.com/servers/server">
56
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" />
57
+ <br /><strong>Servers</strong>
58
+ </a>
59
+ <br />Expose tools, resources, and prompts to LLMs.
60
+ </td>
61
+ <td align="center" valign="top" width="33%">
62
+ <a href="https://gofastmcp.com/apps/overview">
63
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" />
64
+ <br /><strong>Apps</strong>
65
+ </a>
66
+ <br />Give your tools interactive UIs rendered directly in the conversation.
67
+ </td>
68
+ <td align="center" valign="top" width="33%">
69
+ <a href="https://gofastmcp.com/clients/client">
70
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" />
71
+ <br /><strong>Clients</strong>
72
+ </a>
73
+ <br />Connect to any MCP server — local or remote, programmatic or CLI.
74
+ </td>
75
+ </tr>
76
+ </table>
77
+
78
+ **[Servers](https://gofastmcp.com/servers/server)** wrap your Python functions into MCP-compliant tools, resources, and prompts. **[Clients](https://gofastmcp.com/clients/client)** connect to any server with full protocol support. And **[Apps](https://gofastmcp.com/apps/overview)** give your tools interactive UIs rendered directly in the conversation.
79
+
80
+ Ready to build? Start with the [installation guide](https://gofastmcp.com/getting-started/installation) or jump straight to the [quickstart](https://gofastmcp.com/getting-started/quickstart).
81
+
82
+ ## Run FastMCP in production with Horizon
83
+
84
+ FastMCP is the standard way to build MCP servers. **[Prefect Horizon](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_body)** is the enterprise MCP gateway for running them safely.
85
+
86
+ Built by the FastMCP team, Horizon packages the best practices we've learned shipping the world's most popular MCP framework.
87
+
88
+ Deploy FastMCP servers from GitHub with branch previews and instant rollback. Create a private registry of every MCP your company uses. Secure access with SSO and tool-level RBAC. Get audit logs, observability, and governance across your MCP stack. Remix approved tools into purpose-built endpoints for teams and agents.
89
+
90
+ Start with FastMCP. [Scale with Horizon →](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_cta)
91
+
92
+ ## Installation
93
+
94
+ We recommend installing FastMCP with [uv](https://docs.astral.sh/uv/):
95
+
96
+ ```bash
97
+ uv pip install fastmcp
98
+ ```
99
+
100
+ For full installation instructions, including verification and upgrading, see the [**Installation Guide**](https://gofastmcp.com/getting-started/installation).
101
+
102
+ **Upgrading?** We have guides for:
103
+ - [Upgrading from FastMCP v2](https://gofastmcp.com/getting-started/upgrading/from-fastmcp-2)
104
+ - [Upgrading from the MCP Python SDK](https://gofastmcp.com/getting-started/upgrading/from-mcp-sdk)
105
+ - [Upgrading from the low-level SDK](https://gofastmcp.com/getting-started/upgrading/from-low-level-sdk)
106
+
107
+ ## 📚 Documentation
108
+
109
+ FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns.
110
+
111
+ Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily:
112
+
113
+ - [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
114
+ - [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
115
+
116
+ **Community:** Join our [Discord server](https://discord.gg/uu8dJCgttd) to connect with other FastMCP developers and share what you're building.
117
+
118
+ ## Contributing
119
+
120
+ We welcome contributions! See the [Contributing Guide](https://gofastmcp.com/development/contributing) for setup instructions, testing requirements, and PR guidelines.
@@ -0,0 +1,117 @@
1
+ """FastMCP - An ergonomic MCP interface."""
2
+
3
+ import importlib
4
+ import warnings
5
+ from importlib.metadata import PackageNotFoundError, version as _version
6
+ from typing import TYPE_CHECKING
7
+
8
+ from fastmcp.settings import Settings
9
+ from fastmcp.utilities.logging import configure_logging as _configure_logging
10
+
11
+ if TYPE_CHECKING:
12
+ from fastmcp.client import Client as Client
13
+ from fastmcp.apps.app import FastMCPApp as FastMCPApp
14
+ from fastmcp.exceptions import (
15
+ FastMCPDeprecationWarning as FastMCPDeprecationWarning,
16
+ )
17
+ from fastmcp.server.context import Context as Context
18
+ from fastmcp.server.server import FastMCP as FastMCP
19
+
20
+ settings = Settings()
21
+ if settings.log_enabled:
22
+ _configure_logging(
23
+ level=settings.log_level,
24
+ enable_rich_tracebacks=settings.enable_rich_tracebacks,
25
+ )
26
+
27
+ try:
28
+ __version__ = _version("fastmcp-slim")
29
+ except PackageNotFoundError:
30
+ __version__ = _version("fastmcp")
31
+
32
+ if settings.deprecation_warnings:
33
+ try:
34
+ from fastmcp.exceptions import FastMCPDeprecationWarning
35
+ except ImportError:
36
+ pass
37
+ else:
38
+ warnings.simplefilter("default", FastMCPDeprecationWarning)
39
+
40
+
41
+ # --- Lazy imports for performance (see #3292) ---
42
+ # Client and the client submodule are deferred so that server-only users
43
+ # don't pay for the client import chain. Do not convert back to top-level.
44
+
45
+
46
+ def __getattr__(name: str) -> object:
47
+ if name == "Client":
48
+ try:
49
+ from fastmcp.client import Client
50
+ except ImportError as exc:
51
+ raise ImportError(
52
+ "FastMCP client support is not installed. Install "
53
+ "`fastmcp-slim[client]` or `fastmcp`."
54
+ ) from exc
55
+
56
+ return Client
57
+ if name == "Context":
58
+ try:
59
+ from fastmcp.server.context import Context
60
+ except ImportError as exc:
61
+ raise ImportError(
62
+ "FastMCP server support is not installed. Install "
63
+ "`fastmcp-slim[server]` or `fastmcp`."
64
+ ) from exc
65
+
66
+ return Context
67
+ if name == "FastMCP":
68
+ try:
69
+ from fastmcp.server.server import FastMCP
70
+ except ImportError as exc:
71
+ raise ImportError(
72
+ "FastMCP server support is not installed. Install "
73
+ "`fastmcp-slim[server]` or `fastmcp`."
74
+ ) from exc
75
+
76
+ return FastMCP
77
+ if name == "FastMCPApp":
78
+ try:
79
+ from fastmcp.apps.app import FastMCPApp
80
+ except ImportError as exc:
81
+ raise ImportError(
82
+ "FastMCP app support is not installed. Install "
83
+ "`fastmcp-slim[server,apps]` or `fastmcp[apps]`."
84
+ ) from exc
85
+
86
+ return FastMCPApp
87
+ if name == "FastMCPDeprecationWarning":
88
+ from fastmcp.exceptions import FastMCPDeprecationWarning
89
+
90
+ return FastMCPDeprecationWarning
91
+ if name == "client":
92
+ try:
93
+ return importlib.import_module("fastmcp.client")
94
+ except ImportError as exc:
95
+ raise ImportError(
96
+ "FastMCP client support is not installed. Install "
97
+ "`fastmcp-slim[client]` or `fastmcp`."
98
+ ) from exc
99
+ if name == "server":
100
+ try:
101
+ return importlib.import_module("fastmcp.server")
102
+ except ImportError as exc:
103
+ raise ImportError(
104
+ "FastMCP server support is not installed. Install "
105
+ "`fastmcp-slim[server]` or `fastmcp`."
106
+ ) from exc
107
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
108
+
109
+
110
+ __all__ = [
111
+ "Client",
112
+ "Context",
113
+ "FastMCP",
114
+ "FastMCPApp",
115
+ "FastMCPDeprecationWarning",
116
+ "settings",
117
+ ]
@@ -0,0 +1,18 @@
1
+ """FastMCP Apps — interactive UIs for MCP tools.
2
+
3
+ This package contains the app-related components:
4
+
5
+ - ``FastMCPApp`` — composable provider for interactive apps with backend tools
6
+ - ``AppConfig`` — configuration for MCP App tools and resources
7
+ - ``ResourceCSP`` / ``ResourcePermissions`` — security configuration
8
+ """
9
+
10
+ from fastmcp.apps.app import FastMCPApp as FastMCPApp
11
+ from fastmcp.apps.config import AppConfig as AppConfig
12
+ from fastmcp.apps.config import PrefabAppConfig as PrefabAppConfig
13
+ from fastmcp.apps.config import ResourceCSP as ResourceCSP
14
+ from fastmcp.apps.config import ResourcePermissions as ResourcePermissions
15
+ from fastmcp.apps.config import UI_EXTENSION_ID as UI_EXTENSION_ID
16
+ from fastmcp.apps.config import app_config_to_meta_dict as app_config_to_meta_dict
17
+ from fastmcp.utilities.mime import UI_MIME_TYPE as UI_MIME_TYPE
18
+ from fastmcp.utilities.mime import resolve_ui_mime_type as resolve_ui_mime_type