sqlite-explorer-fastmcp-mcp-server
SQLite Explorer MCP 服务器
一个 MCP 服务器,通过模型上下文协议 (MCP) 提供对 SQLite 数据库的安全只读访问。该服务器基于 FastMCP 框架构建,使 LLM 能够利用内置的安全功能和查询验证功能探索和查询 SQLite 数据库。
📋 系统要求
Python 3.6+
SQLite 数据库文件(通过环境变量指定的路径)
Related MCP server: sqlite-mcp-server
📦依赖项
安装所有必需的依赖项:
# 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 插件一起使用:
在 VSCode 中,单击 Cline 插件侧栏中的服务器图标 (☰)
点击“编辑 MCP 设置”按钮 (✎)
在设置文件中添加以下配置:
{
"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 数据库文件的完整路径
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables LLMs to safely explore and query any SQLite database via natural language. It exposes tools for listing tables, describing schemas, and executing SELECT/WITH queries with built-in safety guards like write prevention and row limits.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server enabling natural-language querying of SQLite databases via schema discovery, GraphRAG retrieval, and safely guarded read-only SQL execution.-
- FlicenseNot gradedqualityBmaintenanceA configurable, database-agnostic MCP server that enables LLMs to safely interact with SQL databases through read-only operations and schema inspection.-