
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
sqlite-mcp-server
Advanced tools
SQLite MCP Server - A Model Context Protocol server for SQLite database operations
一个基于 Model Context Protocol (MCP) 的 SQLite 数据库服务器,可以通过 npx 直接运行。
npx
一键启动,无需复杂安装# 使用默认数据库 (test.db)
npx sqlite-mcp-server
# 指定自定义数据库路径
npx sqlite-mcp-server --db_path ./my_database.db
npm install -g sqlite-mcp-server
sqlite-mcp-server --db_path ./my_database.db
本包会自动安装以下 Python 依赖:
fastmcp
(当前版本: 2.5.1)mcp
如果自动安装失败,可以手动安装:
pip install fastmcp mcp
sqlite-mcp-server [选项]
选项:
--db_path <路径> SQLite 数据库文件路径 (默认: test.db)
--help, -h 显示帮助信息
# 启动服务器,使用默认数据库
npx sqlite-mcp-server
# 使用自定义数据库路径
npx sqlite-mcp-server --db_path ./data/my_app.db
# 使用内存数据库
npx sqlite-mcp-server --db_path ":memory:"
服务器提供以下 MCP 工具:
read_query
执行 SELECT 查询语句
# 示例
read_query("SELECT * FROM users WHERE age > 18")
write_query
执行 INSERT、UPDATE 或 DELETE 语句
# 示例
write_query("INSERT INTO users (name, age) VALUES ('张三', 25)")
write_query("UPDATE users SET age = 26 WHERE name = '张三'")
write_query("DELETE FROM users WHERE age < 18")
create_table
创建新表
# 示例
create_table("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)")
list_tables
列出数据库中的所有表
# 示例
list_tables()
describe_table
获取指定表的结构信息
# 示例
describe_table("users")
sqlite-mcp-server/
├── bin/
│ └── sqlite-mcp-server.js # Node.js 包装器
├── scripts/
│ └── install-python-deps.js # 依赖安装脚本
├── python/
│ ├── sqlite.py # 主要的 Python MCP 服务器
│ ├── log.py # 日志工具
│ └── requirements.txt # Python 依赖
├── package.json
└── README.md
# 克隆项目
git clone https://github.com/yourusername/sqlite-mcp-server.git
cd sqlite-mcp-server
# 安装依赖
npm install
# 运行
npm start
Error: Python not found. Please install Python 3.8 or higher.
解决方案: 安装 Python 3.8+ 并确保在 PATH 中可用。
Failed to install some Python dependencies
解决方案: 手动安装依赖:
pip install -r python/requirements.txt
在某些系统上可能需要使用 sudo
或管理员权限:
sudo npm install -g sqlite-mcp-server
MIT License
欢迎提交 Issue 和 Pull Request!
FAQs
SQLite MCP Server - A Model Context Protocol server for SQLite database operations
The npm package sqlite-mcp-server receives a total of 550 weekly downloads. As such, sqlite-mcp-server popularity was classified as not popular.
We found that sqlite-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.