MCP SQLite Server

local-only server

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

Integrations

  • Implements a Model Context Protocol server for SQLite databases, allowing AI assistants to query and interact with SQLite databases

MCP SQLite 服务器

基于官方 Python 参考 的模型上下文协议 SQLite 服务器的 Node.js 实现。此版本为 Python 的 UVX 运行器不可用的环境(例如LibreChat )提供了基于 npx 的替代方案。

与 Claude Desktop 一起使用

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 MCP SQLite Server:

npx -y @smithery/cli install mcp-server-sqlite-npx --client claude

手动安装

将以下内容添加到claude_desktop_config.json

{ "mcpServers": { "sqlite": { "command": "/absolute/path/to/npx", "args": [ "-y", "mcp-server-sqlite-npx", "/absolute/path/to/database.db" ], "env": { "PATH": "/absolute/path/to/executables", "NODE_PATH": "/absolute/path/to/node_modules" } } } }

在 macoS 上使用 nvm 的完整示例:

{ "mcpServers": { "sqlite": { "command": "/Users/{username}/.nvm/versions/node/v22.12.0/bin/npx", "args": [ "-y", "mcp-server-sqlite-npx", "/Users/{username}/projects/database.db" ], "env": { "PATH": "/Users/{username}/.nvm/versions/node/v22.12.0/bin:/usr/local/bin:/usr/bin:/bin", "NODE_PATH": "/Users/{username}/.nvm/versions/node/v22.12.0/lib/node_modules" } } } }

在 Windows 上使用 nvm 的完整示例:

{ "mcpServers": { "sqlite": { "command": "C:\\Program Files\\nodejs\\npx.cmd", "args": [ "-y", "mcp-server-sqlite-npx", "C:\\Users\\{username}\\projects\\database.db" ], "env": { "PATH": "C:\\Program Files\\nodejs;%PATH%", "NODE_PATH": "C:\\Program Files\\nodejs\\node_modules" } } } }

发展

  1. 安装依赖项:
npm ci
  1. 构建 TypeScript 代码:
npm run build

使用 MCP Inspector 进行测试

您可以使用MCP Inspector 工具测试服务器:

npx @modelcontextprotocol/inspector node dist/index.js /absolute/path/to/database.db

Connect并转到Tools以开始使用服务器。

使用 Claude Desktop 进行测试

将以下内容添加到claude_desktop_config.json

{ "mcpServers": { "sqlite": { "command": "/absolute/path/to/node", "args": [ "/absolute/path/to/dist/index.js", "/absolute/path/to/database.db" ] } } }

例子:

  • /absolute/path/to/node/Users/{username}/.nvm/versions/node/v20.18.1/bin/node版本/节点/v20.18.1/bin/节点
  • /absolute/path/to/index.js : /Users/{username}/projects/mcp-server-sqlite-npx/dist/index.js
  • /absolute/path/to/database.db : /Users/{用户名/Users/{username}/projects/database.db

发布

  • 在 package.json 中增加版本
  • npm install
  • 提交消息: Release {version, eg 0.1.6}
-
security - not tested
F
license - not found
-
quality - not tested

使用 SQLite 的模型上下文协议服务器的 Node.js 实现,为缺少 Python 的 UVX 运行器的环境提供基于 npx 的替代方案。

  1. Use with Claude Desktop
    1. Installing via Smithery
    2. Installing Manually
  2. Development
    1. Testing with MCP Inspector
    2. Testing with Claude Desktop
    3. Publish
ID: g0zgwpqegg