docs: mcp sampling support (#5708)

Co-authored-by: Angie Jones <jones.angie@gmail.com>
This commit is contained in:
dianed-square
2025-11-12 21:05:09 -08:00
committed by GitHub
parent 7e3a754b83
commit f233f9f3be
3 changed files with 152 additions and 17 deletions
@@ -10,7 +10,7 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
<h1 className={styles.pageTitle}>Rich Interactive Chat with MCP-UI</h1>
<p className={styles.pageDescription}>
Goose Desktop supports extensions that transform text-only responses into graphical, interactive experiences. Instead of reading through lists and descriptions, you can click, explore, and interact with UI components directly in your conversations.
goose Desktop supports extensions that transform text-only responses into graphical, interactive experiences. Instead of reading through lists and descriptions, you can click, explore, and interact with UI components directly in your conversations.
</p>
<div className="video-container margin-bottom--lg">
@@ -29,12 +29,12 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
<div className={styles.cardGrid}>
<Card
title="MCP-UI Extensions"
description="Goose transforms text-based responses into engaging graphical and interactive user experiences."
description="goose transforms text-based responses into engaging graphical and interactive user experiences."
link="/docs/guides/interactive-chat/mcp-ui"
/>
<Card
title="Auto Visualiser Extension"
description="Generate interactive data visualizations automatically in Goose."
description="Generate interactive data visualizations automatically in goose."
link="/docs/mcp/autovisualiser-mcp"
/>
</div>
@@ -45,7 +45,7 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
<div className={styles.cardGrid}>
<Card
title="MCP UI: Bringing the Browser into the Agent"
description="MCP-UI servers return content that Goose Desktop renders as rich, embeddable UI."
description="MCP-UI servers return content that goose Desktop renders as rich, embeddable UI."
link="/blog/2025/08/11/mcp-ui-post-browser-world"
/>
<Card
@@ -63,6 +63,11 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
description="Making an MCP server MCP-UI compatible requires just a few lines of code"
link="/blog/2025/09/08/turn-any-mcp-server-mcp-ui-compatible"
/>
<Card
title="Designing AI for Users, Not Just LLMs"
description="Building intent-based AI experiences with MCP-UI."
link="/blog/2025/10/14/designing-ai-for-humans"
/>
</div>
</div>
@@ -72,6 +77,13 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
<VideoCarousel
id="more-videos"
videos={[
{
type: 'iframe',
src: 'https://youtube.com/embed/Kxj-vFBO_9U',
title: 'Building A MCP-UI Server',
description: 'Learn how to build your own MCP-UI server from scratch',
duration: ''
},
{
type: 'iframe',
src: 'https://youtube.com/embed/GS-kmreZDgU',
+80
View File
@@ -0,0 +1,80 @@
---
sidebar_position: 54
title: MCP Sampling Extensions
sidebar_label: MCP Sampling
description: Transforms MCP servers into intelligent agents that can think, analyze, and make decisions using goose's AI
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
MCP Sampling can transform extensions from simple data providers into intelligent agents. Instead of just returning raw information for goose to interpret, extensions can leverage goose's AI capabilities to provide expert-level guidance, perform contextual analysis, and create entirely new interaction patterns.
This feature is automatically enabled in goose, no configuration required! Any MCP server extension that supports sampling will automatically have access to the LLM that goose is using. This means:
- goose users can get more targeted responses tailored to the extension's specific capabilities
- developers can add sampling support to their MCP servers to provide enhanced capabilities in goose
:::info
[MCP Sampling](https://modelcontextprotocol.io/specification/draft/client/sampling) is a feature in the Model Context Protocol.
:::
## How MCP Sampling Works
MCP Sampling enables extensions to ask goose's AI for help with their tasks. When an extension needs to analyze data, make intelligent decisions, or understand natural language, it can send a "sampling" request to ask for AI assistance. goose processes the request using its AI capabilities and returns the response to the extension.
This feature allows extensions to provide more specialized contextual responses or novel interaction patterns. The following example shows how a database extension could provide expert-level diagnostics by combining its domain knowledge with goose's AI analysis:
<Tabs>
<TabItem value="without" label="Without Sampling">
1. You ask goose: "What's wrong with my database performance?"
2. goose calls the database tool
3. The database tool returns raw metrics to goose:
```
Query times: 2.3s, 1.8s, 5.2s, 0.3s, 8.1s
Table sizes: users (1M rows), orders (5M rows)
Indexes: 3 on users, 1 on orders
```
4. goose responds to you with general recommendations:
```
Your database seems slow. Some queries are taking over 5 seconds. You might need more indexes.
```
</TabItem>
<TabItem value="with" label="With Sampling">
1. You ask goose: "What's wrong with my database performance?"
2. goose calls the database tool
3. The database tool gets raw metrics:
```
Query times: 2.3s, 1.8s, 5.2s, 0.3s, 8.1s
Table sizes: users (1M rows), orders (5M rows)
Indexes: 3 on users, 1 on orders
```
Then, the tool:
- Uses its domain expertise (query patterns, table relationships, database type) to ask goose's AI: "Given these metrics and knowing the JOIN patterns in this PostgreSQL database, what's the issue?"
- Returns an AI-enhanced response to goose
4. goose responds to you with targeted recommendations:
```
Your orders table is missing an index on customer_id which is causing the 5-8 second delays in your JOIN queries. The slow queries all involve customer lookups. Run: `CREATE INDEX idx_orders_customer ON orders(customer_id);`
```
</TabItem>
</Tabs>
### Use Cases
MCP Sampling enables powerful capabilities like:
- **Smart documentation tools** that explain code in context
- **Intelligent search** that filters and ranks results
- **Database analyzers** that provide specific optimization recommendations
- **Multi-perspective analysis** where extensions generate and synthesize multiple AI viewpoints
## For Extension Developers
Want to add MCP Sampling to your own extensions? See our [Building Custom Extensions](/docs/tutorials/custom-extensions) tutorial to learn more about how MCP servers can leverage goose's AI capabilities.