Goodbook MCP Server
A modern Model Context Protocol (MCP) server that works exclusively with PDF files containing food service standards and preparation guidelines. Built following MCP best practices with robust input validation and error handling.
Overview
The Goodbook MCP server allows AI assistants to query and retrieve information from food service documentation, including:
- Food preparation standards
- Cooking guidelines and methods
- Food safety information
- Recipe standards
- Hygiene and sanitation requirements
Modern Architecture
This server follows current MCP best practices:
- Zod input validation for all tool parameters
- Proper STDIO usage with
console.error
for logging - Robust error handling with detailed error messages
- Optimized tool definitions with automatic schema conversion
- Comprehensive synonym support for Russian cooking terms
- Clean separation of concerns between parsing, validation, and execution
Features
Available Tools
- search_food_standards: Search for specific food preparation standards, recipes, or cooking guidelines
- get_cooking_guidelines: Get cooking guidelines and standards for specific dishes or cooking methods
- list_sections: List all available sections in the food service standards document
- get_section_content: Get content from a specific section of the food standards document
- get_food_safety_info: Get food safety information and hygiene standards
- find_recipe_standards: Find standardized recipes and preparation methods for specific dishes
Installation
- Ensure you have Node.js 18+ installed
- Clone or download this project
- Install dependencies:
- REQUIRED: Place your PDF file named
menu.pdf
in the root directory
Usage
Running the Server
The server will start and listen for MCP protocol messages via stdio.
Development Mode
This will start the server with auto-reload on file changes.
MCP Client Configuration
To use this server with an MCP-compatible client, add the following configuration:
Claude Desktop Configuration
Add to your claude_desktop_config.json
:
Other MCP Clients
Configure your MCP client to run:
Tool Usage Examples
Search for Food Standards
Get Cooking Guidelines
Food Safety Information
File Structure
Requirements
- Node.js 18.0.0 or higher
- PDF document (
menu.pdf
) containing food service standards - MCP-compatible client (like Claude Desktop)
Error Handling
The server includes comprehensive error handling for:
- PDF parsing failures
- Missing sections
- Invalid search queries
- Tool execution errors
All errors are returned as structured responses to the MCP client.
Development
Adding New Tools
- Add tool definition to
getToolDefinitions()
intools.js
- Implement handler method in
GoodbookTools
class - Add case to
handleTool()
switch statement
Modifying PDF Parsing
Edit the PDFParser
class in pdf-parser.js
to:
- Change section detection patterns
- Modify content extraction logic
- Add new search capabilities
License
MIT License
Support
For issues or questions, please check the error logs when running the server. The server outputs detailed logging information to help diagnose problems.
This server cannot be installed
A modern Model Context Protocol (MCP) server that works exclusively with PDF files containing food service standards and preparation guidelines. Built following MCP best practices with robust input validation and error handling.