mcp-sqlite
MCP server for SQLite database operations
claude mcp add --transport stdio nhevers-mcp-sqlite python -m mcpsqlite --db data.db
How to use
This MCP server exposes a SQLite database interface via the Model Context Protocol. It lets an AI assistant query, modify, and inspect the database using the provided MCP tools: query for SELECTs and retrieving results, execute for INSERT/UPDATE/DELETE statements, schema to inspect table structures, and tables to list all tables in the database. To use it, start the server (for example with python -m mcpsqlite --db data.db) and then issue MCP tool calls to perform the operations. The server supports parameterized queries to avoid SQL injection and returns results in a structured format suitable for downstream processing by the AI. Use the schema and tables tools to understand the database layout before performing read or write operations, and consider enabling read_only mode if you want to restrict mutations.
How to install
Prerequisites:\n- Python 3.8+ (or compatible Python environment)\n- Access to a shell/terminal\n\nInstallation steps:\n1. Create and activate a Python environment (optional but recommended):\n - python -m venv venv\n - source venv/bin/activate (Linux/macOS) or venv\Scripts\activate (Windows)\n2. Install dependencies listed in requirements.txt:\n - pip install -r requirements.txt\n3. Run the MCP server with a SQLite database path (data.db by default):\n - python -m mcpsqlite --db data.db --port 8080\n4. (Optional) For convenient integration, ensure data.db exists or is created by the server when first run.\n\nNotes:\n- If you modify the database schema, you may need to restart the MCP server to pick up changes.\n- Use the provided MCP tools (query, execute, schema, tables) to interact with the database safely.\n- Consider setting read_only to True if you want to disallow data mutations via the MCP interface.
Additional notes
Tips and common issues:\n- Ensure the database file path is writable by the process running the MCP server.\n- For large result sets, consider using limit/offset in queries or enabling max_rows to cap returned rows.\n- When using parameterized queries, pass parameters as a list under the arguments.params field.\n- If the server fails to start, verify Python version compatibility and that the required dependencies are installed from requirements.txt.\n- The MCP tools return results in a structured format; parse the output to extract rows, column types, and metadata as needed for your agent.
Related MCP Servers
mysql_mcp_server
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
skill-to
Convert AI Skills (Claude Skills format) to MCP server resources - Part of BioContextAI
Convert-Markdown-PDF
Markdown To PDF Conversion MCP
mcp-local-analyst
Talk to your data locally 💬📊. A private AI Data Analyst built with the Model Context Protocol (MCP), Ollama, and SQLite. Turn natural language into SQL queries without data leaving your machine. Includes a Dockerized Streamlit UI