Skip to content

Commit 47b2c58

Browse files
authored
Merge branch 'main' into transform-tools-2
2 parents 9b201cf + 1224d3a commit 47b2c58

25 files changed

+302
-83
lines changed

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "uv"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels:
8+
- "dependencies"
9+
- package-ecosystem: "pip"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
labels:
14+
- "dependencies"
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"
19+
labels:
20+
- "dependencies"

.github/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ changelog:
2727
labels:
2828
- documentation
2929

30+
- title: Dependencies 📦
31+
labels:
32+
- dependencies
33+
3034
- title: Other Changes 🦾
3135
labels:
3236
- "*"

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fetch-depth: 0
1818

1919
- name: "Install uv"
20-
uses: astral-sh/setup-uv@v3
20+
uses: astral-sh/setup-uv@v6
2121

2222
- name: Build
2323
run: uv build

.github/workflows/run-static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@v4
3434
- name: Install uv
35-
uses: astral-sh/setup-uv@v5
35+
uses: astral-sh/setup-uv@v6
3636
with:
3737
enable-cache: true
3838
cache-dependency-glob: "uv.lock"

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@v4
3838

3939
- name: Install uv
40-
uses: astral-sh/setup-uv@v5
40+
uses: astral-sh/setup-uv@v6
4141
with:
4242
enable-cache: true
4343
cache-dependency-glob: "uv.lock"

docs/assets/updates/release-2-7.png

412 KB
Loading

docs/integrations/anthropic.mdx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
---
2-
title: Anthropic
3-
sidebarTitle: Anthropic
2+
title: Anthropic API + FastMCP
3+
sidebarTitle: Anthropic API
44
description: Call FastMCP servers from the Anthropic API
55
icon: message-smile
66
tag: "New!"
77
---
88

99
import { VersionBadge } from "/snippets/version-badge.mdx"
1010

11-
Anthropic supports MCP servers through the [MCP connector](https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector) feature in the Messages API, allowing you to extend AI capabilities with custom tools from remote MCP servers.
12-
13-
## Messages API
1411

1512
Anthropic's [Messages API](https://docs.anthropic.com/en/api/messages) supports MCP servers as remote tool sources. This tutorial will show you how to create a FastMCP server and deploy it to a public URL, then how to call it from the Messages API.
1613

1714
<Tip>
1815
Currently, the MCP connector only accesses **tools** from MCP servers—it queries the `list_tools` endpoint and exposes those functions to Claude. Other MCP features like resources and prompts are not currently supported. You can read more about the MCP connector in the [Anthropic documentation](https://docs.anthropic.com/en/docs/agents-and-tools/mcp-connector).
1916
</Tip>
2017

21-
### Create a Server
18+
## Create a Server
2219

2320
First, create a FastMCP server with the tools you want to expose. For this example, we'll create a server with a single tool that rolls dice.
2421

@@ -37,7 +34,7 @@ if __name__ == "__main__":
3734
mcp.run(transport="sse", port=8000)
3835
```
3936

40-
### Deploy the Server
37+
## Deploy the Server
4138

4239
Your server must be deployed to a public URL in order for Anthropic to access it. The MCP connector supports both SSE and Streamable HTTP transports.
4340

@@ -59,7 +56,7 @@ ngrok http 8000
5956
This exposes your unauthenticated server to the internet. Only run this command in a safe environment if you understand the risks.
6057
</Warning>
6158

62-
### Call the Server
59+
## Call the Server
6360

6461
To use the Messages API with MCP servers, you'll need to install the Anthropic Python SDK (not included with FastMCP):
6562

@@ -114,13 +111,13 @@ The results were 4, 2, and 6. Would you like me to roll again or roll a differen
114111
```
115112

116113

117-
### Authentication
114+
## Authentication
118115

119116
<VersionBadge version="2.6.0" />
120117

121118
The MCP connector supports OAuth authentication through authorization tokens, which means you can secure your server while still allowing Anthropic to access it.
122119

123-
#### Server Authentication
120+
### Server Authentication
124121

125122
The simplest way to add authentication to the server is to use a bearer token scheme.
126123

@@ -181,7 +178,7 @@ if __name__ == "__main__":
181178
mcp.run(transport="sse", port=8000)
182179
```
183180

184-
#### Client Authentication
181+
### Client Authentication
185182

186183
If you try to call the authenticated server with the same Anthropic code we wrote earlier, you'll get an error indicating that the server rejected the request because it's not authenticated.
187184

docs/integrations/claude-desktop.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Claude Desktop
2+
title: Claude Desktop + FastMCP
33
sidebarTitle: Claude Desktop
44
description: Call FastMCP servers from Claude Desktop
55
icon: desktop

docs/integrations/contrib.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FastMCP includes a `contrib` package that holds community-contributed modules. T
1212

1313
Contrib modules provide additional features, integrations, or patterns that complement the core FastMCP library. They offer a way for the community to share useful extensions while keeping the core library focused and maintainable.
1414

15-
The available modules can be viewed in the [contrib directory](https://github.com/jlowin/fastmcp/tree/main/src/contrib).
15+
The available modules can be viewed in the [contrib directory](https://github.com/jlowin/fastmcp/tree/main/src/fastmcp/contrib).
1616

1717
## Usage
1818

docs/integrations/gemini.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Gemini SDK
2+
title: Gemini SDK + FastMCP
33
sidebarTitle: Gemini SDK
44
description: Call FastMCP servers from the Google Gemini SDK
55
icon: message-smile

docs/integrations/openai.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
---
2-
title: OpenAI
3-
sidebarTitle: OpenAI
2+
title: OpenAI API + FastMCP
3+
sidebarTitle: OpenAI API
44
description: Call FastMCP servers from the OpenAI API
55
icon: message-smile
66
tag: "New!"
77
---
88

99
import { VersionBadge } from "/snippets/version-badge.mdx"
1010

11-
OpenAI recently announced support for MCP servers in the Responses API. Note that at this time, MCP is not supported in ChatGPT.
1211

1312
## Responses API
1413

1514
OpenAI's [Responses API](https://platform.openai.com/docs/api-reference/responses) supports [MCP servers](https://platform.openai.com/docs/guides/tools-remote-mcp) as remote tool sources, allowing you to extend AI capabilities with custom functions.
1615

1716
<Note>
18-
The Responses API is a distinct API from OpenAI's Completions API, Assistants API, or ChatGPT. At this time, only the Responses API supports MCP.
17+
The Responses API is a distinct API from OpenAI's Completions API or Assistants API. At this time, only the Responses API supports MCP.
1918
</Note>
2019

2120
<Tip>

docs/updates.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,36 @@ title: "FastMCP Updates"
33
sidebarTitle: "Updates"
44
icon: "sparkles"
55
tag: "New!"
6+
mode: "wide"
67
---
7-
<Update label="FastMCP 2.6" description="June 6, 2025">
8+
<Update label="FastMCP 2.7" description="June 6, 2025">
9+
<Card
10+
title="FastMCP 2.7: Pare Programming" href="https://github.com/jlowin/fastmcp/releases/tag/v2.7.0"
11+
img="assets/updates/release-2-7.png"
12+
cta="Read the release notes"
13+
arrow="false"
14+
>
15+
FastMCP 2.7 has been released!
816

17+
Most notably, it introduces the highly requested (and Pythonic) "naked" decorator usage:
918

19+
```python {3}
20+
mcp = FastMCP()
1021

22+
@mcp.tool
23+
def add(a: int, b: int) -> int:
24+
return a + b
25+
```
26+
27+
In addition, decorators now return the objects they create, instead of the decorated function. This is an important usability enhancement.
28+
29+
The bulk of the update is focused on improving the FastMCP internals, including a few breaking internal changes to private APIs. A number of functions that have clung on since 1.0 are now deprecated.
30+
</Card>
31+
</Update>
32+
33+
34+
35+
<Update label="FastMCP 2.6" description="June 6, 2025">
1136
<Card
1237
title="Blast Auth with FastMCP 2.6" href="https://www.jlowin.dev/blog/fastmcp-2-6"
1338
img="https://www.jlowin.dev/_image?href=%2F_astro%2Fhero.Bsu8afiw.png&w=1000&h=500&f=webp"

src/fastmcp/cli/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""FastmMCP CLI tools."""
1+
"""FastMCP CLI tools."""
22

33
import importlib.metadata
44
import importlib.util

src/fastmcp/client/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def __init__(
145145
progress_handler: ProgressHandler | None = None,
146146
timeout: datetime.timedelta | float | int | None = None,
147147
init_timeout: datetime.timedelta | float | int | None = None,
148+
client_info: mcp.types.Implementation | None = None,
148149
auth: httpx.Auth | Literal["oauth"] | str | None = None,
149150
):
150151
self.transport = cast(ClientTransportT, infer_transport(transport))
@@ -180,6 +181,7 @@ def __init__(
180181
"logging_callback": create_log_callback(log_handler),
181182
"message_handler": message_handler,
182183
"read_timeout_seconds": timeout,
184+
"client_info": client_info,
183185
}
184186

185187
if roots is not None:

0 commit comments

Comments
 (0)