Files
logan 0aeee2b692
CI / Go server (push) Canceled after 0s
CI / Web + core packages (push) Canceled after 0s
CI / Desktop (Tauri) cargo check (push) Canceled after 0s
fix(mcp-npm): v0.1.1 skip npm shim when resolving Go binary
npx installs a bin also named opsxdb-mcp; the launcher now only execs
native ELF/Mach-O/PE binaries so it no longer recurses into itself.
2026-10-15 13:30:05 +08:00

54 lines
1.1 KiB
Markdown

# @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
```bash
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:
```bash
cd server && go build -o ../bin/opsxdb-mcp ./cmd/opsxdb-mcp
```
Put `bin/opsxdb-mcp` on `PATH`, or set:
```bash
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
```json
{
"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