Update server.py
Browse files
server.py
CHANGED
|
@@ -2,6 +2,8 @@ import os
|
|
| 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
|
|
@@ -22,7 +24,7 @@ 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.custom_route("/", methods=["GET"])
|
| 25 |
-
def hello() ->
|
| 26 |
return "This is an MCP server tht interfaces with a credit card database"
|
| 27 |
|
| 28 |
|
|
|
|
| 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
|
|
|
|
| 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 |
|