fastmcp 2.11.3__py3-none-any.whl → 2.12.0rc1__py3-none-any.whl
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.
- fastmcp/__init__.py +5 -4
- fastmcp/cli/claude.py +22 -18
- fastmcp/cli/cli.py +472 -136
- fastmcp/cli/install/claude_code.py +37 -40
- fastmcp/cli/install/claude_desktop.py +37 -42
- fastmcp/cli/install/cursor.py +148 -38
- fastmcp/cli/install/mcp_json.py +38 -43
- fastmcp/cli/install/shared.py +64 -7
- fastmcp/cli/run.py +122 -215
- fastmcp/client/auth/oauth.py +69 -13
- fastmcp/client/client.py +46 -9
- fastmcp/client/oauth_callback.py +91 -91
- fastmcp/client/sampling.py +12 -4
- fastmcp/client/transports.py +139 -64
- fastmcp/experimental/sampling/__init__.py +0 -0
- fastmcp/experimental/sampling/handlers/__init__.py +3 -0
- fastmcp/experimental/sampling/handlers/base.py +21 -0
- fastmcp/experimental/sampling/handlers/openai.py +163 -0
- fastmcp/experimental/server/openapi/routing.py +0 -2
- fastmcp/experimental/server/openapi/server.py +0 -2
- fastmcp/experimental/utilities/openapi/parser.py +5 -1
- fastmcp/mcp_config.py +40 -20
- fastmcp/prompts/prompt_manager.py +2 -0
- fastmcp/resources/resource_manager.py +4 -0
- fastmcp/server/auth/__init__.py +2 -0
- fastmcp/server/auth/auth.py +2 -1
- fastmcp/server/auth/oauth_proxy.py +1047 -0
- fastmcp/server/auth/providers/azure.py +270 -0
- fastmcp/server/auth/providers/github.py +287 -0
- fastmcp/server/auth/providers/google.py +305 -0
- fastmcp/server/auth/providers/jwt.py +24 -12
- fastmcp/server/auth/providers/workos.py +256 -2
- fastmcp/server/auth/redirect_validation.py +65 -0
- fastmcp/server/context.py +91 -41
- fastmcp/server/elicitation.py +60 -1
- fastmcp/server/http.py +3 -3
- fastmcp/server/middleware/logging.py +66 -28
- fastmcp/server/proxy.py +2 -0
- fastmcp/server/sampling/handler.py +19 -0
- fastmcp/server/server.py +76 -15
- fastmcp/settings.py +16 -1
- fastmcp/tools/tool.py +22 -9
- fastmcp/tools/tool_manager.py +2 -0
- fastmcp/tools/tool_transform.py +39 -10
- fastmcp/utilities/auth.py +34 -0
- fastmcp/utilities/cli.py +148 -15
- fastmcp/utilities/components.py +2 -1
- fastmcp/utilities/inspect.py +166 -37
- fastmcp/utilities/json_schema_type.py +4 -2
- fastmcp/utilities/logging.py +4 -1
- fastmcp/utilities/mcp_config.py +47 -18
- fastmcp/utilities/mcp_server_config/__init__.py +25 -0
- fastmcp/utilities/mcp_server_config/v1/__init__.py +0 -0
- fastmcp/utilities/mcp_server_config/v1/environments/__init__.py +6 -0
- fastmcp/utilities/mcp_server_config/v1/environments/base.py +30 -0
- fastmcp/utilities/mcp_server_config/v1/environments/uv.py +306 -0
- fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py +446 -0
- fastmcp/utilities/mcp_server_config/v1/schema.json +361 -0
- fastmcp/utilities/mcp_server_config/v1/sources/__init__.py +0 -0
- fastmcp/utilities/mcp_server_config/v1/sources/base.py +30 -0
- fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py +216 -0
- fastmcp/utilities/tests.py +7 -2
- fastmcp/utilities/types.py +15 -2
- {fastmcp-2.11.3.dist-info → fastmcp-2.12.0rc1.dist-info}/METADATA +2 -1
- fastmcp-2.12.0rc1.dist-info/RECORD +129 -0
- fastmcp-2.11.3.dist-info/RECORD +0 -108
- {fastmcp-2.11.3.dist-info → fastmcp-2.12.0rc1.dist-info}/WHEEL +0 -0
- {fastmcp-2.11.3.dist-info → fastmcp-2.12.0rc1.dist-info}/entry_points.txt +0 -0
- {fastmcp-2.11.3.dist-info → fastmcp-2.12.0rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -80,6 +80,8 @@ class PromptManager:
|
|
|
80
80
|
logger.warning(
|
|
81
81
|
f"Failed to get prompts from server: {mounted.server.name!r}, mounted at: {mounted.prefix!r}: {e}"
|
|
82
82
|
)
|
|
83
|
+
if settings.mounted_components_raise_on_load_error:
|
|
84
|
+
raise
|
|
83
85
|
continue
|
|
84
86
|
|
|
85
87
|
# Finally, add local prompts, which always take precedence
|
|
@@ -114,6 +114,8 @@ class ResourceManager:
|
|
|
114
114
|
logger.warning(
|
|
115
115
|
f"Failed to get resources from server: {mounted.server.name!r}, mounted at: {mounted.prefix!r}: {e}"
|
|
116
116
|
)
|
|
117
|
+
if settings.mounted_components_raise_on_load_error:
|
|
118
|
+
raise
|
|
117
119
|
continue
|
|
118
120
|
|
|
119
121
|
# Finally, add local resources, which always take precedence
|
|
@@ -165,6 +167,8 @@ class ResourceManager:
|
|
|
165
167
|
logger.warning(
|
|
166
168
|
f"Failed to get templates from server: {mounted.server.name!r}, mounted at: {mounted.prefix!r}: {e}"
|
|
167
169
|
)
|
|
170
|
+
if settings.mounted_components_raise_on_load_error:
|
|
171
|
+
raise
|
|
168
172
|
continue
|
|
169
173
|
|
|
170
174
|
# Finally, add local templates, which always take precedence
|
fastmcp/server/auth/__init__.py
CHANGED
|
@@ -6,6 +6,7 @@ from .auth import (
|
|
|
6
6
|
AuthProvider,
|
|
7
7
|
)
|
|
8
8
|
from .providers.jwt import JWTVerifier, StaticTokenVerifier
|
|
9
|
+
from .oauth_proxy import OAuthProxy
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
__all__ = [
|
|
@@ -16,6 +17,7 @@ __all__ = [
|
|
|
16
17
|
"StaticTokenVerifier",
|
|
17
18
|
"RemoteAuthProvider",
|
|
18
19
|
"AccessToken",
|
|
20
|
+
"OAuthProxy",
|
|
19
21
|
]
|
|
20
22
|
|
|
21
23
|
|
fastmcp/server/auth/auth.py
CHANGED
|
@@ -135,6 +135,8 @@ class RemoteAuthProvider(AuthProvider):
|
|
|
135
135
|
the authorization servers that issue valid tokens.
|
|
136
136
|
"""
|
|
137
137
|
|
|
138
|
+
resource_server_url: AnyHttpUrl
|
|
139
|
+
|
|
138
140
|
def __init__(
|
|
139
141
|
self,
|
|
140
142
|
token_verifier: TokenVerifier,
|
|
@@ -169,7 +171,6 @@ class RemoteAuthProvider(AuthProvider):
|
|
|
169
171
|
Subclasses can override this method to add additional routes by calling
|
|
170
172
|
super().get_routes() and extending the returned list.
|
|
171
173
|
"""
|
|
172
|
-
assert self.resource_server_url is not None
|
|
173
174
|
|
|
174
175
|
return create_protected_resource_routes(
|
|
175
176
|
resource_url=self.resource_server_url,
|