fastmcp-slim 3.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. fastmcp_slim-3.3.0/.gitignore +80 -0
  2. fastmcp_slim-3.3.0/PKG-INFO +195 -0
  3. fastmcp_slim-3.3.0/README.md +120 -0
  4. fastmcp_slim-3.3.0/fastmcp/__init__.py +100 -0
  5. fastmcp_slim-3.3.0/fastmcp/_install_hints.py +25 -0
  6. fastmcp_slim-3.3.0/fastmcp/apps/__init__.py +18 -0
  7. fastmcp_slim-3.3.0/fastmcp/apps/app.py +427 -0
  8. fastmcp_slim-3.3.0/fastmcp/apps/approval.py +198 -0
  9. fastmcp_slim-3.3.0/fastmcp/apps/choice.py +141 -0
  10. fastmcp_slim-3.3.0/fastmcp/apps/config.py +177 -0
  11. fastmcp_slim-3.3.0/fastmcp/apps/file_upload.py +405 -0
  12. fastmcp_slim-3.3.0/fastmcp/apps/form.py +229 -0
  13. fastmcp_slim-3.3.0/fastmcp/apps/generative.py +199 -0
  14. fastmcp_slim-3.3.0/fastmcp/cli/__init__.py +8 -0
  15. fastmcp_slim-3.3.0/fastmcp/cli/__main__.py +5 -0
  16. fastmcp_slim-3.3.0/fastmcp/cli/apps_dev.py +1825 -0
  17. fastmcp_slim-3.3.0/fastmcp/cli/auth.py +13 -0
  18. fastmcp_slim-3.3.0/fastmcp/cli/cimd.py +218 -0
  19. fastmcp_slim-3.3.0/fastmcp/cli/cli.py +1116 -0
  20. fastmcp_slim-3.3.0/fastmcp/cli/client.py +986 -0
  21. fastmcp_slim-3.3.0/fastmcp/cli/discovery.py +375 -0
  22. fastmcp_slim-3.3.0/fastmcp/cli/generate.py +806 -0
  23. fastmcp_slim-3.3.0/fastmcp/cli/install/__init__.py +26 -0
  24. fastmcp_slim-3.3.0/fastmcp/cli/install/claude_code.py +242 -0
  25. fastmcp_slim-3.3.0/fastmcp/cli/install/claude_desktop.py +232 -0
  26. fastmcp_slim-3.3.0/fastmcp/cli/install/cursor.py +321 -0
  27. fastmcp_slim-3.3.0/fastmcp/cli/install/gemini_cli.py +239 -0
  28. fastmcp_slim-3.3.0/fastmcp/cli/install/goose.py +208 -0
  29. fastmcp_slim-3.3.0/fastmcp/cli/install/mcp_json.py +191 -0
  30. fastmcp_slim-3.3.0/fastmcp/cli/install/shared.py +195 -0
  31. fastmcp_slim-3.3.0/fastmcp/cli/install/stdio.py +156 -0
  32. fastmcp_slim-3.3.0/fastmcp/cli/run.py +489 -0
  33. fastmcp_slim-3.3.0/fastmcp/cli/tasks.py +110 -0
  34. fastmcp_slim-3.3.0/fastmcp/client/__init__.py +35 -0
  35. fastmcp_slim-3.3.0/fastmcp/client/auth/__init__.py +4 -0
  36. fastmcp_slim-3.3.0/fastmcp/client/auth/bearer.py +17 -0
  37. fastmcp_slim-3.3.0/fastmcp/client/auth/oauth.py +430 -0
  38. fastmcp_slim-3.3.0/fastmcp/client/client.py +911 -0
  39. fastmcp_slim-3.3.0/fastmcp/client/dependencies.py +20 -0
  40. fastmcp_slim-3.3.0/fastmcp/client/elicitation.py +88 -0
  41. fastmcp_slim-3.3.0/fastmcp/client/logging.py +54 -0
  42. fastmcp_slim-3.3.0/fastmcp/client/messages.py +128 -0
  43. fastmcp_slim-3.3.0/fastmcp/client/mixins/__init__.py +13 -0
  44. fastmcp_slim-3.3.0/fastmcp/client/mixins/prompts.py +325 -0
  45. fastmcp_slim-3.3.0/fastmcp/client/mixins/resources.py +382 -0
  46. fastmcp_slim-3.3.0/fastmcp/client/mixins/task_management.py +157 -0
  47. fastmcp_slim-3.3.0/fastmcp/client/mixins/tools.py +476 -0
  48. fastmcp_slim-3.3.0/fastmcp/client/oauth_callback.py +251 -0
  49. fastmcp_slim-3.3.0/fastmcp/client/progress.py +41 -0
  50. fastmcp_slim-3.3.0/fastmcp/client/roots.py +78 -0
  51. fastmcp_slim-3.3.0/fastmcp/client/sampling/__init__.py +71 -0
  52. fastmcp_slim-3.3.0/fastmcp/client/sampling/handlers/__init__.py +0 -0
  53. fastmcp_slim-3.3.0/fastmcp/client/sampling/handlers/anthropic.py +449 -0
  54. fastmcp_slim-3.3.0/fastmcp/client/sampling/handlers/google_genai.py +403 -0
  55. fastmcp_slim-3.3.0/fastmcp/client/sampling/handlers/openai.py +513 -0
  56. fastmcp_slim-3.3.0/fastmcp/client/tasks.py +584 -0
  57. fastmcp_slim-3.3.0/fastmcp/client/telemetry.py +57 -0
  58. fastmcp_slim-3.3.0/fastmcp/client/transports/__init__.py +36 -0
  59. fastmcp_slim-3.3.0/fastmcp/client/transports/base.py +82 -0
  60. fastmcp_slim-3.3.0/fastmcp/client/transports/config.py +224 -0
  61. fastmcp_slim-3.3.0/fastmcp/client/transports/http.py +220 -0
  62. fastmcp_slim-3.3.0/fastmcp/client/transports/inference.py +170 -0
  63. fastmcp_slim-3.3.0/fastmcp/client/transports/memory.py +113 -0
  64. fastmcp_slim-3.3.0/fastmcp/client/transports/sse.py +158 -0
  65. fastmcp_slim-3.3.0/fastmcp/client/transports/stdio.py +567 -0
  66. fastmcp_slim-3.3.0/fastmcp/contrib/README.md +19 -0
  67. fastmcp_slim-3.3.0/fastmcp/contrib/bulk_tool_caller/README.md +35 -0
  68. fastmcp_slim-3.3.0/fastmcp/contrib/bulk_tool_caller/__init__.py +3 -0
  69. fastmcp_slim-3.3.0/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +151 -0
  70. fastmcp_slim-3.3.0/fastmcp/contrib/bulk_tool_caller/example.py +17 -0
  71. fastmcp_slim-3.3.0/fastmcp/contrib/component_manager/README.md +164 -0
  72. fastmcp_slim-3.3.0/fastmcp/contrib/component_manager/__init__.py +3 -0
  73. fastmcp_slim-3.3.0/fastmcp/contrib/component_manager/component_manager.py +121 -0
  74. fastmcp_slim-3.3.0/fastmcp/contrib/component_manager/example.py +59 -0
  75. fastmcp_slim-3.3.0/fastmcp/contrib/mcp_mixin/README.md +147 -0
  76. fastmcp_slim-3.3.0/fastmcp/contrib/mcp_mixin/__init__.py +8 -0
  77. fastmcp_slim-3.3.0/fastmcp/contrib/mcp_mixin/example.py +52 -0
  78. fastmcp_slim-3.3.0/fastmcp/contrib/mcp_mixin/mcp_mixin.py +321 -0
  79. fastmcp_slim-3.3.0/fastmcp/decorators.py +41 -0
  80. fastmcp_slim-3.3.0/fastmcp/dependencies.py +40 -0
  81. fastmcp_slim-3.3.0/fastmcp/exceptions.py +63 -0
  82. fastmcp_slim-3.3.0/fastmcp/experimental/__init__.py +0 -0
  83. fastmcp_slim-3.3.0/fastmcp/experimental/sampling/__init__.py +0 -0
  84. fastmcp_slim-3.3.0/fastmcp/experimental/sampling/handlers/__init__.py +5 -0
  85. fastmcp_slim-3.3.0/fastmcp/experimental/sampling/handlers/openai.py +5 -0
  86. fastmcp_slim-3.3.0/fastmcp/experimental/server/openapi/__init__.py +42 -0
  87. fastmcp_slim-3.3.0/fastmcp/experimental/transforms/__init__.py +1 -0
  88. fastmcp_slim-3.3.0/fastmcp/experimental/transforms/code_mode.py +573 -0
  89. fastmcp_slim-3.3.0/fastmcp/experimental/utilities/openapi/__init__.py +37 -0
  90. fastmcp_slim-3.3.0/fastmcp/mcp_config.py +387 -0
  91. fastmcp_slim-3.3.0/fastmcp/prompts/__init__.py +20 -0
  92. fastmcp_slim-3.3.0/fastmcp/prompts/base.py +440 -0
  93. fastmcp_slim-3.3.0/fastmcp/prompts/function_prompt.py +515 -0
  94. fastmcp_slim-3.3.0/fastmcp/py.typed +0 -0
  95. fastmcp_slim-3.3.0/fastmcp/resources/__init__.py +32 -0
  96. fastmcp_slim-3.3.0/fastmcp/resources/base.py +497 -0
  97. fastmcp_slim-3.3.0/fastmcp/resources/function_resource.py +343 -0
  98. fastmcp_slim-3.3.0/fastmcp/resources/template.py +673 -0
  99. fastmcp_slim-3.3.0/fastmcp/resources/types.py +188 -0
  100. fastmcp_slim-3.3.0/fastmcp/server/__init__.py +18 -0
  101. fastmcp_slim-3.3.0/fastmcp/server/app.py +19 -0
  102. fastmcp_slim-3.3.0/fastmcp/server/apps.py +22 -0
  103. fastmcp_slim-3.3.0/fastmcp/server/auth/__init__.py +75 -0
  104. fastmcp_slim-3.3.0/fastmcp/server/auth/auth.py +848 -0
  105. fastmcp_slim-3.3.0/fastmcp/server/auth/authorization.py +182 -0
  106. fastmcp_slim-3.3.0/fastmcp/server/auth/cimd.py +797 -0
  107. fastmcp_slim-3.3.0/fastmcp/server/auth/handlers/__init__.py +0 -0
  108. fastmcp_slim-3.3.0/fastmcp/server/auth/handlers/authorize.py +326 -0
  109. fastmcp_slim-3.3.0/fastmcp/server/auth/jwt_issuer.py +283 -0
  110. fastmcp_slim-3.3.0/fastmcp/server/auth/middleware.py +96 -0
  111. fastmcp_slim-3.3.0/fastmcp/server/auth/oauth_proxy/__init__.py +14 -0
  112. fastmcp_slim-3.3.0/fastmcp/server/auth/oauth_proxy/consent.py +560 -0
  113. fastmcp_slim-3.3.0/fastmcp/server/auth/oauth_proxy/models.py +261 -0
  114. fastmcp_slim-3.3.0/fastmcp/server/auth/oauth_proxy/proxy.py +2201 -0
  115. fastmcp_slim-3.3.0/fastmcp/server/auth/oauth_proxy/ui.py +300 -0
  116. fastmcp_slim-3.3.0/fastmcp/server/auth/oidc_proxy.py +498 -0
  117. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/__init__.py +0 -0
  118. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/auth0.py +137 -0
  119. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/aws.py +231 -0
  120. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/azure.py +860 -0
  121. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/clerk.py +390 -0
  122. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/debug.py +114 -0
  123. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/descope.py +209 -0
  124. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/discord.py +290 -0
  125. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/github.py +305 -0
  126. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/google.py +367 -0
  127. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/in_memory.py +366 -0
  128. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/introspection.py +305 -0
  129. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/jwt.py +616 -0
  130. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/keycloak.py +74 -0
  131. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/oci.py +189 -0
  132. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/propelauth.py +234 -0
  133. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/scalekit.py +212 -0
  134. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/supabase.py +181 -0
  135. fastmcp_slim-3.3.0/fastmcp/server/auth/providers/workos.py +430 -0
  136. fastmcp_slim-3.3.0/fastmcp/server/auth/redirect_validation.py +248 -0
  137. fastmcp_slim-3.3.0/fastmcp/server/auth/ssrf.py +356 -0
  138. fastmcp_slim-3.3.0/fastmcp/server/context.py +1457 -0
  139. fastmcp_slim-3.3.0/fastmcp/server/dependencies.py +1385 -0
  140. fastmcp_slim-3.3.0/fastmcp/server/elicitation.py +508 -0
  141. fastmcp_slim-3.3.0/fastmcp/server/event_store.py +177 -0
  142. fastmcp_slim-3.3.0/fastmcp/server/http.py +406 -0
  143. fastmcp_slim-3.3.0/fastmcp/server/lifespan.py +198 -0
  144. fastmcp_slim-3.3.0/fastmcp/server/low_level.py +351 -0
  145. fastmcp_slim-3.3.0/fastmcp/server/middleware/__init__.py +15 -0
  146. fastmcp_slim-3.3.0/fastmcp/server/middleware/authorization.py +321 -0
  147. fastmcp_slim-3.3.0/fastmcp/server/middleware/caching.py +590 -0
  148. fastmcp_slim-3.3.0/fastmcp/server/middleware/dereference.py +78 -0
  149. fastmcp_slim-3.3.0/fastmcp/server/middleware/error_handling.py +226 -0
  150. fastmcp_slim-3.3.0/fastmcp/server/middleware/logging.py +256 -0
  151. fastmcp_slim-3.3.0/fastmcp/server/middleware/middleware.py +205 -0
  152. fastmcp_slim-3.3.0/fastmcp/server/middleware/ping.py +73 -0
  153. fastmcp_slim-3.3.0/fastmcp/server/middleware/rate_limiting.py +231 -0
  154. fastmcp_slim-3.3.0/fastmcp/server/middleware/response_limiting.py +137 -0
  155. fastmcp_slim-3.3.0/fastmcp/server/middleware/timing.py +156 -0
  156. fastmcp_slim-3.3.0/fastmcp/server/middleware/tool_injection.py +141 -0
  157. fastmcp_slim-3.3.0/fastmcp/server/mixins/__init__.py +7 -0
  158. fastmcp_slim-3.3.0/fastmcp/server/mixins/lifespan.py +299 -0
  159. fastmcp_slim-3.3.0/fastmcp/server/mixins/mcp_operations.py +373 -0
  160. fastmcp_slim-3.3.0/fastmcp/server/mixins/transport.py +369 -0
  161. fastmcp_slim-3.3.0/fastmcp/server/openapi/__init__.py +57 -0
  162. fastmcp_slim-3.3.0/fastmcp/server/openapi/components.py +30 -0
  163. fastmcp_slim-3.3.0/fastmcp/server/openapi/routing.py +48 -0
  164. fastmcp_slim-3.3.0/fastmcp/server/openapi/server.py +125 -0
  165. fastmcp_slim-3.3.0/fastmcp/server/providers/__init__.py +71 -0
  166. fastmcp_slim-3.3.0/fastmcp/server/providers/addressing.py +69 -0
  167. fastmcp_slim-3.3.0/fastmcp/server/providers/aggregate.py +308 -0
  168. fastmcp_slim-3.3.0/fastmcp/server/providers/base.py +627 -0
  169. fastmcp_slim-3.3.0/fastmcp/server/providers/fastmcp_provider.py +731 -0
  170. fastmcp_slim-3.3.0/fastmcp/server/providers/filesystem.py +225 -0
  171. fastmcp_slim-3.3.0/fastmcp/server/providers/filesystem_discovery.py +390 -0
  172. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/__init__.py +11 -0
  173. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/decorators/__init__.py +15 -0
  174. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/decorators/prompts.py +258 -0
  175. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/decorators/resources.py +242 -0
  176. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/decorators/tools.py +423 -0
  177. fastmcp_slim-3.3.0/fastmcp/server/providers/local_provider/local_provider.py +465 -0
  178. fastmcp_slim-3.3.0/fastmcp/server/providers/openapi/README.md +266 -0
  179. fastmcp_slim-3.3.0/fastmcp/server/providers/openapi/__init__.py +39 -0
  180. fastmcp_slim-3.3.0/fastmcp/server/providers/openapi/components.py +421 -0
  181. fastmcp_slim-3.3.0/fastmcp/server/providers/openapi/provider.py +436 -0
  182. fastmcp_slim-3.3.0/fastmcp/server/providers/openapi/routing.py +109 -0
  183. fastmcp_slim-3.3.0/fastmcp/server/providers/prefab_synthesis.py +247 -0
  184. fastmcp_slim-3.3.0/fastmcp/server/providers/proxy.py +1110 -0
  185. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/__init__.py +59 -0
  186. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/_common.py +107 -0
  187. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/claude_provider.py +44 -0
  188. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/directory_provider.py +153 -0
  189. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/skill_provider.py +449 -0
  190. fastmcp_slim-3.3.0/fastmcp/server/providers/skills/vendor_providers.py +142 -0
  191. fastmcp_slim-3.3.0/fastmcp/server/providers/wrapped_provider.py +148 -0
  192. fastmcp_slim-3.3.0/fastmcp/server/proxy.py +43 -0
  193. fastmcp_slim-3.3.0/fastmcp/server/sampling/__init__.py +10 -0
  194. fastmcp_slim-3.3.0/fastmcp/server/sampling/run.py +747 -0
  195. fastmcp_slim-3.3.0/fastmcp/server/sampling/sampling_tool.py +204 -0
  196. fastmcp_slim-3.3.0/fastmcp/server/server.py +2480 -0
  197. fastmcp_slim-3.3.0/fastmcp/server/tasks/__init__.py +38 -0
  198. fastmcp_slim-3.3.0/fastmcp/server/tasks/capabilities.py +44 -0
  199. fastmcp_slim-3.3.0/fastmcp/server/tasks/config.py +147 -0
  200. fastmcp_slim-3.3.0/fastmcp/server/tasks/context.py +334 -0
  201. fastmcp_slim-3.3.0/fastmcp/server/tasks/elicitation.py +347 -0
  202. fastmcp_slim-3.3.0/fastmcp/server/tasks/handlers.py +231 -0
  203. fastmcp_slim-3.3.0/fastmcp/server/tasks/keys.py +165 -0
  204. fastmcp_slim-3.3.0/fastmcp/server/tasks/notifications.py +308 -0
  205. fastmcp_slim-3.3.0/fastmcp/server/tasks/requests.py +477 -0
  206. fastmcp_slim-3.3.0/fastmcp/server/tasks/routing.py +76 -0
  207. fastmcp_slim-3.3.0/fastmcp/server/tasks/subscriptions.py +222 -0
  208. fastmcp_slim-3.3.0/fastmcp/server/telemetry.py +148 -0
  209. fastmcp_slim-3.3.0/fastmcp/server/transforms/__init__.py +240 -0
  210. fastmcp_slim-3.3.0/fastmcp/server/transforms/catalog.py +245 -0
  211. fastmcp_slim-3.3.0/fastmcp/server/transforms/namespace.py +193 -0
  212. fastmcp_slim-3.3.0/fastmcp/server/transforms/prompts_as_tools.py +169 -0
  213. fastmcp_slim-3.3.0/fastmcp/server/transforms/resources_as_tools.py +180 -0
  214. fastmcp_slim-3.3.0/fastmcp/server/transforms/search/__init__.py +31 -0
  215. fastmcp_slim-3.3.0/fastmcp/server/transforms/search/base.py +269 -0
  216. fastmcp_slim-3.3.0/fastmcp/server/transforms/search/bm25.py +144 -0
  217. fastmcp_slim-3.3.0/fastmcp/server/transforms/search/regex.py +55 -0
  218. fastmcp_slim-3.3.0/fastmcp/server/transforms/tool_transform.py +96 -0
  219. fastmcp_slim-3.3.0/fastmcp/server/transforms/version_filter.py +148 -0
  220. fastmcp_slim-3.3.0/fastmcp/server/transforms/visibility.py +526 -0
  221. fastmcp_slim-3.3.0/fastmcp/settings.py +381 -0
  222. fastmcp_slim-3.3.0/fastmcp/telemetry.py +122 -0
  223. fastmcp_slim-3.3.0/fastmcp/tools/__init__.py +20 -0
  224. fastmcp_slim-3.3.0/fastmcp/tools/base.py +612 -0
  225. fastmcp_slim-3.3.0/fastmcp/tools/function_parsing.py +313 -0
  226. fastmcp_slim-3.3.0/fastmcp/tools/function_tool.py +548 -0
  227. fastmcp_slim-3.3.0/fastmcp/tools/tool_transform.py +1028 -0
  228. fastmcp_slim-3.3.0/fastmcp/types.py +32 -0
  229. fastmcp_slim-3.3.0/fastmcp/utilities/__init__.py +1 -0
  230. fastmcp_slim-3.3.0/fastmcp/utilities/async_utils.py +82 -0
  231. fastmcp_slim-3.3.0/fastmcp/utilities/auth.py +91 -0
  232. fastmcp_slim-3.3.0/fastmcp/utilities/cli.py +268 -0
  233. fastmcp_slim-3.3.0/fastmcp/utilities/components.py +262 -0
  234. fastmcp_slim-3.3.0/fastmcp/utilities/docstring_parsing.py +65 -0
  235. fastmcp_slim-3.3.0/fastmcp/utilities/exceptions.py +49 -0
  236. fastmcp_slim-3.3.0/fastmcp/utilities/http.py +8 -0
  237. fastmcp_slim-3.3.0/fastmcp/utilities/inspect.py +494 -0
  238. fastmcp_slim-3.3.0/fastmcp/utilities/json_schema.py +671 -0
  239. fastmcp_slim-3.3.0/fastmcp/utilities/json_schema_type.py +796 -0
  240. fastmcp_slim-3.3.0/fastmcp/utilities/lifespan.py +56 -0
  241. fastmcp_slim-3.3.0/fastmcp/utilities/logging.py +244 -0
  242. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/__init__.py +25 -0
  243. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/__init__.py +0 -0
  244. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/environments/__init__.py +6 -0
  245. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/environments/base.py +29 -0
  246. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/environments/uv.py +271 -0
  247. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py +447 -0
  248. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/schema.json +365 -0
  249. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/sources/__init__.py +0 -0
  250. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/sources/base.py +29 -0
  251. fastmcp_slim-3.3.0/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py +217 -0
  252. fastmcp_slim-3.3.0/fastmcp/utilities/mime.py +27 -0
  253. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/README.md +211 -0
  254. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/__init__.py +61 -0
  255. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/director.py +375 -0
  256. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/formatters.py +355 -0
  257. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/json_schema_converter.py +346 -0
  258. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/models.py +88 -0
  259. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/parser.py +825 -0
  260. fastmcp_slim-3.3.0/fastmcp/utilities/openapi/schemas.py +607 -0
  261. fastmcp_slim-3.3.0/fastmcp/utilities/pagination.py +80 -0
  262. fastmcp_slim-3.3.0/fastmcp/utilities/skills.py +257 -0
  263. fastmcp_slim-3.3.0/fastmcp/utilities/tests.py +274 -0
  264. fastmcp_slim-3.3.0/fastmcp/utilities/timeout.py +47 -0
  265. fastmcp_slim-3.3.0/fastmcp/utilities/token_cache.py +173 -0
  266. fastmcp_slim-3.3.0/fastmcp/utilities/types.py +499 -0
  267. fastmcp_slim-3.3.0/fastmcp/utilities/ui.py +626 -0
  268. fastmcp_slim-3.3.0/fastmcp/utilities/version_check.py +153 -0
  269. fastmcp_slim-3.3.0/fastmcp/utilities/versions.py +333 -0
  270. fastmcp_slim-3.3.0/pyproject.toml +103 -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,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastmcp-slim
3
+ Version: 3.3.0
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: gemini
43
+ Requires-Dist: google-genai>=1.18.0; extra == 'gemini'
44
+ Requires-Dist: jsonref>=1.1.0; extra == 'gemini'
45
+ Provides-Extra: mcp
46
+ Requires-Dist: exceptiongroup>=1.2.2; extra == 'mcp'
47
+ Requires-Dist: httpx<1.0,>=0.28.1; extra == 'mcp'
48
+ Requires-Dist: mcp<2.0,>=1.24.0; extra == 'mcp'
49
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'mcp'
50
+ Provides-Extra: openai
51
+ Requires-Dist: openai>=1.102.0; extra == 'openai'
52
+ Provides-Extra: server
53
+ Requires-Dist: authlib>=1.6.11; extra == 'server'
54
+ Requires-Dist: cyclopts>=4.0.0; extra == 'server'
55
+ Requires-Dist: exceptiongroup>=1.2.2; extra == 'server'
56
+ Requires-Dist: griffelib>=2.0.0; extra == 'server'
57
+ Requires-Dist: httpx<1.0,>=0.28.1; extra == 'server'
58
+ Requires-Dist: jsonref>=1.1.0; extra == 'server'
59
+ Requires-Dist: jsonschema-path>=0.3.4; extra == 'server'
60
+ Requires-Dist: mcp<2.0,>=1.24.0; extra == 'server'
61
+ Requires-Dist: openapi-pydantic>=0.5.1; extra == 'server'
62
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'server'
63
+ Requires-Dist: packaging>=24.0; extra == 'server'
64
+ Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'server'
65
+ Requires-Dist: pyperclip>=1.9.0; extra == 'server'
66
+ Requires-Dist: python-multipart>=0.0.26; extra == 'server'
67
+ Requires-Dist: pyyaml<7.0,>=6.0; extra == 'server'
68
+ Requires-Dist: uncalled-for>=0.2.0; extra == 'server'
69
+ Requires-Dist: uvicorn>=0.35; extra == 'server'
70
+ Requires-Dist: watchfiles>=1.0.0; extra == 'server'
71
+ Requires-Dist: websockets>=15.0.1; extra == 'server'
72
+ Provides-Extra: tasks
73
+ Requires-Dist: pydocket>=0.20.0; extra == 'tasks'
74
+ Description-Content-Type: text/markdown
75
+
76
+ <div align="center">
77
+
78
+ <!-- omit in toc -->
79
+
80
+ <picture>
81
+ <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">
82
+ <source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png">
83
+ <img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png">
84
+ </picture>
85
+
86
+ # FastMCP 🚀
87
+
88
+ <strong>Move fast and make things.</strong>
89
+
90
+ *Made with 💙 by [Prefect](https://www.prefect.io/)*
91
+
92
+ [![Docs](https://img.shields.io/badge/docs-gofastmcp.com-blue)](https://gofastmcp.com)
93
+ [![Discord](https://img.shields.io/badge/community-discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/uu8dJCgttd)
94
+ [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
95
+ [![Tests](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml/badge.svg)](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml)
96
+ [![License](https://img.shields.io/github/license/PrefectHQ/fastmcp.svg)](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE)
97
+
98
+ <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>
99
+ </div>
100
+
101
+ ---
102
+
103
+ 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:
104
+
105
+ ```python
106
+ from fastmcp import FastMCP
107
+
108
+ mcp = FastMCP("Demo 🚀")
109
+
110
+ @mcp.tool
111
+ def add(a: int, b: int) -> int:
112
+ """Add two numbers"""
113
+ return a + b
114
+
115
+ if __name__ == "__main__":
116
+ mcp.run()
117
+ ```
118
+
119
+ ## Why FastMCP
120
+
121
+ 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.**
122
+
123
+ **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.
124
+
125
+ FastMCP has three pillars:
126
+
127
+ <table>
128
+ <tr>
129
+ <td align="center" valign="top" width="33%">
130
+ <a href="https://gofastmcp.com/servers/server">
131
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" />
132
+ <br /><strong>Servers</strong>
133
+ </a>
134
+ <br />Expose tools, resources, and prompts to LLMs.
135
+ </td>
136
+ <td align="center" valign="top" width="33%">
137
+ <a href="https://gofastmcp.com/apps/overview">
138
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" />
139
+ <br /><strong>Apps</strong>
140
+ </a>
141
+ <br />Give your tools interactive UIs rendered directly in the conversation.
142
+ </td>
143
+ <td align="center" valign="top" width="33%">
144
+ <a href="https://gofastmcp.com/clients/client">
145
+ <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" />
146
+ <br /><strong>Clients</strong>
147
+ </a>
148
+ <br />Connect to any MCP server — local or remote, programmatic or CLI.
149
+ </td>
150
+ </tr>
151
+ </table>
152
+
153
+ **[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.
154
+
155
+ 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).
156
+
157
+ ## Run FastMCP in production with Horizon
158
+
159
+ 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.
160
+
161
+ Built by the FastMCP team, Horizon packages the best practices we've learned shipping the world's most popular MCP framework.
162
+
163
+ 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.
164
+
165
+ 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)
166
+
167
+ ## Installation
168
+
169
+ We recommend installing FastMCP with [uv](https://docs.astral.sh/uv/):
170
+
171
+ ```bash
172
+ uv pip install fastmcp
173
+ ```
174
+
175
+ For full installation instructions, including verification and upgrading, see the [**Installation Guide**](https://gofastmcp.com/getting-started/installation).
176
+
177
+ **Upgrading?** We have guides for:
178
+ - [Upgrading from FastMCP v2](https://gofastmcp.com/getting-started/upgrading/from-fastmcp-2)
179
+ - [Upgrading from the MCP Python SDK](https://gofastmcp.com/getting-started/upgrading/from-mcp-sdk)
180
+ - [Upgrading from the low-level SDK](https://gofastmcp.com/getting-started/upgrading/from-low-level-sdk)
181
+
182
+ ## 📚 Documentation
183
+
184
+ FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns.
185
+
186
+ Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily:
187
+
188
+ - [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
189
+ - [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
190
+
191
+ **Community:** Join our [Discord server](https://discord.gg/uu8dJCgttd) to connect with other FastMCP developers and share what you're building.
192
+
193
+ ## Contributing
194
+
195
+ 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,100 @@
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 import _install_hints
9
+ from fastmcp.settings import Settings
10
+ from fastmcp.utilities.logging import configure_logging as _configure_logging
11
+
12
+ if TYPE_CHECKING:
13
+ from fastmcp.client import Client as Client
14
+ from fastmcp.apps.app import FastMCPApp as FastMCPApp
15
+ from fastmcp.exceptions import (
16
+ FastMCPDeprecationWarning as FastMCPDeprecationWarning,
17
+ )
18
+ from fastmcp.server.context import Context as Context
19
+ from fastmcp.server.server import FastMCP as FastMCP
20
+
21
+ settings = Settings()
22
+ if settings.log_enabled:
23
+ _configure_logging(
24
+ level=settings.log_level,
25
+ enable_rich_tracebacks=settings.enable_rich_tracebacks,
26
+ )
27
+
28
+ try:
29
+ __version__ = _version("fastmcp-slim")
30
+ except PackageNotFoundError:
31
+ __version__ = _version("fastmcp")
32
+
33
+ if settings.deprecation_warnings:
34
+ try:
35
+ from fastmcp.exceptions import FastMCPDeprecationWarning
36
+ except ImportError:
37
+ pass
38
+ else:
39
+ warnings.simplefilter("default", FastMCPDeprecationWarning)
40
+
41
+
42
+ # --- Lazy imports for performance (see #3292) ---
43
+ # Client and the client submodule are deferred so that server-only users
44
+ # don't pay for the client import chain. Do not convert back to top-level.
45
+
46
+
47
+ def __getattr__(name: str) -> object:
48
+ if name == "Client":
49
+ try:
50
+ from fastmcp.client import Client
51
+ except ImportError as exc:
52
+ raise ImportError(_install_hints.CLIENT_SUPPORT) from exc
53
+
54
+ return Client
55
+ if name == "Context":
56
+ try:
57
+ from fastmcp.server.context import Context
58
+ except ImportError as exc:
59
+ raise ImportError(_install_hints.SERVER_SUPPORT) from exc
60
+
61
+ return Context
62
+ if name == "FastMCP":
63
+ try:
64
+ from fastmcp.server.server import FastMCP
65
+ except ImportError as exc:
66
+ raise ImportError(_install_hints.SERVER_SUPPORT) from exc
67
+
68
+ return FastMCP
69
+ if name == "FastMCPApp":
70
+ try:
71
+ from fastmcp.apps.app import FastMCPApp
72
+ except ImportError as exc:
73
+ raise ImportError(_install_hints.APP_SUPPORT) from exc
74
+
75
+ return FastMCPApp
76
+ if name == "FastMCPDeprecationWarning":
77
+ from fastmcp.exceptions import FastMCPDeprecationWarning
78
+
79
+ return FastMCPDeprecationWarning
80
+ if name == "client":
81
+ try:
82
+ return importlib.import_module("fastmcp.client")
83
+ except ImportError as exc:
84
+ raise ImportError(_install_hints.CLIENT_SUPPORT) from exc
85
+ if name == "server":
86
+ try:
87
+ return importlib.import_module("fastmcp.server")
88
+ except ImportError as exc:
89
+ raise ImportError(_install_hints.SERVER_SUPPORT) from exc
90
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
91
+
92
+
93
+ __all__ = [
94
+ "Client",
95
+ "Context",
96
+ "FastMCP",
97
+ "FastMCPApp",
98
+ "FastMCPDeprecationWarning",
99
+ "settings",
100
+ ]
@@ -0,0 +1,25 @@
1
+ CLIENT_SUPPORT = (
2
+ "FastMCP client support is not installed. Install `fastmcp` or "
3
+ "`fastmcp-slim[client]`."
4
+ )
5
+
6
+ SERVER_SUPPORT = (
7
+ "FastMCP server support is not installed. Install `fastmcp` or "
8
+ "`fastmcp-slim[server]`."
9
+ )
10
+
11
+ APP_SUPPORT = (
12
+ "FastMCP app support is not installed. Install `fastmcp[apps]` or "
13
+ "`fastmcp-slim[server,apps]`."
14
+ )
15
+
16
+ CLI_SUPPORT = (
17
+ "FastMCP CLI support is not installed. Install `fastmcp` or `fastmcp-slim[server]`."
18
+ )
19
+
20
+
21
+ def full_package(feature: str) -> str:
22
+ return (
23
+ f"{feature} require the full `fastmcp` package. "
24
+ "Install it with `pip install fastmcp`."
25
+ )
@@ -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