A comprehensive collection of Model Context Protocol (MCP) tool patterns and recipes. This cookbook demonstrates various MCP design patterns that you can use as building blocks for your own AI-powered applications.
This cookbook demonstrates essential MCP tool patterns:
code_reviewer_prompt
- Ready-to-use comprehensive code review promptsreact_prompt_generator
- Dynamic ReAct (Reason + Act) pattern prompt generation- Use case: Transform MCP into a prompt repository service
smart_recipe_generator
- Progressive information gathering with intelligent questions- Use case: Handle incomplete user input gracefully by asking targeted follow-up questions
step1_initialize_workflow
→step2_execute_workflow
- Sequential tool dependencies- Use case: Complex workflows requiring state management and ordered execution
sequential_web_search
- Bridges external tools (like web_search) with MCP processing- Use case: Extend and orchestrate native client tools from the server side
tool_with_follow_up
- Tools that suggest next actions through embedded commandsquantum_mood_analyzer
,rubber_duck_debugger
,coffee_brew_oracle
- Fun example tools- Use case: Guide conversation flow through tool response content
See these MCP tool patterns demonstrated in real AI conversations:
The
code_reviewer_prompt
tool exposing a comprehensive, ready-to-use code review template
The
smart_recipe_generator
tool progressively gathering information through targeted questions
The
sequential_web_search
tool orchestrating multiple web searches and processing results
The
tool_with_follow_up
tool suggesting next actions, leading to rubber_duck_debugger
execution
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Or use the convenient activation script:
source activate.sh
Connect this cookbook to LLM applications that support MCP:
- Claude Desktop: Add to your MCP configuration
- Cursor: Add to your MCP configuration
- Custom LLM apps: Use the FastMCP client
- Other MCP clients: Any MCP-compatible client can use these patterns
{
"mcpServers": {
"mcp-tools-cookbook": {
"command": "python",
"args": ["path-to-repository/mcp_server.py"]
}
}
}
Add to your ~/.cursor/mcp.json
file:
{
"mcp-tools-patterns": {
"command": "python",
"args": [
"path-to-repository/mcp_server.py"
]
}
}
This cookbook is provided as-is for educational purposes. Check the FastMCP repository for its license terms.