Database Analytics
БесплатноНе проверенProvides SQLite database analytics operations through MCP, enabling AI assistants to connect, query, explore schema, and export data from SQLite databases.
Описание
Provides SQLite database analytics operations through MCP, enabling AI assistants to connect, query, explore schema, and export data from SQLite databases.
README
A practical database analytics MCP server built with FastMCP, providing SQLite database operations through the Model Context Protocol (MCP). Perfect for data analysis workflows with AI assistants like Claude.
What This Server Provides
🛠️ Tools (Interactive Operations)
connect_db- Connect to SQLite database filesexecute_query- Execute SQL queries with safety checkslist_tables- List all tables in the database
📊 Resources (Read-only Data Access)
schema://tables/{table_name}- Get table column information and structuredata://tables/{table_name}- Get sample table data for preview
🔐 Safety Features
- SQL injection prevention with dangerous operation blocking
- Read-only resource access for safe schema exploration
- Comprehensive error handling with descriptive messages
Setup and Installation
Clone the repository:
git clone https://github.com/khuyentran1401/database-analytics-mcp.git cd database-analytics-mcpInstall UV (recommended):
# Install UV if you haven't already curl -LsSf https://astral.sh/uv/install.sh | shInstall dependencies:
# UV automatically manages dependencies from pyproject.toml uv syncTest the server:
uv run example_usage.pyAdd to Claude Code
# Quick setup claude mcp add database-analytics -- uv run database_mcp_server.pyVerify installation:
# Check if the server is registered claude mcp list
Other MCP Clients
For any MCP client that supports the standard protocol:
servers:
- name: database-analytics
transport:
type: stdio
command: uv
args: ["run", "database_mcp_server.py"]
Example Workflows
Data Exploration with Claude Code
Connect to Database
Connect to my SQLite database at ./sample_database.dbExplore Schema
What tables are available in this database?Examine Table Structure
Show me the schema for the users tablePreview Data
Show me some sample data from the users tableRun Analytics Queries
Calculate total sales by product categoryExport Results
Export the query "SELECT product_name, SUM(quantity) as total_sold FROM orders GROUP BY product_name" to CSV file called sales_report.csvGet Table Statistics
Show me statistics for the users table
Common Use Cases
- Database Schema Discovery: Quickly understand database structure
- Data Quality Checks: Sample data to verify data integrity
- Ad-hoc Analysis: Run custom SQL queries safely
- Report Generation: Execute complex analytical queries
- Data Exploration: Browse tables and relationships with pagination
- Data Export: Export query results to CSV for external analysis
- Performance Monitoring: Track query execution times
Available Tools & Resources
Tools (Interactive Operations)
| Tool | Parameters | Description |
|---|---|---|
connect_db |
database_path: str |
Connect to SQLite database file |
execute_query |
sql: str |
Execute SQL query with safety checks and timing |
list_tables |
None | List all tables in connected database |
export_to_csv |
sql: str, filename: str |
Export query results to CSV file |
Resources (Read-only Access)
| Resource URI | Description |
|---|---|
schema://tables/{table_name} |
Get column info, types, constraints, foreign keys |
data://tables/{table_name} |
Get sample rows with pagination, statistics (limit, offset) |
stats://tables/{table_name} |
Get comprehensive table statistics and column analysis |
Установка Database Analytics
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/khuyentran1401/database-analytics-mcpFAQ
Database Analytics MCP бесплатный?
Да, Database Analytics MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Database Analytics?
Нет, Database Analytics работает без API-ключей и переменных окружения.
Database Analytics — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Database Analytics в Claude Desktop, Claude Code или Cursor?
Открой Database Analytics на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Database Analytics with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
