Skip to main content
Glama
santos-404

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

Related MCP server: Microsoft SQL Server MCP Server

安装和设置

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

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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