π The fast, Pythonic way to build MCP servers and clients.
update version badges
Jeremiah Lowin9b20e8a6b04a
diff --git a/docs/clients/transports.mdx b/docs/clients/transports.mdxindex a64fb0c25..67a70b5b2 100644--- a/docs/clients/transports.mdx+++ b/docs/clients/transports.mdx@@ -5,6 +5,10 @@ description: Understand the different ways FastMCP Clients can connect to servericon: link---+import { VersionBadge } from "/snippets/version-badge.mdx"++<VersionBadge version="2.0.0" />+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.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.diff --git a/docs/patterns/contrib.mdx b/docs/patterns/contrib.mdxindex 920b248bf..aead6affd 100644--- a/docs/patterns/contrib.mdx+++ b/docs/patterns/contrib.mdx@@ -4,6 +4,9 @@ description: "Community-contributed modules extending FastMCP"icon: "cubes"---+import { VersionBadge } from "/snippets/version-badge.mdx"++<VersionBadge version="2.2.1" />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.diff --git a/docs/servers/fastmcp.mdx b/docs/servers/fastmcp.mdxindex 745d56bdf..9294ddb2a 100644--- a/docs/servers/fastmcp.mdx+++ b/docs/servers/fastmcp.mdx@@ -5,6 +5,8 @@ description: Learn about the core FastMCP server class and how to run it.icon: server---+import { VersionBadge } from "/snippets/version-badge.mdx"+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.## Creating a Server@@ -225,6 +227,8 @@ The CLI can dynamically find and run FastMCP server objects in your files, but i## Composing Servers+<VersionBadge version="2.2.0" />+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.See the [Server Composition](/patterns/composition) guide for full details, best practices, and examples.@@ -246,6 +250,8 @@ main.mount("sub", sub)## Proxying Servers+<VersionBadge version="2.0.0" />+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.See the [Proxying Servers](/patterns/proxy) guide for details and advanced usage.diff --git a/docs/servers/prompts.mdx b/docs/servers/prompts.mdxindex 2f71cb74c..b9a6b520c 100644--- a/docs/servers/prompts.mdx+++ b/docs/servers/prompts.mdx@@ -5,6 +5,8 @@ description: Create reusable, parameterized prompt templates for MCP clients.icon: message-lines---+import { VersionBadge } from "/snippets/version-badge.mdx"+Prompts are reusable message templates that help LLMs generate structured, purposeful responses. FastMCP simplifies defining these templates, primarily using the `@mcp.prompt` decorator.## What Are Prompts?@@ -201,6 +203,8 @@ Refer to the [Context documentation](/servers/context) for more details on these### Duplicate Prompts+<VersionBadge version="2.1.0" />+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.```pythondiff --git a/docs/servers/resources.mdx b/docs/servers/resources.mdxindex 9e13b98bd..4db09f209 100644--- a/docs/servers/resources.mdx+++ b/docs/servers/resources.mdx@@ -397,6 +397,8 @@ This allows accessing the same template implementation through different URI pat### Duplicate Resources+<VersionBadge version="2.1.0" />+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.```pythondiff --git a/docs/servers/tools.mdx b/docs/servers/tools.mdxindex 7839efa89..7d4fdbf50 100644--- a/docs/servers/tools.mdx+++ b/docs/servers/tools.mdx@@ -311,6 +311,8 @@ For full documentation on the Context object and all its capabilities, see the [### Duplicate Tools+<VersionBadge version="2.1.0" />+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.```pythondiff --git a/docs/snippets/version-badge.mdx b/docs/snippets/version-badge.mdxindex a5021de94..d8ef3dd95 100644--- a/docs/snippets/version-badge.mdx+++ b/docs/snippets/version-badge.mdx@@ -1,8 +1,13 @@export const VersionBadge = ({ version }) => {return (- <span className="version-badge">- <span className="badge-emoji" aria-hidden="true" style={{ marginRight: '0.3em', verticalAlign: 'middle' }}>β¨</span>- New in version {version}- </span>+ <code className="version-badge-container">+ <div className="version-badge">+ <span className="version-badge-label">New in version:</span> + <span className="version-badge-version">{version}</span>+ </div>+ </code>+++);};\ No newline at end of filediff --git a/docs/style.css b/docs/style.cssindex f6bb832bc..be64b3edd 100644--- a/docs/style.css+++ b/docs/style.css@@ -14,16 +14,18 @@ h6 code:not(pre code) {/* Version badge -- display a badge with the current version of the documentation */.version-badge {- display: inline-flex;+ display: inline-block;align-items: center;gap: 0.3em;- padding: 0.32em 1em;- font-size: 0.92em;- font-weight: 600;- letter-spacing: 0.01em;- color: #7417e5;- background: #f3e8ff;- border: 1.5px solid #c084fc;+ padding: 0.2em 0.8em;+ font-size: 1.1em;+ font-weight: 400;++ font-family: "Inter", sans-serif;+ letter-spacing: 0.025em;+ color: #ff5400;+ background: #ffeee6;+ border: 1px solid rgb(255, 84, 0, 0.5);border-radius: 6px;box-shadow: none;vertical-align: middle;@@ -31,6 +33,11 @@ h6 code:not(pre code) {transition: box-shadow 0.2s, transform 0.15s;}+.version-badge-container {+ margin: 0;+ padding: 0;+}+.version-badge:hover {box-shadow: 0 2px 8px 0 rgba(160, 132, 252, 0.1);transform: translateY(-1px) scale(1.03);@@ -41,13 +48,3 @@ h6 code:not(pre code) {background: #312e81;border: 1.5px solid #a78bfa;}--.badge-emoji {- font-size: 1.15em;- line-height: 1;- text-shadow: 0 1px 2px #fff, 0 0px 2px #c084fc;-}--.dark .badge-emoji {- text-shadow: 0 1px 2px #312e81, 0 0px 2px #a78bfa;-}