sqlite-explorer-fastmcp-mcp-server

  • Databases
Python
4
-
security - not tested
F
license - not found
-
quality - not tested

An MCP server that provides safe, read-only access to SQLite databases through 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.

  1. Tools
  2. Prompts
  3. Resources
  4. Server Configuration
  5. README.md

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SQLITE_DB_PATHYesFull path to the SQLite database file you want to explore
README.md

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:

# 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:

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:

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:
{ "sqlite-explorer": { "command": "uv", "args": [ "run", "--with", "fastmcp", "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

GitHub Badge

Glama performs regular codebase and documentation scans to:

  • Confirm that the MCP server is working as expected.
  • Confirm that there are no obvious security issues with dependencies of the server.
  • Extract server characteristics such as tools, resources, prompts, and required parameters.

Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Copy the following code to your README.md file:

Alternative MCP servers

  • A
    security
    A
    license
    A
    quality
    This server enables AI models to interact with MySQL databases through a standardized interface.
    MIT
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities through MCP tools. It would be interesting to have LLM analyze it. DuckDB is suitable for local analysis.
    MIT
    • Apple
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
    MIT