HS

hannesrudolph/sqlite-explorer-fastmcp-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

108 stars 28 forks Качество 56 Тренд 15

hannesrudolph/sqlite-explorer-fastmcp-mcp-server — это кандидат на MCP-сервер, импортированный из https://github.com/hannesrudolph/sqlite-explorer-fastmcp-mcp-server.

Обзор

hannesrudolph/sqlite-explorer-fastmcp-mcp-server — это кандидат на MCP-сервер, импортированный из https://github.com/hannesrudolph/sqlite-explorer-fastmcp-mcp-server.

Обзор (машинный перевод)

MCP-сервер, обеспечивающий безопасный доступ только для чтения к базам данных SQLite с помощью протокола Model Context Protocol (MCP). Этот сервер построен на фреймворке FastMCP, который позволяет LLM исследовать и задавать запросы к базам данных SQLite с встроенными функциями безопасности и проверкой запросов.

📋 Требования к системе

  • Python 3.6+
  • Файл базы данных SQLite (путь, указанный через переменную среды)

📦 Зависимости

Установите все необходимые зависимости:

Обязательные посылки

  • fastmcp: Фреймворк для создания серверов Model Context Protocol

Все зависимости указаны в requirements.txt для удобства установки.

📑 Содержание

  • Требования к системе
  • Зависимости
  • Инструменты MCP
  • Начало работы
  • Варианты установки
  • Claude Desktop
  • Плагин Cline VSCode
  • Функции безопасности
  • Документация по разработке
  • Переменные среды

🛠️ Инструменты MCP

Сервер предоставляет следующие инструменты для LLM:

read_query

Выполните запрос SELECT в базе данных с встроенной проверкой безопасности. Особенности:

  • Проверка и обработка запросов
  • Поддержка связывания параметров
  • Исполнение строкового лимита
  • Результаты, отформатированные в виде словарей

list_tables

Перечислите все доступные таблицы в базе данных с их именами.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

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",
      "--with",
      "uvicorn",
      "fastmcp",
      "run",
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →