From 51a228a6aeb72e765747f9656fb9aff6a4541ad5 Mon Sep 17 00:00:00 2001
From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
Date: Mon, 20 Jul 2026 11:06:30 -0400
Subject: [PATCH] docs: quote all pip install extras for fastmcp sampling
handlers
---
docs/clients/sampling.mdx | 6 +++---
docs/servers/sampling.mdx | 2 +-
docs/v2/clients/sampling.mdx | 4 ++--
docs/v2/servers/sampling.mdx | 2 +-
examples/sampling/README.md | 4 ++--
fastmcp_slim/fastmcp/cli/apps_dev.py | 2 +-
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py | 2 +-
.../fastmcp/client/sampling/handlers/google_genai.py | 2 +-
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/clients/sampling.mdx b/docs/clients/sampling.mdx
index b0655989b..458135b63 100644
--- a/docs/clients/sampling.mdx
+++ b/docs/clients/sampling.mdx
@@ -128,7 +128,7 @@ client = Client(
```
-Install the OpenAI handler with `pip install fastmcp[openai]`.
+Install the OpenAI handler with `pip install 'fastmcp[openai]'`.
### Anthropic Handler
@@ -146,7 +146,7 @@ client = Client(
```
-Install the Anthropic handler with `pip install fastmcp[anthropic]`.
+Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.
### Google Gemini Handler
@@ -164,7 +164,7 @@ client = Client(
```
-Install the Google Gemini handler with `pip install fastmcp[gemini]`.
+Install the Google Gemini handler with `pip install 'fastmcp[gemini]'`.
## Sampling Capabilities
diff --git a/docs/servers/sampling.mdx b/docs/servers/sampling.mdx
index b537dcbc1..35ca7c012 100644
--- a/docs/servers/sampling.mdx
+++ b/docs/servers/sampling.mdx
@@ -137,7 +137,7 @@ Client support for sampling is optional—some clients may not implement it. To
FastMCP provides built-in handlers for [OpenAI and Anthropic APIs](/clients/sampling#built-in-handlers). These handlers support the full sampling API including tools, automatically converting your Python functions to each provider's format.
-Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.
+Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.
```python
diff --git a/docs/v2/clients/sampling.mdx b/docs/v2/clients/sampling.mdx
index a709b1761..8f72de597 100644
--- a/docs/v2/clients/sampling.mdx
+++ b/docs/v2/clients/sampling.mdx
@@ -212,7 +212,7 @@ client = Client(
```
-Install the OpenAI handler with `pip install fastmcp[openai]`.
+Install the OpenAI handler with `pip install 'fastmcp[openai]'`.
### Anthropic Handler
@@ -246,7 +246,7 @@ client = Client(
```
-Install the Anthropic handler with `pip install fastmcp[anthropic]`.
+Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.
### Tool Execution
diff --git a/docs/v2/servers/sampling.mdx b/docs/v2/servers/sampling.mdx
index 5c21a0bde..150c9ac5f 100644
--- a/docs/v2/servers/sampling.mdx
+++ b/docs/v2/servers/sampling.mdx
@@ -446,7 +446,7 @@ Client support for sampling is optional—some clients may not implement it. To
FastMCP provides built-in handlers for [OpenAI and Anthropic APIs](/v2/clients/sampling#built-in-handlers). These handlers support the full sampling API including tools, automatically converting your Python functions to each provider's format.
-Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.
+Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.
```python
diff --git a/examples/sampling/README.md b/examples/sampling/README.md
index 3f9225b19..d23a595ec 100644
--- a/examples/sampling/README.md
+++ b/examples/sampling/README.md
@@ -5,7 +5,7 @@ These examples demonstrate FastMCP's sampling API, which allows server tools to
## Prerequisites
```bash
-pip install fastmcp[anthropic]
+pip install 'fastmcp[anthropic]'
export ANTHROPIC_API_KEY=your-key
```
@@ -59,4 +59,4 @@ from fastmcp.client.sampling.handlers.openai import OpenAISamplingHandler
handler = OpenAISamplingHandler(default_model="gpt-4o-mini")
```
-And install with `pip install fastmcp[openai]`.
+And install with `pip install 'fastmcp[openai]'`.
diff --git a/fastmcp_slim/fastmcp/cli/apps_dev.py b/fastmcp_slim/fastmcp/cli/apps_dev.py
index 6361db41b..1c7547277 100644
--- a/fastmcp_slim/fastmcp/cli/apps_dev.py
+++ b/fastmcp_slim/fastmcp/cli/apps_dev.py
@@ -1052,7 +1052,7 @@ def _build_picker_html(tools: list[dict[str, Any]]) -> str:
from prefab_ui.components.form import Form
from prefab_ui.rx import RESULT, Rx
except ImportError:
- return "
prefab-ui not installed. Run: pip install fastmcp[apps]
"
+ return "prefab-ui not installed. Run: pip install 'fastmcp[apps]'
"
if not tools:
with Column(gap=4, css_class="p-6 max-w-2xl mx-auto") as view:
diff --git a/fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py b/fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py
index 88eb132ee..747d1ab69 100644
--- a/fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py
+++ b/fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py
@@ -41,7 +41,7 @@ try:
except ImportError as e:
raise ImportError(
"The `anthropic` package is not installed. "
- "Install it with `pip install fastmcp-slim[anthropic]` or add `anthropic` to your dependencies."
+ "Install it with `pip install 'fastmcp-slim[anthropic]'` or add `anthropic` to your dependencies."
) from e
__all__ = ["AnthropicSamplingHandler"]
diff --git a/fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py b/fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py
index 12d6064e6..7bfbbb626 100644
--- a/fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py
+++ b/fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py
@@ -28,7 +28,7 @@ try:
except ImportError as e:
raise ImportError(
"The `google-genai` package is not installed. "
- "Install it with `pip install fastmcp-slim[gemini]` or add `google-genai` "
+ "Install it with `pip install 'fastmcp-slim[gemini]'` or add `google-genai` "
"to your dependencies."
) from e