miguelgarcia/mcp-server-agent-example
3.1
If you are the rightful owner of mcp-server-agent-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project provides a Model Context Protocol (MCP) server for managing table reservations at a restaurant.
Model Context Protocol (MCP) Server Example
This project provides:
reservations-mcp-svc.py
A service that exposes functions for tables booking using the MCP protocol.main.py
an agent that allows users to book tables. It uses OpenAI's gpt-4o and the functions provided by the MCP server.
Running the MCP server
uv sync
uv run python reservations-mcp-svc.py
Running the agent
uv sync
export OPENAI_API_KEY=...
uv run python main.py
Example conversation
You: Hello !
Hello! How can I assist you today? Are you looking to book a table at our restaurant?
You: I need a table for tomorrow
Sure, I can help with that. How many people will the reservation be for?
You: We are 4 people
Your table for 4 people has been successfully booked for tomorrow, May 20, 2025. Your reservation code is WWN5gn. If you need any further assistance, feel free to ask!
You: Oops, I need to cancel it
Your reservation has been successfully cancelled. If you need any further assistance or wish to make a new reservation, just let me know!