SQLite Database Manager
STDIOMCP server providing SQLite database management and analysis capabilities.
MCP server providing SQLite database management and analysis capabilities.
A Model Context Protocol (MCP) server that provides comprehensive SQLite database management and analysis capabilities. This server allows LLMs to explore database schemas, query data, perform updates, and conduct statistical analysis.
Schema Exploration
Data Management
Data Analysis
pip install mcp pandas
# Clone this repository or download sqlite_mcp.py directly curl -O https://raw.githubusercontent.com/yourusername/sqlite-mcp/main/sqlite_mcp.py
# Install using MCP CLI mcp install sqlite_mcp.py --name "SQLite Explorer" --env DB_PATH=/path/to/your/database.sqlite
"sqlite_mcp": { "command": "C:\\path\\to\\python.exe", "args": [ "C:\\path\\to\\sqlite-mcp\\server.py" ] }
The server exposes the following MCP resources:
schema://tables
Available tables:
- users
- products
- orders
schema://{table}
Table: users
Create Statement:
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE
)
Columns:
- id (INTEGER) NOT NULL PRIMARY KEY
- name (TEXT) NOT NULL
- email (TEXT)
Execute read-only SQL queries:
SELECT * FROM users LIMIT 5
Perform data modifications:
INSERT INTO users (name, email) VALUES ('John Doe', '[email protected]')
UPDATE users SET email = '[email protected]' WHERE id = 1
Perform statistical analysis on table data:
Parameters:
table
: Name of the table to analyzeanalysis_type
: Either 'basic' or 'detailed'Example response:
{ "row_count": 1000, "column_count": 5, "null_counts": { "id": 0, "name": 0, "email": 15 }, "numeric_columns": { "id": { "mean": 500.5, "std": 288.819, "min": 1, "max": 1000 } } }
The server implements several security measures:
The server provides clear error messages for common issues:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.