2.0.0
Prompts are reusable message templates exposed by MCP servers. They can accept arguments to generate personalized message sequences for LLM interactions.
Listing Prompts
Uselist_prompts() to retrieve all available prompt templates:
Filtering by Tags
New in version2.11.0
You can use the meta field to filter prompts based on their tags:
The
_meta field is part of the standard MCP specification. FastMCP servers include tags and other metadata within a _fastmcp namespace (e.g., _meta._fastmcp.tags) to avoid conflicts with user-defined metadata. This behavior can be controlled with the server’s include_fastmcp_meta setting - when disabled, the _fastmcp namespace won’t be included. Other MCP server implementations may not provide this metadata structure.Using Prompts
Basic Usage
Request a rendered prompt usingget_prompt() with the prompt name and arguments:
Prompts with Arguments
Pass arguments as a dictionary to customize the prompt:Automatic Argument Serialization
New in version2.9.0
FastMCP automatically serializes complex arguments to JSON strings as required by the MCP specification. This allows you to pass typed objects directly:
pydantic_core.to_json() for consistent formatting. FastMCP servers can automatically deserialize these JSON strings back to the expected types.
Serialization Examples
Working with Prompt Results
Theget_prompt() method returns a GetPromptResult object containing a list of messages:
Raw MCP Protocol Access
For access to the complete MCP protocol objects, use the*_mcp methods:

