Skip to content

Commit 7df8db4

Browse files
authored
Merge pull request #248 from jlowin/version
update version badges
2 parents 470faae + 9b20e8a commit 7df8db4

File tree

8 files changed

+45
-22
lines changed

8 files changed

+45
-22
lines changed

docs/clients/transports.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ description: Understand the different ways FastMCP Clients can connect to server
55
icon: link
66
---
77

8+
import { VersionBadge } from "/snippets/version-badge.mdx"
9+
10+
<VersionBadge version="2.0.0" />
11+
812
The FastMCP `Client` relies on a `ClientTransport` object to handle the specifics of connecting to and communicating with an MCP server. FastMCP provides several built-in transport implementations for common connection methods.
913

1014
While the `Client` often infers the correct transport automatically (see [Client Overview](/clients/client#transport-inference)), you can also instantiate transports explicitly for more control.

docs/patterns/contrib.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ description: "Community-contributed modules extending FastMCP"
44
icon: "cubes"
55
---
66

7+
import { VersionBadge } from "/snippets/version-badge.mdx"
8+
9+
<VersionBadge version="2.2.1" />
710

811
FastMCP includes a `contrib` package that holds community-contributed modules. These modules extend FastMCP's functionality but aren't officially maintained by the core team.
912

docs/servers/fastmcp.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Learn about the core FastMCP server class and how to run it.
55
icon: server
66
---
77

8+
import { VersionBadge } from "/snippets/version-badge.mdx"
9+
810
The central piece of a FastMCP application is the `FastMCP` server class. This class acts as the main container for your application's tools, resources, and prompts, and manages communication with MCP clients.
911

1012
## Creating a Server
@@ -225,6 +227,8 @@ The CLI can dynamically find and run FastMCP server objects in your files, but i
225227

226228
## Composing Servers
227229

230+
<VersionBadge version="2.2.0" />
231+
228232
FastMCP supports composing multiple servers together using `import_server` (static copy) and `mount` (live link). This allows you to organize large applications into modular components or reuse existing servers.
229233

230234
See the [Server Composition](/patterns/composition) guide for full details, best practices, and examples.
@@ -246,6 +250,8 @@ main.mount("sub", sub)
246250

247251
## Proxying Servers
248252

253+
<VersionBadge version="2.0.0" />
254+
249255
FastMCP can act as a proxy for any MCP server (local or remote) using `FastMCP.from_client`, letting you bridge transports or add a frontend to existing servers. For example, you can expose a remote SSE server locally via stdio, or vice versa.
250256

251257
See the [Proxying Servers](/patterns/proxy) guide for details and advanced usage.

docs/servers/prompts.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Create reusable, parameterized prompt templates for MCP clients.
55
icon: message-lines
66
---
77

8+
import { VersionBadge } from "/snippets/version-badge.mdx"
9+
810
Prompts are reusable message templates that help LLMs generate structured, purposeful responses. FastMCP simplifies defining these templates, primarily using the `@mcp.prompt` decorator.
911

1012
## What Are Prompts?
@@ -201,6 +203,8 @@ Refer to the [Context documentation](/servers/context) for more details on these
201203

202204
### Duplicate Prompts
203205

206+
<VersionBadge version="2.1.0" />
207+
204208
You can configure how the FastMCP server handles attempts to register multiple prompts with the same name. Use the `on_duplicate_prompts` setting during `FastMCP` initialization.
205209

206210
```python

docs/servers/resources.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ This allows accessing the same template implementation through different URI pat
397397

398398
### Duplicate Resources
399399

400+
<VersionBadge version="2.1.0" />
401+
400402
You can configure how the FastMCP server handles attempts to register multiple resources or templates with the same URI. Use the `on_duplicate_resources` setting during `FastMCP` initialization.
401403

402404
```python

docs/servers/tools.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ For full documentation on the Context object and all its capabilities, see the [
311311

312312
### Duplicate Tools
313313

314+
<VersionBadge version="2.1.0" />
315+
314316
You can control how the FastMCP server behaves if you try to register multiple tools with the same name. This is configured using the `on_duplicate_tools` argument when creating the `FastMCP` instance.
315317

316318
```python

docs/snippets/version-badge.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
export const VersionBadge = ({ version }) => {
22
return (
3-
<span className="version-badge">
4-
<span className="badge-emoji" aria-hidden="true" style={{ marginRight: '0.3em', verticalAlign: 'middle' }}>✨</span>
5-
New in version {version}
6-
</span>
3+
<code className="version-badge-container">
4+
<div className="version-badge">
5+
<span className="version-badge-label">New in version:</span>&nbsp;
6+
<span className="version-badge-version">{version}</span>
7+
</div>
8+
</code>
9+
10+
11+
712
);
813
};

docs/style.css

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,30 @@ h6 code:not(pre code) {
1414

1515
/* Version badge -- display a badge with the current version of the documentation */
1616
.version-badge {
17-
display: inline-flex;
17+
display: inline-block;
1818
align-items: center;
1919
gap: 0.3em;
20-
padding: 0.32em 1em;
21-
font-size: 0.92em;
22-
font-weight: 600;
23-
letter-spacing: 0.01em;
24-
color: #7417e5;
25-
background: #f3e8ff;
26-
border: 1.5px solid #c084fc;
20+
padding: 0.2em 0.8em;
21+
font-size: 1.1em;
22+
font-weight: 400;
23+
24+
font-family: "Inter", sans-serif;
25+
letter-spacing: 0.025em;
26+
color: #ff5400;
27+
background: #ffeee6;
28+
border: 1px solid rgb(255, 84, 0, 0.5);
2729
border-radius: 6px;
2830
box-shadow: none;
2931
vertical-align: middle;
3032
position: relative;
3133
transition: box-shadow 0.2s, transform 0.15s;
3234
}
3335

36+
.version-badge-container {
37+
margin: 0;
38+
padding: 0;
39+
}
40+
3441
.version-badge:hover {
3542
box-shadow: 0 2px 8px 0 rgba(160, 132, 252, 0.1);
3643
transform: translateY(-1px) scale(1.03);
@@ -41,13 +48,3 @@ h6 code:not(pre code) {
4148
background: #312e81;
4249
border: 1.5px solid #a78bfa;
4350
}
44-
45-
.badge-emoji {
46-
font-size: 1.15em;
47-
line-height: 1;
48-
text-shadow: 0 1px 2px #fff, 0 0px 2px #c084fc;
49-
}
50-
51-
.dark .badge-emoji {
52-
text-shadow: 0 1px 2px #312e81, 0 0px 2px #a78bfa;
53-
}

0 commit comments

Comments
 (0)