Files
logan 2c0bfafd8d 同步完整源码至远程:扁平化重构现状 + 未入库源文件
- 补入库:server/internal/db/dump.go、redis 分页/扫描预算测试、opsxdb-mcp main_test、
  packages/opsxdb-mcp package-lock、docs 审计与对比文档等 37 个新文件
- 含结构扁平化进行中的 80 处修改与 155 处旧结构删除(server/ src/ src-tauri/ 为当前有效源)
- 构建产物(bin/target/dist)与签名私钥仍按规则排除
2026-10-16 03:47:33 +08:00
..

@rlwj-lab/opsxdb-mcp

MCP (Model Context Protocol) launcher for OpsxDB.

This package ships a small Node CLI that spawns the Go opsxdb-mcp binary over stdio. Build the binary from the OpsxDB repo, then point the launcher at it (or put the Go binary on PATH).

The npm bin is also named opsxdb-mcp. The launcher only execs a native Go/ELF/Mach-O/PE binary, so it will not recurse into its own npm shim.

Install

npm i -g @rlwj-lab/opsxdb-mcp
# or
npx -y @rlwj-lab/opsxdb-mcp@0.1.1

Build the Go binary

From the OpsxDB repository:

cd server && go build -o ../bin/opsxdb-mcp ./cmd/opsxdb-mcp

Put bin/opsxdb-mcp on PATH, or set:

export OPSXDB_MCP_BIN=/absolute/path/to/opsxdb-mcp

If the Go binary is missing, the CLI exits with a clear error (not command not found).

Cursor / Claude Desktop

{
  "mcpServers": {
    "opsxdb": {
      "command": "npx",
      "args": ["-y", "@rlwj-lab/opsxdb-mcp"],
      "env": {
        "OPSXDB_MCP_BIN": "/absolute/path/to/opsxdb-mcp"
      }
    }
  }
}

Config: ~/.opsxdb/mcp.json, ~/.opsxdb/connections.json.

License

MIT