Update server.py
Browse files
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.
|
| 27 |
-
def
|
| 28 |
-
return "This is an MCP server
|
| 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()
|