SQLite Explorer MCP Server

SQLite Explorer MCP Server

Secure, read-only access to SQLite databases for LLMs via the Model Context Protocol.

93
Stars
24
Forks
93
Watchers
5
Issues
SQLite Explorer MCP Server provides a safe, read-only interface to SQLite databases using the Model Context Protocol (MCP). Built with the FastMCP framework, it enables large language models to explore, query, and retrieve database schema information with robust safety and validation mechanisms. The server exposes structured tools such as read_query, list_tables, and describe_table, ensuring secure and reliable access to database contents. Designed for integration with platforms like Claude Desktop and Cline VSCode Plugin.

Key Features

Read-only access to SQLite databases
Safe query execution with parameter binding
Query validation and sanitization
Row limit enforcement for queries
Tooling for listing tables and describing schemas
Progress output suppression for clean JSON responses
Integration with FastMCP framework
Compatibility with Claude Desktop and Cline VSCode Plugin
Comprehensive developer documentation
Environment variable-based configuration

Use Cases

Enabling large language models to safely query SQLite data
Providing secure, validated database exploration in LLM plugins
Integrating database querying in AI development environments
Extracting database schema information for analysis
Supporting data inspection tasks within LLM workflows
Augmenting LLMs with structured data access for internal tools
Read-only reporting and analytics by AI agents
Assisting in education on safe database operations
Facilitating LLM-powered data validation and consistency checks
Automating schema documentation retrieval for developers

README

MseeP.ai Security Assessment Badge

SQLite Explorer MCP Server

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.

📋 System Requirements

  • Python 3.6+
  • SQLite database file (path specified via environment variable)

📦 Dependencies

Install all required dependencies:

bash
# Using pip
pip install -r requirements.txt

Required Packages

  • fastmcp: Framework for building Model Context Protocol servers

All dependencies are specified in requirements.txt for easy installation.

📑 Table of Contents

🛠️ MCP Tools

The server exposes the following tools to LLMs:

read_query

Execute a SELECT query on the database with built-in safety validations. Features:

  • Query validation and sanitization
  • Parameter binding support
  • Row limit enforcement
  • Results formatted as dictionaries

list_tables

List all available tables in the database with their names.

describe_table

Get detailed schema information for a specific table, including:

  • Column names and types
  • NULL constraints
  • Default values
  • Primary key information

🚀 Getting Started

Clone the repository:

bash
git clone https://github.com/hannesrudolph/sqlite-explorer-fastmcp-mcp-server.git
cd sqlite-explorer-fastmcp-mcp-server

📦 Installation Options

You can install this MCP server in either Claude Desktop or the Cline VSCode plugin. Choose the option that best suits your needs.

Option 1: Install for Claude Desktop

Install using FastMCP:

bash
fastmcp install sqlite_explorer.py --name "SQLite Explorer" -e SQLITE_DB_PATH=/path/to/db

Replace /path/to/db with the path to your SQLite database file.

Option 2: Install for Cline VSCode Plugin

To use this server with the Cline VSCode plugin:

  1. In VSCode, click the server icon (☰) in the Cline plugin sidebar
  2. Click the "Edit MCP Settings" button (✎)
  3. Add the following configuration to the settings file:
json
{
  "sqlite-explorer": {
    "command": "uv",
    "args": [
      "run",
      "--with",
      "fastmcp",
      "--with",
      "uvicorn",
      "fastmcp",
      "run",
      "/path/to/repo/sqlite_explorer.py"
    ],
    "env": {
      "SQLITE_DB_PATH": "/path/to/your/database.db"
    }
  }
}

Replace:

  • /path/to/repo with the full path to where you cloned this repository (e.g., /Users/username/Projects/sqlite-explorer-fastmcp-mcp-server)
  • /path/to/your/database.db with the full path to your SQLite database file

🔒 Safety Features

  • Read-only access to SQLite databases
  • Query validation and sanitization
  • Parameter binding for safe query execution
  • Row limit enforcement
  • Progress output suppression for clean JSON responses

📚 Development Documentation

The repository includes documentation files for development:

  • mcp-documentation.txt: Contains comprehensive documentation about the MCP server implementation and FastMCP framework usage.

This documentation serves as context when developing features and can be used with LLMs to assist in development.

⚙️ Environment Variables

The following environment variables must be set:

  • SQLITE_DB_PATH: Full path to the SQLite database file you want to explore

Star History

Star History Chart

Repository Owner

Repository Details

Language Python
Default Branch main
Size 80 KB
Contributors 2
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Topics

database-tools llm-integration llm-tools mcp python sqlite

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP SQLite Server

    MCP SQLite Server

    A Model Context Protocol server for interacting with SQLite databases.

    MCP SQLite Server enables comprehensive interaction with SQLite databases via the Model Context Protocol. It allows users to perform full CRUD operations, explore database schema, and execute custom SQL queries in a standardized, MCP-compatible way. Designed for integration with modern IDEs, it streamlines database management and introspection for developers and AI model workflows.

    • 65
    • MCP
    • jparkerweb/mcp-sqlite
  • MCP libSQL by xexr

    MCP libSQL by xexr

    Secure, protocol-compliant libSQL database server for MCP-enabled clients.

    MCP libSQL by xexr provides a Model Context Protocol (MCP) server designed for secure database access and management via libSQL. It enables database operations—such as querying, table management, and schema inspection—through standardized MCP tools, ensuring compatibility with clients like Claude Desktop and Cursor. The project emphasizes robust security validation, audit logging, and comprehensive error handling. Users benefit from production-ready deployment, extensive test coverage, and streamlined integration with MCP-compatible platforms.

    • 16
    • MCP
    • Xexr/mcp-libsql
  • MCP 数据库工具 (MCP Database Utilities)

    MCP 数据库工具 (MCP Database Utilities)

    A secure bridge enabling AI systems safe, read-only access to multiple databases via unified configuration.

    MCP Database Utilities provides a secure, standardized service for AI systems to access and analyze databases like SQLite, MySQL, and PostgreSQL using a unified YAML-based configuration. It enforces strict read-only operations, local processing, and credential protection to ensure data privacy and integrity. The tool is suitable for entities focused on data privacy and minimizes risks by isolating database connections and masking sensitive data. Designed for easy integration, it supports multiple installation options and advanced capabilities such as schema analysis and table browsing.

    • 85
    • MCP
    • donghao1393/mcp-dbutils
  • mcp-server-duckdb

    mcp-server-duckdb

    A Model Context Protocol server enabling SQL access to DuckDB databases.

    Implements a Model Context Protocol (MCP) server for DuckDB, allowing structured database interaction via MCP-compliant tools and language models. Offers a unified query tool for executing any SQL statement, with support for read-only mode to ensure data integrity. Flexible configuration options include database path specification and connection management. Easily integrable with applications like Claude Desktop for enhanced local data analysis through LLMs.

    • 171
    • MCP
    • ktanaka101/mcp-server-duckdb
  • Hydrolix MCP Server

    Hydrolix MCP Server

    MCP server for secure, efficient SQL access to Hydrolix clusters.

    Hydrolix MCP Server provides a Model Context Protocol (MCP) interface for executing SQL queries, listing databases, and listing tables on Hydrolix clusters. It ensures safe, read-only data access and includes a standardized health-check endpoint. The server integrates easily with various MCP-compatible clients, supporting multiple authentication methods using either credentials or service account tokens.

    • 5
    • MCP
    • hydrolix/mcp-hydrolix
  • BigQuery MCP Server

    BigQuery MCP Server

    MCP server enabling LLMs to access and interact with BigQuery databases.

    BigQuery MCP Server provides a Model Context Protocol-compliant interface that allows large language models to inspect database schemas and execute SQL queries on BigQuery. It exposes tools for executing queries, listing tables, and describing table schemas, supporting both CLI and environment-based configuration. The server integrates with Claude Desktop and can be easily installed via Smithery, facilitating seamless interaction between LLMs and BigQuery data sources.

    • 120
    • MCP
    • LucasHild/mcp-server-bigquery
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results