MealDB MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MealDB MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with access to the TheMealDB API for recipe and meal information. This server enables AI assistants to search for recipes, get detailed meal information, browse categories, and explore ingredients.
๐ Hey Vibe Coders! Ever have the problem where your partner asks you, "What do you want to eat?" and you just stare blankly? No more endless scrolling through delivery apps or decision paralysis! Let AI help you discover your next meal! ๐คโจ
๐ Powered by TheMealDB - An open, crowd-sourced database of recipes from around the world!
๐ก Enjoying this product? Consider reaching out to TheMealDB team to set up a production API for enhanced features and production usecases!
๐ฝ๏ธ Features
๐ Meal Search - Search for meals by name
๐ Meal Details - Get complete recipe details including ingredients and instructions
๐ฒ Random Meals - Get random meal suggestions for when you're feeling adventurous
๐ Category Browsing - Explore meal categories and discover new cuisines
๐ฅ Ingredient Search - Find meals by specific ingredients you have on hand
๐ Comprehensive Data - Access to thousands of recipes from around the world
Related MCP server: Mealie MCP Server
๐ Quick Start
Prerequisites
Node.js 18+
npm or yarn
A compatible MCP client (like Cursor with MCP support)
Docker & Docker Compose (optional, for containerized deployment)
๐ป Local Installation (Recommended)
Clone this repository
git clone <your-repo-url> cd mealdb-mcpInstall dependencies
npm installBuild the server
npm run buildStart the server
npm start
The server will start and listen for MCP requests via stdio.
๐ณ Docker Installation (Optional)
For a containerized setup (requires Docker Desktop):
Production deployment:
npm run docker:prodDevelopment with hot reload:
npm run docker:devโ ๏ธ Note: If you get a "'docker-compose' is not recognized" error, Docker isn't installed. Use the local installation method above instead.
โ๏ธ Configuration
For Cursor IDE
The server includes a .cursor/mcp.json configuration file that allows Cursor to automatically discover and use the MealDB server:
{
"mcpServers": {
"mealdb-server": {
"command": "node",
"args": ["build/index.js"],
"env": {
"NODE_ENV": "development"
}
}
}
}For Other MCP Clients
Configure your MCP client to connect to this server using:
Command:
nodeArguments:
["path/to/mealdb-mcp/build/index.js"]Working Directory:
path/to/mealdb-mcp
๐ ๏ธ Available Tools
๐ search_meals
Search for meals by name.
Parameters:
query(string): Name of the meal to search for
Example:
{
"name": "search_meals",
"arguments": {
"query": "chicken"
}
}๐ get_meal_details
Get detailed information about a specific meal by ID.
Parameters:
mealId(string): The ID of the meal to get details for
Example:
{
"name": "get_meal_details",
"arguments": {
"mealId": "52772"
}
}๐ฒ get_random_meal
Get a random meal suggestion.
Parameters: None
Example:
{
"name": "get_random_meal",
"arguments": {}
}๐ list_categories
Get all available meal categories.
Parameters: None
Example:
{
"name": "list_categories",
"arguments": {}
}๐ฅ search_by_ingredient
Find meals that contain a specific ingredient.
Parameters:
ingredient(string): Name of the ingredient to search for
Example:
{
"name": "search_by_ingredient",
"arguments": {
"ingredient": "chicken"
}
}๐ฌ Usage Examples
Here are some example queries you can ask an AI assistant using this MCP server:
"Find me some chicken recipes"
"Get details for meal ID 52772"
"Give me a random meal suggestion"
"What meal categories are available?"
"Find meals that contain tomatoes"
"Show me Italian recipes"
"What are some vegetarian options?"
๐๏ธ Development
Project Structure
mealdb-mcp/
โโโ src/
โ โโโ index.ts # Main MCP server implementation
โโโ build/ # Compiled JavaScript output
โโโ .cursor/
โ โโโ mcp.json # Cursor IDE configuration
โโโ package.json # Project dependencies and scripts
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # This fileAvailable Scripts
Local Development:
npm run build- Compile TypeScript to JavaScriptnpm run watch- Watch for changes and recompilenpm start- Start the MCP servernpm run prepare- Build the project (runs automatically on install)
Docker Commands:
npm run docker:build- Build Docker imagenpm run docker:run- Run container from built imagenpm run docker:dev- Start development environment with hot reloadnpm run docker:prod- Start production environmentnpm run docker:stop- Stop all containersnpm run docker:logs- View container logsnpm run docker:clean- Clean up containers and images
API Information
This server uses the free tier of TheMealDB API which provides:
โ Meal search by name
โ Meal details by ID
โ Random meal suggestions
โ Category listings
โ Ingredient-based filtering
โ Area/cuisine filtering
Note: This server only uses free API endpoints. Premium features are not implemented.
๐ณ Docker Deployment
Container Features
๐๏ธ Multi-stage build for optimized production images
๐ Non-root user for enhanced security
๐ Health checks for container monitoring
๐๏ธ Alpine Linux base for minimal image size
๐ Development mode with hot reload support
Production Deployment
# Build and start in production mode
docker-compose up -d
# View logs
docker-compose logs -f mealdb-mcp-server
# Stop services
docker-compose downDevelopment Deployment
# Start development environment with hot reload
docker-compose -f docker-compose.dev.yml up
# Or use the npm script
npm run docker:devEnvironment Variables
Configure the container using environment variables:
NODE_ENV=production # Environment mode
PORT=3000 # Server port๐ Security
๐ The server runs locally and doesn't expose any network ports
๐ All API calls are made to the public TheMealDB API
๐ No sensitive data is stored or transmitted
๐ Uses secure HTTPS connections to external APIs
๐ค Contributing
๐ด Fork the repository
๐ฟ Create a feature branch
โ๏ธ Make your changes
๐งช Test thoroughly
๐ค Submit a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
TheMealDB for providing the free recipe API
Model Context Protocol for the standardized AI-assistant communication protocol
Anthropic for developing MCP
๐ Support & Help
๐ Need Help?
We're here to help you get the most out of your MealDB MCP Server! If you encounter any issues or have questions, here are your options:
๐ง Get Support:
๐ Found a bug? Open an issue in our GitHub repository
๐ก Have a feature request? We'd love to hear your ideas!
โ Need help with setup? Check our troubleshooting guide below or ask for help
๐ Useful Links:
Common Issues & Solutions
๐จ "'docker-compose' is not recognized" Error:
If you see this error when running npm run docker:prod, it means Docker isn't installed on your system. You have two options:
Install Docker Desktop (recommended for containerized deployment):
Download from https://www.docker.com/products/docker-desktop/
Install and restart your computer
Verify with
docker --versionanddocker compose version
Run locally without Docker (simpler setup):
npm install npm run build npm start
๐ง Build or Runtime Issues:
โ Check that Node.js 18+ is installed (
node --version)โ Ensure all dependencies are installed (
npm install)โ Verify the build completed successfully (
npm run build)โ Check that your MCP client is configured correctly
โ Make sure you're in the correct directory
โ Try clearing node_modules and reinstalling:
rm -rf node_modules package-lock.json && npm install
Still having trouble? Don't hesitate to reach out - we're happy to help! ๐ค
Happy Cooking! ๐ณ
Made with โค๏ธ by Traves Theberge
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Recipes MCP โ wraps TheMealDB API (free tier, no auth)
Recipe search, ingredient matching, nutrition filters and a private cookbook for any AI agent.
Search, save, organize, cook, and share recipes with any AI assistant.
Scraps Kitchen gives any AI agent a persistent, household-aware kitchen memory. Unlike generic chatbot recall, Scraps maintains structured cooking data: what's in your fridge (with freshness tracking), who you cook for (with allergens, dietary restrictions, and preferences), your recipe collection (with cook notes and per-diner ratings), your shopping list, and your kitchen equipment. 27 tools across 6 domains let agents read kitchen context, suggest meals that respect dietary safety, update the pantry after cooking, and build a history of what works for your household. Every interaction makes the data richer. Cooking history, preference signals, kitchen awareness = better suggestions next time. All tools work via oAuth and a free scraps.kitchen account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables recipe search, storage, and meal planning using TheMealDB API. Provides comprehensive recipe discovery, automatic recipe collection management, and custom meal plan creation with detailed cooking instructions and ingredients.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Mealie for recipe management, meal planning, and shopping list operations. Supports searching and managing recipes, creating meal plans, and generating shopping lists from recipes or meal plans.9MIT
- AlicenseNot gradedqualityCmaintenanceWraps the TheMealDB API to search for recipes, get full meal details, random meal suggestions, and find recipes by ingredient.67 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables searching for cocktail recipes by name, ingredient, or randomly, and retrieving full cocktail details including ingredients, measurements, and instructions via TheCocktailDB API.72 npmMIT