Basic Usage
Request a rendered prompt withget_prompt():
Argument Serialization
FastMCP automatically serializes complex arguments to JSON strings as required by the MCP specification. You can pass typed objects directly:pydantic_core.to_json() for consistent formatting. FastMCP servers automatically deserialize these JSON strings back to the expected types.
Working with Results
Theget_prompt() method returns a GetPromptResult containing a list of messages:
Version Selection
When a server exposes multiple versions of a prompt, you can request a specific version:Multi-Server Clients
When using multi-server clients, prompts are accessible directly without prefixing:Raw Protocol Access
For complete control, useget_prompt_mcp() which returns the full MCP protocol object:

