pgurazada1 commited on
Commit
7626bb0
·
verified ·
1 Parent(s): 77db496

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +5 -0
server.py CHANGED
@@ -4,6 +4,8 @@ import string
4
 
5
  from fastmcp import FastMCP
6
  from pydantic import BaseModel
 
 
7
 
8
  # Create an MCP server
9
  mcp = FastMCP("Airline Agent")
@@ -87,6 +89,9 @@ flight_database = {
87
  itinery_database = {}
88
  ticket_database = {}
89
 
 
 
 
90
 
91
  @mcp.tool()
92
  def fetch_flight_info(date: Date, origin: str, destination: str):
 
4
 
5
  from fastmcp import FastMCP
6
  from pydantic import BaseModel
7
+ from starlette.requests import Request
8
+ from starlette.responses import PlainTextResponse
9
 
10
  # Create an MCP server
11
  mcp = FastMCP("Airline Agent")
 
89
  itinery_database = {}
90
  ticket_database = {}
91
 
92
+ @mcp.custom_route("/health", methods=["GET"])
93
+ async def health_check(request: Request) -> PlainTextResponse:
94
+ return PlainTextResponse("OK")
95
 
96
  @mcp.tool()
97
  def fetch_flight_info(date: Date, origin: str, destination: str):