Prompts
Use predefined prompt templates from MCP servers in your application
Prompts allow MCP servers to expose reusable prompt templates that can be easily inserted into your application. This enables standardized workflows, consistent prompt patterns, and quick access to commonly used prompts provided by MCP servers.
For more details on the prompts specification, see the MCP Prompts documentation.
What are Prompts?
Prompts are predefined text templates exposed by MCP servers that users can insert into their message input. This is useful when:
- An MCP server provides helpful prompt templates for common tasks
- You want to standardize how users interact with specific tools or workflows
- Users need quick access to complex prompts without memorizing syntax
For example, a GitHub MCP server might provide prompts like "Create a detailed issue report" or "Review this pull request", which expand into well-structured templates when selected.
Built-in Support
The message-input component automatically displays available prompts from all connected MCP servers. When any MCP server exposes prompts, a document button (📄) appears in the message input area:
import { MessageInput } from "@/components/ui/message-input";
// Prompts are automatically displayed - no additional setup needed
<MessageInput contextKey="my-thread">
<MessageInput.Textarea />
<MessageInput.McpPromptButton />
<MessageInput.SubmitButton />
</MessageInput>;The prompt picker automatically:
- Discovers prompts from all connected MCP servers
- Displays them in a dropdown menu
- Inserts the selected prompt into the message input
- Only appears when at least one MCP server has prompts available
How It Works
Here's the typical flow when a user selects an MCP prompt:
User Experience

When prompts are available:
- A document icon (📄) appears in the message input area
- Clicking it opens a dropdown showing all available prompts
- Prompts are organized by MCP server
- Selecting a prompt inserts its content into the message input
- The user can then edit the prompt before sending
Current Limitations
Parameters are not yet supported. While the MCP specification allows prompts to accept parameters for customization, Tambo's current implementation does not expose parameter input fields. All prompts are inserted as-is without user customization.
This means:
- Prompts with parameters will use their default values
- Users cannot customize prompt templates at insertion time
- Parameter support is planned for a future release
Programmatic Access
You can access Prompts programmatically using the provided hooks:
List All Prompts
Use useTamboMcpPromptList to get all available prompts from connected servers:
import { useTamboMcpPromptList } from "@tambo-ai/react/mcp";
function PromptList() {
const { data: prompts, isLoading, error } = useTamboMcpPromptList();
if (isLoading) return <div>Loading prompts...</div>;
if (error) return <div>Error loading prompts</div>;
return (
<ul>
{prompts?.map((entry) => (
<li key={`${entry.server.url}-${entry.prompt.name}`}>
<strong>{entry.prompt.name}</strong>
<p>{entry.prompt.description}</p>
<small>From: {entry.server.name}</small>
</li>
))}
</ul>
);
}The hook returns an array of ListPromptEntry objects, each containing:
server- The connected MCP server providing this promptprompt- The prompt metadata (name, description)
Get Specific Prompt
Use useTamboMcpPrompt to fetch a specific prompt's content:
import { useTamboMcpPrompt } from "@tambo-ai/react/mcp";
function PromptContent({ promptName }: { promptName: string }) {
const { data: prompt, isLoading, error } = useTamboMcpPrompt(promptName);
if (isLoading) return <div>Loading...</div>;
if (error) return <div>Error loading prompt</div>;
if (!prompt) return null;
return (
<div>
<h3>{prompt.description}</h3>
{prompt.messages.map((msg, idx) => (
<div key={idx}>
<strong>{msg.role}:</strong>
{msg.content.type === "text" && <p>{msg.content.text}</p>}
</div>
))}
</div>
);
}The hook accepts:
promptName- The name of the prompt to fetchargs- Optional parameters (currently not exposed in UI)
Connection Type Support
Prompts work with both connection types:
- Server-side MCP - ✅ Fully supported
- Client-side MCP - ✅ Fully supported
Both connection types can expose prompts that will appear in the prompt picker.
Example Use Cases
Documentation Templates
A documentation MCP server provides prompts for common documentation patterns:
- "API endpoint documentation"
- "Component usage guide"
- "Troubleshooting section"
Code Review Prompts
A code review MCP server offers structured review templates:
- "Security-focused code review"
- "Performance optimization review"
- "Accessibility audit"
Task Management
A task tracking MCP server provides prompts for common workflows:
- "Create bug report"
- "Plan feature implementation"
- "Write release notes"
Future Capabilities
Planned enhancements for MCP prompts include:
- Inline prompts: Allow users to edit prompts in the message input, with a
/hotkey. - Parameter support: Allow users to customize prompts with dynamic values
- Custom UI: Build custom prompt pickers with different layouts
- Prompt history: Track frequently used prompts