SQL Analysis MCP Server
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., "@SQL Analysis MCP ServerAnalyze the logic in sales_report.sql and explain the joins used."
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.
Model Context Protocol (MCP) Server
This project is a simple example of a server that implements the Model Context Protocol (MCP), which tests using "sampling" where available on the MCP client.
Prerequisites
Python 3.x
uv: A fast Python package installer and resolver.
fastmcp: A library for building MCP servers and clients.
Node.js and npm (to use
npx).
Related MCP server: PostgreSQL MCP Server
Installation
Install dependencies:
Use
uvto sync the project's dependencies frompyproject.tomlanduv.lock. This will installfastmcpand other necessary packages.uv sync
Running the Server in Development
To run the server and inspect it with the MCP Inspector tool, execute the following command in your terminal. You can find more information about the inspector tool in the official documentation.
npx @modelcontextprotocol/inspector uv run mcp_server.py -- --sql_path /path/to/your/sql/filesThis command does the following:
npx @modelcontextprotocol/inspector: Downloads and runs the official MCP Inspector.uv run mcp_server.py: The inspector then usesuvto execute themcp_server.pyscript within the project's managed virtual environment.
The inspector will launch in your web browser, providing a user interface to interact with the running MCP server.
Running the Server in Production
In a production environment, an MCP client would connect to the server. The client needs a configuration that tells it how to start and communicate with the server. This is typically done with a JSON configuration file.
You can generate the JSON configuration for this server using the fastmcp command-line tool:
fastmcp install mcp-json mcp_server.py -- --sql_path /path/to/your/sql/filesThis will output a JSON object that you can use to configure an MCP client. The generated configuration for this server will look like this:
{
"mcpServers": {
"sql-analysis-server": {
"command": "uv",
"args": ["run", "mcp_server.py", "--", "--sql_path", "/path/to/your/sql/files"],
"cwd": "/home/your-dev-folder/sql-analysis-mcp-server"
}
}
}This configuration tells the client to start the "sql-analysis-server" by running the command uv run mcp_server.py -- --sql_path /path/to/your/sql/files and to communicate with it using the standard input/output (stdio) transport.
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
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- FlicenseCqualityDmaintenanceA Model Context Protocol server that provides a standardized interface for interacting with SQL databases through the MCP protocol.3204-
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that enables database operations, schema management, and statistics via natural language through SQL queries and resources.38-
- FlicenseNot gradedqualityCmaintenanceAn employee-analytics MCP server backed by SQLite that provides hand-written SQL queries for common analytics tasks like salary ranking and department statistics. It self-seeds sample data, enabling immediate testing of GROUP BY, window functions, NULL handling, and subqueries.-
- FlicenseNot gradedqualityCmaintenanceA generic MCP server for MySQL operations, enabling listing databases/tables, describing schemas, running read-only SQL, and optionally executing write SQL with logging.1-
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/jjdelorme/sql-analysis-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server