LiteDB Advance MCP服务器(litedb-adv-mcp)
等级 模型上下文协议(MCP) 服务器 LiteDB v5,写在 C#13/。净值9.
此服务器将LiteDB作为LLM工具(Cursor、Cline、Claude Code、MCP Inspector)的丰富MCP表面公开,包括:
- 管理/数据库工具(
db.open,db.stats,db.backup,db.rebuild,db.pragmas.*,db.health) - 收藏工具(
col.list/create/drop/rename/stats) - 文档工具(
doc.insert/insertMany/upsert/update/delete/find/findById/count/aggregate) - 索引工具(
idx.list/ensure/drop) - SQL和诊断(
sql.execute,sql.explain,expr.validate) - 交易记录(
txn.begin/commit/rollback) - 文件存储(
fs.list/upload/download/delete/find) - 进口/出口(
export.json,import.json,dump.database,restore.database) - 模式智能(
schema.infer) - 只读MCP资源(
litedb://{alias}/info,/collections,/schema/{collection},/sample/{collection},litedbfs://{alias}/files) - 内置提示(
how_to_query,how_to_index,how_to_filestorage,safety_notes)
此回购由 “LiteDB Advance MCP服务器规范” 定义完整需求、工具目录、资源、提示和非功能约束的文档。
技术栈
- C#13上。NET 9(LTS(如果可用))
- LiteDB v5(v5文件格式,加密和未加密)
- 基于stdio的MCP(JSON-RPC,例如StreamJsonRpc),可选HTTP传输
Microsoft.Extensions.Logging+可选Serilog/OpenTetry- xUnit v3 + FluentAssertions + 封面
- GitHub操作CI/CD,MIT许可证
项目布局(规划)
/src/LiteDB-Adv-MCP.Server # MCP host, transports, entry points
/src/LiteDB-Adv-MCP.Core # core domain, options, validators, errors
/src/LiteDB-Adv-MCP.LiteDb # LiteDB adapters, connection mgmt, diagnostics
/src/LiteDB-Adv-MCP.Tools # MCP tool implementations
/src/LiteDB-Adv-MCP.Resources # MCP resources/resolvers
/src/LiteDB-Adv-MCP.Prompts # built-in MCP prompts/templates
/tests/LiteDB-Adv-MCP.Tests # xUnit v3 tests (unit + integration)
/examples # Cursor/Cline/Claude Code/Inspector configs
/.github/workflows # CI/CD pipelines