Skip to main content
Glama
rajeevchandra

SQL Query MCP Server

server.py349 B
from fastapi import FastAPI, Request from mcp_ext.resources import mcp, list_tables, run_query app = FastAPI() @app.get("/mcp/table://list") def list_tables_endpoint(): return list_tables() @app.post("/mcp/sql://query") async def run_query_endpoint(request: Request): body = await request.json() return run_query(query=body["query"])

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rajeevchandra/mcp-ollama-postgres'

If you have feedback or need assistance with the MCP directory API, please join our Discord server