Skip to main content
Glama

sqlite-explorer-fastmcp-mcp-server

SQLite Explorer MCP 服务器

一个 MCP 服务器,通过模型上下文协议 (MCP) 提供对 SQLite 数据库的安全只读访问。该服务器基于 FastMCP 框架构建,使 LLM 能够利用内置的安全功能和查询验证功能探索和查询 SQLite 数据库。

📋 系统要求

  • Python 3.6+
  • SQLite 数据库文件(通过环境变量指定的路径)

📦依赖项

安装所有必需的依赖项:

# Using pip pip install -r requirements.txt

所需软件包

  • fastmcp :构建模型上下文协议服务器的框架

所有依赖项均在requirements.txt中指定,以方便安装。

📑 目录

🛠️ MCP 工具

服务器向 LLM 公开以下工具:

读取查询

使用内置安全验证在数据库上执行 SELECT 查询。功能:

  • 查询验证和清理
  • 参数绑定支持
  • 行限制执行
  • 结果格式化为字典

列表表

列出数据库中所有可用的表及其名称。

描述表

获取特定表的详细架构信息,包括:

  • 列名和类型
  • NULL 约束
  • 默认值
  • 主键信息

🚀 入门

克隆存储库:

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

📦安装选项

您可以在 Claude Desktop 或 Cline VSCode 插件中安装此 MCP 服务器。请选择最符合您需求的选项。

选项 1:安装 Claude Desktop

使用 FastMCP 安装:

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

/path/to/db替换为您的 SQLite 数据库文件的路径。

选项 2:安装 Cline VSCode 插件

要将此服务器与Cline VSCode 插件一起使用:

  1. 在 VSCode 中,单击 Cline 插件侧栏中的服务器图标 (☰)
  2. 点击“编辑 MCP 设置”按钮 (✎)
  3. 在设置文件中添加以下配置:
{ "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" } } }

代替:

  • /path/to/repo为您克隆此存储库的完整路径(例如, /Users/username/Projects/sqlite-explorer-fastmcp-mcp-server
  • /path/to/your/database.db为您的 SQLite 数据库文件的完整路径

🔒 安全功能

  • 对 SQLite 数据库的只读访问
  • 查询验证和清理
  • 安全查询执行的参数绑定
  • 行限制执行
  • 抑制进度输出以获得干净的 JSON 响应

📚 开发文档

该存储库包括用于开发的文档文件:

  • mcp-documentation.txt :包含有关 MCP 服务器实现和 FastMCP 框架使用的全面文档。

该文档在开发功能时可作为上下文,并可与 LLM 一起使用以协助开发。

⚙️ 环境变量

必须设置以下环境变量:

  • SQLITE_DB_PATH :要探索的 SQLite 数据库文件的完整路径
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

一个 MCP 服务器,通过 MCP 提供对 SQLite 数据库的安全只读访问。该服务器基于 FastMCP 框架构建,使 LLM 能够利用内置的安全功能和查询验证功能探索和查询 SQLite 数据库。

  1. 📋 系统要求
    1. 📦依赖项
      1. 所需软件包
    2. 📑 目录
      1. 🛠️ MCP 工具
        1. 读取查询
        2. 列表表
        3. 描述表
      2. 🚀 入门
        1. 📦安装选项
          1. 选项 1:安装 Claude Desktop
          2. 选项 2:安装 Cline VSCode 插件
        2. 🔒 安全功能
          1. 📚 开发文档
            1. ⚙️ 环境变量

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                An MCP server that integrates with MySQL databases, enabling secure read and write operations through LLM-driven interfaces with support for transaction handling and performance monitoring.
                Last updated -
                48
                3
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                DButils is an all-in-one MCP service that enables your AI to do data analysis by accessing versatile types of database (sqlite, mysql, postgres, and more) within a unified connection configuration in a safe way.
                Last updated -
                69
                Python
                MIT License
                • Linux
                • Apple
              • A
                security
                A
                license
                A
                quality
                An MCP server that provides read-only access to MySQL databases.
                Last updated -
                4
                419
                17
                JavaScript
                MIT License
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                Open source MCP server specializing in easy, fast, and secure tools for Databases.
                Last updated -
                1,462
                Go
                Apache 2.0
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/hannesrudolph/sqlite-explorer-fastmcp-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server