Food Travel MCP Server
Integrates with Google Places API to provide real-time restaurant search and food recommendation data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Food Travel MCP ServerFind Italian restaurants in San Francisco"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Food Travel MCP Server
A Model Context Protocol (MCP) server that provides restaurant search and food recommendation tools for AI clients. This server integrates with Google Places API to deliver real-time restaurant data to AI applications.
๐ฏ What is MCP?
Model Context Protocol (MCP) enables AI applications to access external tools and data sources through a standardized interface.
MCP Server (this project): Exposes food-related tools to AI clients
MCP Client (Claude Desktop, custom AI agents): Calls our tools based on user prompts
How it Works
User: "Find Italian restaurants near me"
โ
AI Client (Claude/Custom Agent)
โ (analyzes prompt, decides to call search_restaurants tool)
Our MCP Server
โ (calls Google Places API)
Real Restaurant Data
โ (returns structured JSON to AI client)
AI Client formats response for userRelated MCP server: SerpMCP
๐ Features
Real-time restaurant search using Google Places API
Location-based filtering with customizable radius
Cuisine-type filtering (Italian, Chinese, etc.)
Flexible parameters (max results, price level)
Database caching for improved performance
Comprehensive testing suite
Production-ready architecture
๐ Prerequisites
Python 3.8 or higher
Google Places API key (Get one here)
Git
๐ ๏ธ Installation
Step 1: Clone the Repository
git clone <your-repo-url>
cd Food-Travel-MCPStep 2: Create Virtual Environment
# Create virtual environment
python -m venv venv
# Activate it
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activateStep 3: Install Dependencies
pip install -r requirements.txtStep 4: Environment Configuration
# Copy environment template
cp .env.example .env
# Edit .env file and add your Google Places API key
# Replace "your_google_places_api_key_here" with your actual API keyRequired environment variables in .env:
GOOGLE_PLACES_API_KEY=your_actual_api_key_here
DATABASE_URL=sqlite:///./food_travel.db
DEBUG=falseStep 5: Initialize Database
python scripts/init_db.pyYou should see:
Creating database tables...
Database tables created successfully!๐งช Testing
Quick Test (Recommended)
# Run all tests in sequence
python tests/run_all_tests.pyIndividual Test Components
# Test Google Places API integration
python tests/test_components.py
# Test MCP tools functionality
python tests/test_mcp_tools.pyUsing Pytest (Advanced)
# Install pytest if not already included
pip install pytest pytest-asyncio
# Run all tests
pytest tests/ -v
# Run with output
pytest tests/ -v -sExpected Test Output
โ
Component Tests: Verify Google Places API connectivity and data formatting
โ
MCP Tools Tests: Verify tools accept parameters and return proper JSON responses
โ
Integration Tests: End-to-end functionality verification
๐ฎ Running the Server
Start the MCP Server
python -m src.food_mcp.serverExpected output:
INFO Food Travel MCP Server initialized
INFO Restaurant tools registered
INFO Starting Food Travel MCP Server
[Server running and waiting for MCP client connections...]Server Endpoints
The server exposes the following MCP tools:
search_restaurants
Search for restaurants based on location and preferences.
Parameters:
location(required): "New York, NY" or "40.7128,-74.0060"cuisine_type(optional): "Italian", "Chinese", "Pizza", etc.radius_km(optional): Search radius in kilometers (default: 10)max_results(optional): Maximum results to return (default: 10)
Example Response:
{
"success": true,
"location": "New York, NY",
"total_results": 5,
"restaurants": [
{
"google_place_id": "ChIJ...",
"name": "Tony's Italian Restaurant",
"address": "123 Main St, New York, NY",
"latitude": 40.7128,
"longitude": -74.0060,
"rating": 4.5,
"user_ratings_total": 127,
"price_level": 2,
"types": ["restaurant", "food"]
}
]
}๐ Project Structure
Food-Travel-MCP/
โโโ ๐ README.md # This file
โโโ ๐ requirements.txt # Python dependencies
โโโ ๐ .env.example # Environment template
โโโ ๐ .gitignore # Git ignore rules
โ
โโโ ๐ config/ # Configuration
โ โโโ __init__.py
โ โโโ settings.py # Application settings
โ
โโโ ๐ src/food_mcp/ # Main MCP server package
โ โโโ __init__.py
โ โโโ server.py # MCP server entry point
โ โ
โ โโโ ๐ models/ # Database models
โ โ โโโ __init__.py
โ โ โโโ base.py # Database base & session
โ โ โโโ restaurant.py # Restaurant cache model
โ โ
โ โโโ ๐ clients/ # External API clients
โ โ โโโ __init__.py
โ โ โโโ google_places.py # Google Places API client
โ โ
โ โโโ ๐ services/ # Business logic layer
โ โ โโโ __init__.py
โ โ โโโ restaurant_service.py
โ โ
โ โโโ ๐ tools/ # MCP tool definitions
โ โโโ __init__.py
โ โโโ restaurant_tools.py # Restaurant search tools
โ
โโโ ๐ tests/ # Test suite
โ โโโ __init__.py
โ โโโ conftest.py # Pytest configuration
โ โโโ test_components.py # Component tests
โ โโโ test_mcp_tools.py # MCP tools tests
โ โโโ run_all_tests.py # Test runner
โ
โโโ ๐ scripts/ # Utility scripts
โโโ init_db.py # Database initialization๐ง Development Workflow
1. Development Setup
# Make sure virtual environment is activated
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install development dependencies
pip install -r requirements.txt
# Set up pre-commit hooks (optional)
pip install pre-commit
pre-commit install2. Making Changes
# Run tests before making changes
python tests/run_all_tests.py
# Make your changes...
# Run tests again to ensure nothing broke
python tests/run_all_tests.py
# Test server startup
python -m src.food_mcp.server3. Adding New Tools
Create tool function in
src/food_mcp/tools/Register tool in
__init__.pyAdd corresponding service logic in
src/food_mcp/services/Write tests in
tests/Update documentation
๐ Usage Examples
With Claude Desktop
Install Claude Desktop
Configure MCP server in Claude's settings
Ask: "Find Italian restaurants near Times Square"
With Custom MCP Client
# Example client code
import asyncio
from mcp_client import MCPClient
async def find_restaurants():
client = MCPClient("food-travel-mcp")
result = await client.call_tool(
"search_restaurants",
location="San Francisco, CA",
cuisine_type="Italian",
max_results=5
)
print(result)๐ง Current Phase: Phase 1 - Basic Restaurant Search
โ Completed
Production-ready project structure
Google Places API integration
Basic restaurant search tool
Database models and caching structure
Comprehensive testing suite
Error handling and validation
๐ In Progress
Database caching implementation
Performance optimization
Additional restaurant tools (menu, reviews)
๐ Future Phases
Phase 2: User personalization integration with existing backend
Phase 3: Menu data and ordering capabilities
Phase 4: Enhanced AI features and trend analysis
Phase 5: Production deployment and monitoring
๐ Troubleshooting
Common Issues
Import Error: ModuleNotFoundError: No module named 'src'
# Make sure you're running from project root
cd Food-Travel-MCP
python scripts/init_db.pyGoogle Places API Error
# Check your API key in .env file
cat .env | grep GOOGLE_PLACES_API_KEY
# Verify API key has Places API enabled in Google ConsoleDatabase Issues
# Reinitialize database
rm food_travel.db # if using SQLite
python scripts/init_db.pyTest Failures
# Check API key configuration
python -c "from dotenv import load_dotenv; import os; load_dotenv(); print('API Key configured:', bool(os.getenv('GOOGLE_PLACES_API_KEY')))"
# Run individual test components
python tests/test_components.py๐ Support
For issues and questions:
Check the troubleshooting section above
Review test output for specific errors
Ensure all prerequisites are met
Verify Google Places API key is valid and has proper permissions
๐ Quick Start Summary
# 1. Setup
git clone <repo> && cd Food-Travel-MCP
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# 2. Configure
cp .env.example .env
# Edit .env with your Google Places API key
# 3. Initialize
python scripts/init_db.py
# 4. Test
python tests/run_all_tests.py
# 5. Run
python -m src.food_mcp.server๐ฏ You're ready to integrate with AI clients and start finding restaurants!
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/snehalsaurabh/Travelio-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server