pgurazada1 commited on
Commit
6c0c6fc
·
verified ·
1 Parent(s): f8de6be

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +3 -5
server.py CHANGED
@@ -2,8 +2,6 @@ import os
2
  import uvicorn
3
 
4
  from mcp.server.fastmcp import FastMCP
5
- from starlette.requests import Request
6
- from starlette.responses import Response
7
 
8
  from langchain_community.utilities import SQLDatabase
9
  from langchain_community.tools.sql_database.tool import QuerySQLCheckerTool
@@ -23,9 +21,9 @@ mcp = FastMCP("Credit Card Database Server")
23
  credit_card_db = SQLDatabase.from_uri(r"sqlite:///data/ccms.db")
24
  query_checker_tool = QuerySQLCheckerTool(db=credit_card_db, llm=llm)
25
 
26
- @mcp.custom_route("/", methods=["GET"])
27
- def hello(request: Request) -> Response:
28
- return "This is an MCP server tht interfaces with a credit card database"
29
 
30
 
31
  @mcp.tool()
 
2
  import uvicorn
3
 
4
  from mcp.server.fastmcp import FastMCP
 
 
5
 
6
  from langchain_community.utilities import SQLDatabase
7
  from langchain_community.tools.sql_database.tool import QuerySQLCheckerTool
 
21
  credit_card_db = SQLDatabase.from_uri(r"sqlite:///data/ccms.db")
22
  query_checker_tool = QuerySQLCheckerTool(db=credit_card_db, llm=llm)
23
 
24
+ @mcp.get('/')
25
+ def home():
26
+ return Response("This is an MCP server that interfaces with a credit card database")
27
 
28
 
29
  @mcp.tool()