🚀 The fast, Pythonic way to build MCP servers and clients.
docs: quote pip extras install examples (#4568)
Rach Granvilledd803a0d7ffd
diff --git a/docs/clients/sampling.mdx b/docs/clients/sampling.mdxindex b0655989b..458135b63 100644--- a/docs/clients/sampling.mdx+++ b/docs/clients/sampling.mdx@@ -128,7 +128,7 @@ client = Client(```<Note>-Install the OpenAI handler with `pip install fastmcp[openai]`.+Install the OpenAI handler with `pip install 'fastmcp[openai]'`.</Note>### Anthropic Handler@@ -146,7 +146,7 @@ client = Client(```<Note>-Install the Anthropic handler with `pip install fastmcp[anthropic]`.+Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.</Note>### Google Gemini Handler@@ -164,7 +164,7 @@ client = Client(```<Note>-Install the Google Gemini handler with `pip install fastmcp[gemini]`.+Install the Google Gemini handler with `pip install 'fastmcp[gemini]'`.</Note>## Sampling Capabilitiesdiff --git a/docs/servers/sampling.mdx b/docs/servers/sampling.mdxindex 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. ToFastMCP 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.<Note>-Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.+Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.</Note>```pythondiff --git a/docs/v2/clients/sampling.mdx b/docs/v2/clients/sampling.mdxindex a709b1761..8f72de597 100644--- a/docs/v2/clients/sampling.mdx+++ b/docs/v2/clients/sampling.mdx@@ -212,7 +212,7 @@ client = Client(```<Note>-Install the OpenAI handler with `pip install fastmcp[openai]`.+Install the OpenAI handler with `pip install 'fastmcp[openai]'`.</Note>### Anthropic Handler@@ -246,7 +246,7 @@ client = Client(```<Note>-Install the Anthropic handler with `pip install fastmcp[anthropic]`.+Install the Anthropic handler with `pip install 'fastmcp[anthropic]'`.</Note>### Tool Executiondiff --git a/docs/v2/servers/sampling.mdx b/docs/v2/servers/sampling.mdxindex 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. ToFastMCP 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.<Note>-Install handlers with `pip install fastmcp[openai]` or `pip install fastmcp[anthropic]`.+Install handlers with `pip install 'fastmcp[openai]'` or `pip install 'fastmcp[anthropic]'`.</Note>```pythondiff --git a/examples/sampling/README.md b/examples/sampling/README.mdindex 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 OpenAISamplingHandlerhandler = 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.pyindex 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 Formfrom prefab_ui.rx import RESULT, Rxexcept ImportError:- return "<html><body><p>prefab-ui not installed. Run: pip install fastmcp[apps]</p></body></html>"+ return "<html><body><p>prefab-ui not installed. Run: pip install 'fastmcp[apps]'</p></body></html>"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.pyindex 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.pyindex 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