SQLGenius
Allows querying Google BigQuery databases using natural language and executing validated SQL queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQLGeniusShow me the top 5 customers by revenue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SQLGenius - AI-Powered SQL Assistant
SQLGenius is an intelligent SQL assistant that helps you query your BigQuery database using natural language. Built with MCP (Model Context Protocol), Vertex AI's Gemini Pro, and Streamlit.
๐ Features
Natural language to SQL conversion using Gemini Pro
Interactive Streamlit UI with multiple tabs
Real-time query execution and visualization
Database schema explorer
Query history tracking
Safe query validation
BigQuery integration
MCP-based architecture
Related MCP server: nl2sql-mcp
๐ฅ Demo
Watch SQLGenius in action! Here's a quick demo of how to use the application:

In this demo, you can see:
Natural language query conversion to SQL
Interactive data visualization
Schema exploration
Query history tracking
๐ Installation
Clone the repository and navigate to the project directory:
cd sql_mcp_serverInstall dependencies:
pip install -r requirements.txtCopy the
.env.examplefile to.envand fill in your configuration:
cp .env.example .envSet up your environment variables in
.env:
PROJECT_ID=your-project-id
DATASET_ID=your-dataset-id
GOOGLE_APPLICATION_CREDENTIALS=path/to/your/service-account.json
VERTEX_AI_LOCATION=us-central1๐ฎ Usage
Start the application:
streamlit run streamlit_app.pyThe MCP server will start automatically when the Streamlit app launches
Use the tabs to:
Ask natural language questions about your data
Write SQL queries directly
Explore your database schema
๐ Interface Tabs
๐ฌ Natural Language Query
Ask questions in plain English and get SQL results:
"Show me the top 5 customers by revenue"
"What products have the highest sales in January?"
"How many orders were placed last month?"
๐ SQL Query
Write and execute SQL queries directly:
SELECT * FROM orders
WHERE order_date > '2023-01-01'
ORDER BY total_amount DESC
LIMIT 10๐ Database Explorer
Browse available tables
View table schemas
See sample data from any table
๐ Security Features
Only SELECT queries are permitted
Query validation to prevent dangerous operations
Secure credential management
Error handling and input validation
๐ ๏ธ Architecture
SQLGenius uses the Model Context Protocol (MCP) to expose tools that enable:
Natural Language Processing: Convert English questions to SQL
Data Exploration: Fetch schema information and sample data
SQL Execution: Run validated queries against your database
The architecture consists of:
MCP Server: Handles DB connection and provides tools
Streamlit Frontend: User interface for interacting with the system
Vertex AI (Gemini Pro): Powers natural language understanding
BigQuery: Executes SQL queries on your data
๐ MCP Tools
The following MCP tools are available:
execute_nl_query: Execute a natural language queryexecute_sql_query: Execute a raw SQL querylist_tables: List all available tablesget_table_schema: Get schema for a specific table
๐ Advanced Usage
To add custom tools to the MCP server:
Edit the
register_tools()method insql_mcp_server.pyAdd your custom tool using the
@self.tool()decoratorRestart the server
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze dataโenabling direct access to enterprise analytics data without requiring manual SQL coding.
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP (Model Context Protocol) server that exposes natural language to SQL functionality, allowing any MCP-compatible client to convert plain English questions into SQL queries for database interaction using AI.3MIT
- FlicenseNot gradedqualityFmaintenanceA production-ready MCP server that transforms natural language into safe, executable SQL queries with multi-database support and intelligent schema analysis.1-
- AlicenseNot gradedqualityDmaintenanceProduction-ready MCP server for BigQuery that translates natural language questions to SQL, executes queries securely, and delivers results via stdio or HTTP for integration with GitHub Copilot, Power BI, and web applications.237MIT
- AlicenseAqualityDmaintenanceA database-agnostic MCP server that enables natural language queries to your database through Claude or Copilot, automatically writing and executing SQL.816MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/pawankumar94/SQL_MCP_Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server