@anshuman.sengar/unicommerce-mongo-mcp-server
v1.1.1
Published
MCP server for Uniware MongoDB (tenant + common) with auto SSH tunnel via jumpbox
Readme
Uniware Mongo MCP Server
MCP server for Uniware MongoDB (tenant + common) with auto SSH tunnel via jumpbox.
Uses MongoDB Node driver 3.7 so both tenant mongo 4.4 and common mongo 3.2 work through the same MCP.
Install (npm)
npx @anshuman.sengar/unicommerce-mongo-mcp-server@latestThe npm package ships code only. Each developer keeps two local config files (never published):
| File | Env var | Purpose |
|------|---------|---------|
| ~/.cursor/ssh-tunnel.json | MONGO_SSH_TUNNEL | Jumpbox SSH credentials |
| ~/.cursor/mongo-servers.json | MONGO_SERVER_CATALOG | Cloud → mongo host mapping |
Copy the catalog shape from config/mongo-servers.example.json in this repo, or get the real mongo-servers.json from your team lead / internal wiki.
Cursor setup
Add to ~/.cursor/mcp.json:
"mongo-agent": {
"command": "npx",
"args": ["-y", "@anshuman.sengar/[email protected]"],
"env": {
"LOG_LEVEL": "warn",
"MONGO_SSH_TUNNEL": "/Users/you/.cursor/ssh-tunnel.json",
"MONGO_SERVER_CATALOG": "/Users/you/.cursor/mongo-servers.json"
}
}Restart Cursor after editing mcp.json.
Local development
npm install && npm run buildPlace config/mongo-servers.json locally (gitignored). Reuse MySQL MCP jumpbox file:
export MONGO_SSH_TUNNEL=/path/to/ssh-tunnel.json
export MONGO_SERVER_CATALOG=/path/to/Mongo_MCP/config/mongo-servers.json
npm run mcpRegenerate catalog from jumpbox (maintainers only):
MONGO_SSH_TUNNEL=~/.cursor/ssh-tunnel.json npm run audit-catalogUsage
connect_mongo({ name: "ecloud1", serverName: "ECloud1-tenant" })
find_documents({ database: "mosaicwellnesspvtlmt", collection: "channelInventoryUpdateSnapshot", limit: 5 })
list_catalog_servers()
list_collections({ database: "mosaicwellnesspvtlmt" })Common mongo: connect_mongo({ serverName: "common", name: "common" }) then query database uniware.
Publish to npm (public)
Infra catalog is not included in the package.
npm run pack:check
npm publish --access public