MCP SQLite Server

MCP SQLite Server

镜像

smithery 徽章

这是 Model Context Protocol (MCP) SQLite 服务器的 Node.js 版本,为无法使用 Python 的环境提供替代方案。

与 Claude Desktop 配置

方法 1: 使用 Smithery 自动安装

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

方法 2: 手动配置

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"
      }
    }
  }
}

开发测试

本地构建

npm ci
npm run build

测试服务器

使用 MCP Inspector:

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

或配置 Claude Desktop 测试:

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

更多详细信息请参考 Smithery 或项目文档。