sqlite-explorer-fastmcp
An MCP server that provides safe, read-only access to SQLite databases through Model Context Protocol (MCP). This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.
claude mcp add --transport stdio hannesrudolph-sqlite-explorer-fastmcp-mcp-server uv run --with fastmcp --with uvicorn fastmcp run sqlite_explorer.py \ --env SQLITE_DB_PATH="<path-to-your-database.db>"
How to use
This MCP server provides safe, read-only access to a SQLite database via the Model Context Protocol. It exposes tools that let an LLM explore the schema and execute read-only queries against the database with built-in safety validations, parameter binding, and row-limiting to prevent large or unsafe results. Key tools include read_query for executing SELECT statements with validation, list_tables to enumerate available tables, and describe_table to fetch detailed schema information such as column types, nullability, defaults, and primary keys. To use the server, point your client or environment to the uv-based runtime (as shown in the installation instructions) and supply the path to your SQLite database via the SQLITE_DB_PATH environment variable. The server will enforce read-only access and sanitize queries to prevent unsafe operations.
How to install
Prerequisites:
- Python 3.6+
- Git (optional, for cloning)
- Access to the internet to install dependencies
Option A: Install and run locally
- Clone or download the repository containing sqlite_explorer.py and requirements.txt
- Create and activate a Python environment (recommended):
- python3 -m venv venv
- source venv/bin/activate (Linux/macOS) or venv\Scripts\activate (Windows)
- Install dependencies:
- pip install -r requirements.txt
- Set up your database path (example):
- export SQLITE_DB_PATH=/path/to/your/database.db
- Run the MCP server using the provided uv-based command:
- uv run --with fastmcp --with uvicorn fastmcp run sqlite_explorer.py
- Ensure SQLITE_DB_PATH is set in the environment before starting (the server will read this variable at startup)
Option B: Use Claude Desktop or Cline VSCode plugin (as described in the README)
- Ensure Python and dependencies are installed as in Option A
- Start the server with the appropriate environment variable and command configuration as shown in the README example.
Additional notes
Environment variables:
- SQLITE_DB_PATH: Full path to the SQLite database file to explore. Safety features:
- Read-only access to the database to prevent modifications.
- Query validation and sanitization with parameter binding.
- Row limit enforcement to avoid large payloads.
- Progress output suppression to ensure clean JSON responses. Common issues:
- Ensure SQLITE_DB_PATH is accessible by the user running the server.
- If the server fails to start, verify that Python 3.6+ is installed and dependencies from requirements.txt are installed.
- When using the UVicorn-based runtime, ensure that the uv command is available in your PATH.
Related MCP Servers
langchainjs -adapters
** THIS REPO HAS MOVED TO https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mcp-adapters ** Adapters for integrating Model Context Protocol (MCP) tools with LangChain.js applications, supporting both stdio and SSE transports.
oxylabs
Official Oxylabs MCP integration
sqlite-literature-management-fastmcp
A flexible system for managing various types of sources (papers, books, webpages, etc.) and integrating them with knowledge graphs.
ms-sentinel
MCP server for Microsoft Sentinel. Enables access to Sentinel logs, incidents, analytics, and Entra ID data via a modular, queryable interface. Strictly non-production. Designed for use with Claude and other LLMs.
notifications
A Model Context Protocol (MCP) server that provides notifications for Claude Desktop on macOS. It plays configurable system sounds when Claude completes a task, enhancing user experience by eliminating the need for constant visual monitoring.
openwebui -setup
Universal MCPO/MCP bridge for Open Web UI with AI-powered configuration. Automated setup generation, Docker support, beginner-friendly. Any AI assistant can instantly convert MCP configs to working Open Web UI integrations.