Local Database Analytics MCP Server
Provides tools for querying and analyzing a local SQLite database, including listing tables, describing schemas, running SQL queries, aggregating data, and computing statistics.
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., "@Local Database Analytics MCP ServerWhich products are selling the most?"
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.
Local Database Analytics MCP Server
A Python-based Model Context Protocol (MCP) server that exposes a local SQLite e-commerce database to AI assistants like Claude. Built with FastMCP, SQLAlchemy, and Pandas.
What is MCP? The Model Context Protocol (by Anthropic) lets AI models securely interact with local tools and data. This server teaches Claude about your database so it can query, analyze, and explain the data — all using natural language.
Features
Tools (11 total)
Tool | Description |
| List all tables in the database |
| Show schema/columns of a specific table |
| Return N sample rows from a table |
| Count rows with optional WHERE filter |
| Execute any safe SELECT query |
| Stats: min/max/mean/nulls/unique for any column |
| Top N rows sorted by a column |
| GROUP BY + SUM/AVG/COUNT/MIN/MAX |
| Find columns with missing data |
| Pearson correlation between two columns |
| Aggregate data by day/week/month |
Resources
URI | Description |
| Full database schema |
| Schema for a specific table |
Prompts
analyze_table— Full statistical analysis of any tablebusiness_summary— Executive-level e-commerce reportfind_anomalies— Data quality & outlier detection
Related MCP server: SQLite MCP Server
Database Schema
customers ──< orders ──< order_items >── productscustomers: 15 records with name, email, city, signup date
products: 15 products across Electronics, Books, Sports, Home, Stationery
orders: 60 orders with status (completed/pending/cancelled) and totals
order_items: Line items linking orders to products
Project Structure
MCP_Server/
├── server.py # FastMCP server entry point
├── requirements.txt # Python dependencies
├── database/
│ ├── engine.py # SQLAlchemy DB connection
│ └── seed_data.py # Seed script (creates + populates DB)
├── tools/
│ ├── query.py # Core SQL tools (Phase 2)
│ └── analytics.py # Analytics tools (Phase 3)
├── resources/
│ └── schema.py # DB schema as MCP resources
├── prompts/
│ └── templates.py # Pre-built analyst prompts
├── tests/
│ └── test_tools.py # Unit tests
└── data/
└── analytics.db # SQLite database (auto-created)Getting Started
1. Clone the repo
git clone https://github.com/manohar135/Local-Database-Analytics-MCP-Server.git
cd Local-Database-Analytics-MCP-Server2. Create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt3. Seed the database
python database/seed_data.py4. Launch the MCP Inspector (dev mode)
fastmcp dev server.py5. Run tests
pytest tests/ -vTech Stack
Technology | Role |
MCP server framework | |
SQLite | Zero-config local database |
SQLAlchemy | DB engine & ORM |
Pandas | Analytics & aggregation |
Pydantic | Input validation |
Pytest | Unit testing |
Example Claude Conversations
Once connected to Claude Desktop, try:
"What tables do you have access to?"
"Give me a business summary of the sales data"
"Which products are selling the most?"
"Are there any data quality issues in the orders table?"
"Show me monthly revenue trends for the past year"
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 Servers
- Alicense-qualityDmaintenanceEnables Claude to connect to and interact with SQLite, SQL Server, PostgreSQL, and MySQL databases through natural language. Supports executing queries, managing tables, exporting data, and storing business insights with authentication options including AWS IAM.853MIT
- Alicense-qualityDmaintenanceEnables natural language interaction with local SQLite databases through Claude Desktop, translating plain English queries into SQL for data analysis and exploration.3MIT
- Alicense-qualityBmaintenanceEnables LLMs to interact with a SQLite e-commerce database via safe, typed MCP tools with read-only guards and auth-gated mutations, plus a Claude agent for answering business questions.1MIT
- Flicense-qualityCmaintenanceEnables natural-language querying of an e-commerce dataset by providing a LangChain agent that uses tools to execute parameterized SQL queries on a SQLite database, with short-term memory and Streamlit or Claude Desktop interfaces.
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Manage your Savanto store from your AI: catalog, content, prompts, and analytics, by chat.
Amazon brand, seller, niche & buy-box intelligence inside your own Claude or ChatGPT.
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/manohar135/Local-Database-Analytics-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server