fastmcp 2.6.0__py3-none-any.whl → 2.6.1__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/client/auth/oauth.py +0 -3
- fastmcp/py.typed +0 -0
- fastmcp/server/auth/providers/in_memory.py +1 -6
- fastmcp/server/server.py +0 -10
- {fastmcp-2.6.0.dist-info → fastmcp-2.6.1.dist-info}/METADATA +20 -9
- {fastmcp-2.6.0.dist-info → fastmcp-2.6.1.dist-info}/RECORD +9 -8
- {fastmcp-2.6.0.dist-info → fastmcp-2.6.1.dist-info}/WHEEL +0 -0
- {fastmcp-2.6.0.dist-info → fastmcp-2.6.1.dist-info}/entry_points.txt +0 -0
- {fastmcp-2.6.0.dist-info → fastmcp-2.6.1.dist-info}/licenses/LICENSE +0 -0
fastmcp/client/auth/oauth.py
CHANGED
|
@@ -68,9 +68,6 @@ class ServerOAuthMetadata(_MCPServerOAuthMetadata):
|
|
|
68
68
|
class OAuthClientProvider(_MCPOAuthClientProvider):
|
|
69
69
|
"""
|
|
70
70
|
OAuth client provider with more flexible OAuth metadata discovery.
|
|
71
|
-
|
|
72
|
-
This subclass handles real-world OAuth servers that may not conform
|
|
73
|
-
strictly to the MCP OAuth specification but are still valid OAuth 2.0 servers.
|
|
74
71
|
"""
|
|
75
72
|
|
|
76
73
|
async def _discover_oauth_metadata(
|
fastmcp/py.typed
ADDED
|
File without changes
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This is a simple in-memory OAuth provider for testing purposes.
|
|
3
|
-
It simulates the OAuth 2.0 flow locally without external calls.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
1
|
import secrets
|
|
7
2
|
import time
|
|
8
3
|
|
|
@@ -36,7 +31,7 @@ DEFAULT_REFRESH_TOKEN_EXPIRY_SECONDS = None # No expiry
|
|
|
36
31
|
class InMemoryOAuthProvider(OAuthProvider):
|
|
37
32
|
"""
|
|
38
33
|
An in-memory OAuth provider for testing purposes.
|
|
39
|
-
It simulates the OAuth 2.
|
|
34
|
+
It simulates the OAuth 2.1 flow locally without external calls.
|
|
40
35
|
"""
|
|
41
36
|
|
|
42
37
|
def __init__(
|
fastmcp/server/server.py
CHANGED
|
@@ -131,16 +131,6 @@ class FastMCP(Generic[LifespanResultT]):
|
|
|
131
131
|
tools: list[Tool | Callable[..., Any]] | None = None,
|
|
132
132
|
**settings: Any,
|
|
133
133
|
):
|
|
134
|
-
if settings:
|
|
135
|
-
# TODO: remove settings. Deprecated since 2.3.4
|
|
136
|
-
warnings.warn(
|
|
137
|
-
"Passing runtime and transport-specific settings as kwargs "
|
|
138
|
-
"to the FastMCP constructor is deprecated (as of 2.3.4), "
|
|
139
|
-
"including most transport settings. If possible, provide settings when calling "
|
|
140
|
-
"run() instead.",
|
|
141
|
-
DeprecationWarning,
|
|
142
|
-
stacklevel=2,
|
|
143
|
-
)
|
|
144
134
|
self.settings = fastmcp.settings.ServerSettings(**settings)
|
|
145
135
|
|
|
146
136
|
# If mask_error_details is provided, override the settings value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastmcp
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.1
|
|
4
4
|
Summary: The fast, Pythonic way to build MCP servers.
|
|
5
5
|
Project-URL: Homepage, https://gofastmcp.com
|
|
6
6
|
Project-URL: Repository, https://github.com/jlowin/fastmcp
|
|
@@ -104,6 +104,7 @@ There are two ways to access the LLM-friendly documentation:
|
|
|
104
104
|
- [Proxy Servers](#proxy-servers)
|
|
105
105
|
- [Composing MCP Servers](#composing-mcp-servers)
|
|
106
106
|
- [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
|
|
107
|
+
- [Authentication \& Security](#authentication--security)
|
|
107
108
|
- [Running Your Server](#running-your-server)
|
|
108
109
|
- [Contributing](#contributing)
|
|
109
110
|
- [Prerequisites](#prerequisites)
|
|
@@ -116,20 +117,20 @@ There are two ways to access the LLM-friendly documentation:
|
|
|
116
117
|
|
|
117
118
|
## What is MCP?
|
|
118
119
|
|
|
119
|
-
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way.
|
|
120
|
+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It is often described as "the USB-C port for AI", providing a uniform way to connect LLMs to resources they can use. It may be easier to think of it as an API, but specifically designed for LLM interactions. MCP servers can:
|
|
120
121
|
|
|
121
|
-
- Expose data through **Resources** (
|
|
122
|
-
- Provide functionality through **Tools** (
|
|
123
|
-
- Define interaction patterns through **Prompts** (reusable templates)
|
|
122
|
+
- Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
|
|
123
|
+
- Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
|
|
124
|
+
- Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
|
|
124
125
|
- And more!
|
|
125
126
|
|
|
126
|
-
FastMCP provides a high-level, Pythonic interface for building and interacting with these servers.
|
|
127
|
+
FastMCP provides a high-level, Pythonic interface for building, managing, and interacting with these servers.
|
|
127
128
|
|
|
128
129
|
## Why FastMCP?
|
|
129
130
|
|
|
130
131
|
The MCP protocol is powerful but implementing it involves a lot of boilerplate - server setup, protocol handlers, content types, error management. FastMCP handles all the complex protocol details and server management, so you can focus on building great tools. It's designed to be high-level and Pythonic; in most cases, decorating a function is all you need.
|
|
131
132
|
|
|
132
|
-
|
|
133
|
+
FastMCP 2.0 has evolved into a comprehensive platform that goes far beyond basic protocol implementation. While 1.0 provided server-building capabilities (and is now part of the official MCP SDK), 2.0 offers a complete ecosystem including client libraries, authentication systems, deployment tools, integrations with major AI platforms, testing frameworks, and production-ready infrastructure patterns.
|
|
133
134
|
|
|
134
135
|
FastMCP aims to be:
|
|
135
136
|
|
|
@@ -139,7 +140,7 @@ FastMCP aims to be:
|
|
|
139
140
|
|
|
140
141
|
🐍 **Pythonic:** Feels natural to Python developers
|
|
141
142
|
|
|
142
|
-
🔍 **Complete:**
|
|
143
|
+
🔍 **Complete:** A comprehensive platform for all MCP use cases, from dev to prod
|
|
143
144
|
|
|
144
145
|
## Installation
|
|
145
146
|
|
|
@@ -157,7 +158,7 @@ These are the building blocks for creating MCP servers and clients with FastMCP.
|
|
|
157
158
|
|
|
158
159
|
### The `FastMCP` Server
|
|
159
160
|
|
|
160
|
-
The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like
|
|
161
|
+
The central object representing your MCP application. It holds your tools, resources, and prompts, manages connections, and can be configured with settings like authentication.
|
|
161
162
|
|
|
162
163
|
```python
|
|
163
164
|
from fastmcp import FastMCP
|
|
@@ -330,6 +331,16 @@ Automatically generate FastMCP servers from existing OpenAPI specifications (`Fa
|
|
|
330
331
|
|
|
331
332
|
Learn more: [**OpenAPI Integration**](https://gofastmcp.com/patterns/openapi) | [**FastAPI Integration**](https://gofastmcp.com/patterns/fastapi).
|
|
332
333
|
|
|
334
|
+
### Authentication & Security
|
|
335
|
+
|
|
336
|
+
FastMCP provides built-in authentication support to secure both your MCP servers and clients in production environments. Protect your server endpoints from unauthorized access and authenticate your clients against secured MCP servers using industry-standard protocols.
|
|
337
|
+
|
|
338
|
+
- **Server Protection**: Secure your FastMCP server endpoints with configurable authentication providers
|
|
339
|
+
- **Client Authentication**: Connect to authenticated MCP servers with automatic credential management
|
|
340
|
+
- **Production Ready**: Support for common authentication patterns used in enterprise environments
|
|
341
|
+
|
|
342
|
+
Learn more in the **Authentication Documentation** for [servers](https://gofastmcp.com/servers/auth) and [clients](https://gofastmcp.com/clients/auth).
|
|
343
|
+
|
|
333
344
|
## Running Your Server
|
|
334
345
|
|
|
335
346
|
The main way to run a FastMCP server is by calling the `run()` method on your server instance:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
fastmcp/__init__.py,sha256=yTAqLZORsPqbr7AE0ayw6zIYBeMlxQlI-3HE2WqbvHk,435
|
|
2
2
|
fastmcp/exceptions.py,sha256=YvaKqOT3w0boXF9ylIoaSIzW9XiQ1qLFG1LZq6B60H8,680
|
|
3
|
+
fastmcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
4
|
fastmcp/settings.py,sha256=DbFdWx4EVHhJZF6e2GB0pBMCSjc425kXIVY8mqfOVX8,6175
|
|
4
5
|
fastmcp/cli/__init__.py,sha256=Ii284TNoG5lxTP40ETMGhHEq3lQZWxu9m9JuU57kUpQ,87
|
|
5
6
|
fastmcp/cli/claude.py,sha256=IAlcZ4qZKBBj09jZUMEx7EANZE_IR3vcu7zOBJmMOuU,4567
|
|
@@ -15,7 +16,7 @@ fastmcp/client/sampling.py,sha256=UlDHxnd6k_HoU8RA3ob0g8-e6haJBc9u27N_v291QoI,16
|
|
|
15
16
|
fastmcp/client/transports.py,sha256=XBbw5nDzDQffeWmfDgWgXZUOX0hJqk3fdusnqqUge9c,31822
|
|
16
17
|
fastmcp/client/auth/__init__.py,sha256=4DNsfp4iaQeBcpds0JDdMn6Mmfud44stWLsret0sVKY,91
|
|
17
18
|
fastmcp/client/auth/bearer.py,sha256=MFEFqcH6u_V86msYiOsEFKN5ks1V9BnBNiPsPLHUTqo,399
|
|
18
|
-
fastmcp/client/auth/oauth.py,sha256=
|
|
19
|
+
fastmcp/client/auth/oauth.py,sha256=LJHCB-34EC-sL9GC97XFQkyanK8Cc5skAp6GkH0tKzE,14709
|
|
19
20
|
fastmcp/contrib/README.md,sha256=rKknYSI1T192UvSszqwwDlQ2eYQpxywrNTLoj177SYU,878
|
|
20
21
|
fastmcp/contrib/bulk_tool_caller/README.md,sha256=5aUUY1TSFKtz1pvTLSDqkUCkGkuqMfMZNsLeaNqEgAc,1960
|
|
21
22
|
fastmcp/contrib/bulk_tool_caller/__init__.py,sha256=xvGSSaUXTQrc31erBoi1Gh7BikgOliETDiYVTP3rLxY,75
|
|
@@ -39,13 +40,13 @@ fastmcp/server/dependencies.py,sha256=DfN40fz4UkmdzvVg3QesuHKUVJ07iQU5ookkWawAoH
|
|
|
39
40
|
fastmcp/server/http.py,sha256=RbUnqqKsiThOGZwJH-BIzC5_V1EXQh9tBlN4S-JJhbY,11624
|
|
40
41
|
fastmcp/server/openapi.py,sha256=yYO-_9QQhi6IUGW-TsSHkhZFLll4wt5ysbtl0VHaHZM,39239
|
|
41
42
|
fastmcp/server/proxy.py,sha256=mt3eM6TQWfnZD5XehmTXisskZ4CBbsWyjRPjprlTjBY,9653
|
|
42
|
-
fastmcp/server/server.py,sha256=
|
|
43
|
+
fastmcp/server/server.py,sha256=f_31CGp6MOLDzApe9epOlQryPZnc2rmFzIGprICJAYU,57739
|
|
43
44
|
fastmcp/server/auth/__init__.py,sha256=doHCLwOIElvH1NrTdpeP9JKfnNf3MDYPSpQfdsQ-uI0,84
|
|
44
45
|
fastmcp/server/auth/auth.py,sha256=kz02HGwXYU0N0clURZDjFNWdKSpTYmgmCnGJN-jSG3Y,1640
|
|
45
46
|
fastmcp/server/auth/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
47
|
fastmcp/server/auth/providers/bearer.py,sha256=3pTKL3tEU7FlCD5yI81LTa2n0dBsM7GRpIIn30WCWsA,12679
|
|
47
48
|
fastmcp/server/auth/providers/bearer_env.py,sha256=MXsr4rjRm8DDmbdNd7IEXT6naCq48fkC1LlpoFAjt7c,1971
|
|
48
|
-
fastmcp/server/auth/providers/in_memory.py,sha256=
|
|
49
|
+
fastmcp/server/auth/providers/in_memory.py,sha256=sCRJambxXFZLg_EbJ5ma-aUZvtxuuKbGy7lTxIbzVb0,13772
|
|
49
50
|
fastmcp/tools/__init__.py,sha256=ocw-SFTtN6vQ8fgnlF8iNAOflRmh79xS1xdO0Bc3QPE,96
|
|
50
51
|
fastmcp/tools/tool.py,sha256=Lj0PZYNKbqZRBouqn17ayz2gDgU2-bEfHOC75r4GOB8,8687
|
|
51
52
|
fastmcp/tools/tool_manager.py,sha256=HVT1-8Sdir5yY45oOUedMWnD8HJUkVkLUy0U-eAayoQ,4516
|
|
@@ -60,8 +61,8 @@ fastmcp/utilities/mcp_config.py,sha256=_wY3peaFDEgyOBkJ_Tb8sETk3mtdwtw1053q7ry0z
|
|
|
60
61
|
fastmcp/utilities/openapi.py,sha256=QQos4vP59HQ8vPDTKftWOIVv_zmW30mNxYSXVU7JUbY,38441
|
|
61
62
|
fastmcp/utilities/tests.py,sha256=4Vuua6nVgbE5uQspEK0fk4tBuJ0rO4GTBmnyD0kXJPA,3930
|
|
62
63
|
fastmcp/utilities/types.py,sha256=6CcqAQ1QqCO2HGSFlPS6FO5JRWnacjCcO2-EhyEnZV0,4400
|
|
63
|
-
fastmcp-2.6.
|
|
64
|
-
fastmcp-2.6.
|
|
65
|
-
fastmcp-2.6.
|
|
66
|
-
fastmcp-2.6.
|
|
67
|
-
fastmcp-2.6.
|
|
64
|
+
fastmcp-2.6.1.dist-info/METADATA,sha256=kTe3mh_2fOQJZRICJy6pAZS0gQmEKxrLZ2LXn57Vtoo,17609
|
|
65
|
+
fastmcp-2.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
66
|
+
fastmcp-2.6.1.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
|
|
67
|
+
fastmcp-2.6.1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
68
|
+
fastmcp-2.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|