mcp-sqlite
These are MCP server implementations for accessing a SQLite database in your MCP client. There is both a SDIO and a SSE implementation.
claude mcp add --transport stdio prayanks-mcp-sqlite-server python -u sqlite_mcp_server.py \ --env MCP_LOG_LEVEL="DEBUG (optional, defaults to INFO)" \ --env SQLITE_DB_PATH="path/to/your/sqlite.db (optional if using a relative path in code)"
How to use
This MCP server is a Python-based service that connects to a SQLite database containing startup funding data. It exposes table schemas as MCP resources, provides a read-only SQL query tool, and ships with prompt templates to assist language models in generating data analysis insights. Clients interact using MCP's STDIO protocol by sending JSON-RPC messages and receiving structured responses. You can inspect the available resources, run safe read-only SQL queries, and leverage prompts to frame data analysis tasks such as describing tables, analyzing funding patterns, or explaining specific queries.
To use the server, start it via Python (as shown in the installation steps). Then access resources with endpoints like schema://sqlite/all or schema://sqlite/startups to fetch table schemas. Use the sql_query tool to execute read-only SELECT statements (e.g., SELECT * FROM startups WHERE funding_amount > 10000000;). Prompts such as analyze_table_prompt and describe_query_prompt help generate analysis templates or explanations for given queries. The server communicates through STDIO, enabling straightforward integration with MCP clients and LLM workflows without needing a separate HTTP server.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Optional: Python venv or virtual environment tooling
- Internet access to install dependencies
- Create and activate a virtual environment (recommended)
- macOS/Linux: python -m venv venv source venv/bin/activate
- Windows: python -m venv venv venv\Scripts\activate
- Install the MCP CLI extras and dependencies
pip install "mcp[cli]"
-
Prepare the SQLite database you want to expose (ensure it exists). If you don’t have one, create it as described in the repository (sample scripts may be provided).
-
Save the server code (as shown in the README) as sqlite_mcp_server.py and ensure it can access your SQLite database (via a path or environment variable).
-
Run the MCP server
python sqlite_mcp_server.py
Optional (using uv for Python/uv):
uv run sqlite_mcp_server.py
- (Optional) Install into Claude Desktop using the sample script
python install_to_claude.py
- If you configure Claude Desktop, update the config with an entry similar to:
{
"mcpServers": {
"sqlite_mcp_server": {
"command": "python",
"args": ["-u", "/absolute/path/to/sqlite_mcp_server.py"]
}
}
}
Restart Claude Desktop after saving the config.
Additional notes
Tips and considerations:
- Ensure the SQLite database is accessible at runtime and that your server code points to the correct path (env var usage is common to avoid hardcoding paths).
- The server exposes schemas via schema://sqlite/{table} and a full schema map at schema://sqlite/all. Use these to understand table structures before querying.
- The sql_query tool is read-only and should only receive SELECT statements for safety.
- Logging is handled with Python's logging module; you can adjust the log level and output file as needed (see the example in the README).
- If you plan to deploy in Claude Desktop or similar environments, provide absolute paths to the server script or use the -u flag for unbuffered output to improve responsiveness.
- MCP clients expect STDIO-based communication; ensure your client invokes the server using the MCP protocol expectations (send JSON-RPC requests and parse responses).
- The repository mentions prompt templates such as analyze_table_prompt and describe_query_prompt; customize these prompts to fit your data domain (startup funding) for better model guidance.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.