Skip to content

miguelgarcia/mcp-server-agent-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Model Context Protocol (MCP) Server and Agent Example using LangGraph and FastMCP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages