Skip to main content
Glama

SQLite MCP Server

by santos-404

SQLite MCP 服务器

使用 TypeScript 实现的模型上下文协议 (MCP) 服务器,用于与 SQLite 数据库交互。该服务器提供了一个交互式界面,用于执行 SQL 查询、管理数据库模式以及整合业务洞察——所有这些都在一个可扩展的协议框架内完成。

不熟悉 MCP?请查看下方“什么是 MCP?”部分。

特征

命令描述例子
list_tables列出 SQLite 数据库上的所有表-
read_query在 SQLite 数据库上执行 SELECT 查询SELECT * FROM users WHERE age > 18

安装和设置

git clone https://github.com/javsanmar5/mcp-server.sqlite.git cd mcp-server.sqlite

由于这尚未作为 npm 包发布,我们将重点介绍 Docker 安装方法:

1.构建Docker镜像

docker build -t mcp/sqlite .

2. 配置你的AI客户端

将以下内容添加到您的 AI 客户端的配置文件中:

"mcpServers": { "sqlite": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "mcp-test:/mcp", "mcp/sqlite", "--db-path", "test_db.sqlite3" ] } }

如果您不知道 json 文件是什么,您可能需要查看客户端配置指南

3. 重启你的AI客户端

重启后,MCP 工具应该会出现在您的 AI 客户端界面中。在 Windows 系统中,您可能需要手动终止该进程以使更改生效。

文档

什么是 MCP?

模型上下文协议 (MCP) 是 AI 模型与外部工具和服务交互的标准化方式。它允许 AI 助手通过定义的协议接口执行诸如运行数据库查询、访问外部 API 或操作文件等操作。

MCP 通过提供对工具和数据源的结构化访问(无需直接集成到 AI 模型本身)将 AI 功能扩展到对话之外。

教程:使用 Claude Desktop 进行设置

Claude Desktop 是众多支持 MCP 服务器的 AI 客户端之一。以下是在 Windows 上设置的方法:

  1. Windows Key + R打开运行对话框
  2. 输入%appdata%\Claude并按 Enter
  3. 如果不存在,请创建一个名为claude_desktop_config.json的新文件
  4. 添加上述设置说明第 2 步中的配置
  5. 保存文件并重新启动Claude Desktop
  6. 您现在应该可以在 Claude 界面中看到 SQLite 工具

执照

该项目已获得 MIT 许可。

贡献

这个项目主要是为了学习而创建的。不过,如果你想贡献代码,请随时提交 Pull 请求,我会审核。

感谢您的关注!

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器实现,使 AI 助手能够执行 SQL 查询并通过结构化界面与 SQLite 数据库交互。

  1. 特征
    1. 安装和设置
      1. 1.构建Docker镜像
      2. 配置你的AI客户端
      3. 重启你的AI客户端
    2. 文档
      1. 什么是 MCP?
      2. 教程:使用 Claude Desktop 进行设置
    3. 执照
      1. 贡献

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.
          Last updated -
          10
          Python
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.
          Last updated -
          20
          Python
          MIT License
          • Linux
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that provides database interaction capabilities through SQLite, enabling users to run SQL queries, analyze business data, and automatically generate business insight memos.
          Last updated -
          6
          9
          TypeScript
          MIT License
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
          Last updated -
          1
          108
          Python
          MIT License
          • Linux
          • Apple

        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/santos-404/mcp-server.sqlite'

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