{"_id":"@apexradius/apex-data-mcp","_rev":"6-6dc0334a980ba04928ac860531276839","name":"@apexradius/apex-data-mcp","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@apexradius/apex-data-mcp","version":"1.0.0","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"author":{"name":"Apex Radius Labs"},"license":"MIT","_id":"@apexradius/apex-data-mcp@1.0.0","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"homepage":"https://github.com/apexradius/apex-data-mcp#readme","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"bin":{"apex-data-mcp":"dist/index.js"},"dist":{"shasum":"1c280690bf4fcbc83a48de450622617ef97909a5","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-1.0.0.tgz","fileCount":24,"integrity":"sha512-yN8e4JGTw4JqCynfun+kjArj/m6ACLDzrShIo/jXlK/puLA4d61+G1JrFVud2tbJfvIDTedZrP2wjzYeiFB7BQ==","signatures":[{"sig":"MEUCIQDfoxAJcfvHuqNacMepMRAv0x01xDuIv7lIfShoUInLZgIgITAQ03pNryKaT9Oa5oz5mvhezOQCEwS3ca6CT7d3HFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64376},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"c437afaa9e9524fb80e6b89152ef13d73982f450","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"repository":{"url":"git+https://github.com/apexradius/apex-data-mcp.git","type":"git"},"_npmVersion":"11.12.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","directories":{},"_nodeVersion":"25.8.1","dependencies":{"pg":"^8.11.0","zod":"^3.23.0","ssh2":"^1.15.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@types/ssh2":"^1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/apex-data-mcp_1.0.0_1775966157378_0.8944668154662327","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@apexradius/apex-data-mcp","version":"1.0.1","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"author":{"name":"Apex Radius Labs"},"license":"MIT","_id":"@apexradius/apex-data-mcp@1.0.1","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"homepage":"https://github.com/apexradius/apex-data-mcp#readme","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"bin":{"apex-data-mcp":"dist/index.js"},"dist":{"shasum":"55382f771cbe57ac1127efc583fc88e4c2c9d1e9","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-1.0.1.tgz","fileCount":24,"integrity":"sha512-w1b9ddjgwKkh16wg9/Kdq4QBfbEv9M3IcKzmfvtnvBsAqT3Lbih0y281z0WkCGeiyPTJcPRK2UlI9bNBfBLNuw==","signatures":[{"sig":"MEQCIC6EYL4pjLKhV72NQYyNO3k1SUbsIMYEUZkZ6hfw+05XAiBIz8hqnqIY4fqqmxrY2e+SMeXiRAg1ZbI+8C/uu2s4yQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64376},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"c437afaa9e9524fb80e6b89152ef13d73982f450","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"repository":{"url":"git+https://github.com/apexradius/apex-data-mcp.git","type":"git"},"_npmVersion":"11.12.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","directories":{},"_nodeVersion":"25.8.1","dependencies":{"pg":"^8.11.0","zod":"^3.23.0","ssh2":"^1.15.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@types/ssh2":"^1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/apex-data-mcp_1.0.1_1775966331652_0.9494608004902332","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@apexradius/apex-data-mcp","version":"2.0.0","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"author":{"name":"Apex Radius Labs"},"license":"MIT","_id":"@apexradius/apex-data-mcp@2.0.0","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"homepage":"https://github.com/apexradius/apex-data-mcp#readme","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"bin":{"apex-data-mcp":"dist/index.js"},"dist":{"shasum":"24f1b5d34597b512e2b1acd916c6a5bce4ac19b8","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-2.0.0.tgz","fileCount":57,"integrity":"sha512-jOjw6+fsv5a5QWEt6UFA9htAN6/wFmszCjnNKOkaJI9RP9tnGjaHl24v2e1PKGDxFRCYbMHl7yGIpHtF6O55qQ==","signatures":[{"sig":"MEQCIAVP34rRUGpBy14ZFhHgutt7Ur3LlB44e0ipZaGnGcAXAiBcutonzAfASrUq33zLu8glx8mV7C2ECpukXjTWgApcEg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":188734},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"59133a5def5236e4efebb25a652df2a2d4f049bc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"repository":{"url":"git+https://github.com/apexradius/apex-data-mcp.git","type":"git"},"_npmVersion":"11.12.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","directories":{},"_nodeVersion":"25.8.1","dependencies":{"pg":"^8.11.0","zod":"^3.23.0","ssh2":"^1.15.0","@modelcontextprotocol/sdk":"^1.0.0","@apexradius/apex-mcp-shared":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@types/ssh2":"^1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/apex-data-mcp_2.0.0_1776146611505_0.4627333588916773","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@apexradius/apex-data-mcp","version":"2.1.0","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"author":{"name":"Apex Radius Labs"},"license":"MIT","_id":"@apexradius/apex-data-mcp@2.1.0","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"homepage":"https://github.com/apexradius/apex-data-mcp#readme","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"bin":{"apex-data-mcp":"dist/index.js"},"dist":{"shasum":"8fc218299660e07f8f88e074c247b26c28d13afb","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-2.1.0.tgz","fileCount":57,"integrity":"sha512-mBtgJAPk2cb8uide+nZzFUE/V6si17XszvNc5wQo+bonTE9Ri/w6WkdMvqOg5gRJfhGbSHvMna5lpYC9luxKUA==","signatures":[{"sig":"MEUCIQCyUqtxu3cl21TZbPlnh5tPSix8bv1pY/q5RJRCBv7s4gIgJgzdp4oTJQd2MztsQ/hbHrJ7g0A2ii+P0d6mGMjzPYE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":193024},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"59133a5def5236e4efebb25a652df2a2d4f049bc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"repository":{"url":"git+https://github.com/apexradius/apex-data-mcp.git","type":"git"},"_npmVersion":"11.12.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","directories":{},"_nodeVersion":"25.8.1","dependencies":{"pg":"^8.11.0","zod":"^3.23.0","ssh2":"^1.15.0","@modelcontextprotocol/sdk":"^1.0.0","@apexradius/apex-mcp-shared":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@types/ssh2":"^1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/apex-data-mcp_2.1.0_1776275452450_0.5436271708695393","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@apexradius/apex-data-mcp","version":"2.2.0","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"author":{"name":"Apex Radius Labs"},"license":"MIT","_id":"@apexradius/apex-data-mcp@2.2.0","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"homepage":"https://github.com/apexradius/apex-data-mcp#readme","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"bin":{"apex-data-mcp":"dist/index.js"},"dist":{"shasum":"12c6c6781c3f61e82791d607401c49412fe87cc6","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-2.2.0.tgz","fileCount":58,"integrity":"sha512-0Koglqt89rfR/jbFlsRtoqUEzVfrg98r3V5q5hbB7Oo0QdHeEBrMisNdv6GuIgzm+82l17GAUlSLLlmFXbsg2Q==","signatures":[{"sig":"MEYCIQDNOOQyk9oeAyDyni7whlwY3t83SEmsYnuXG7Vrl24fSwIhAL/jBaP5wdC5dRg0LxuzJAZFCQYR/VO8M+W5CV+ItGCI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200569},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"59133a5def5236e4efebb25a652df2a2d4f049bc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"repository":{"url":"git+https://github.com/apexradius/apex-data-mcp.git","type":"git"},"_npmVersion":"11.12.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","directories":{},"_nodeVersion":"25.8.1","dependencies":{"pg":"^8.11.0","zod":"^3.23.0","ssh2":"^1.15.0","@modelcontextprotocol/sdk":"^1.29.0","@apexradius/apex-mcp-shared":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.4.0","@types/node":"^20.0.0","@types/ssh2":"^1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/apex-data-mcp_2.2.0_1776284648367_0.6570409592504363","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@apexradius/apex-data-mcp","version":"3.0.0","description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"type":"module","main":"dist/index.js","bin":{"apex-data-mcp":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","prepublishOnly":"npm run build","test":"node --test","lint":"biome ci .","biome":"biome check --write .","biome:ci":"biome ci ."},"dependencies":{"@apexradius/apex-mcp-shared":"^2.0.0","@modelcontextprotocol/sdk":"^1.29.0","postgres":"^3.4.9","ssh2":"^1.15.0","zod":"^3.23.0"},"devDependencies":{"@types/node":"^20.0.0","@types/ssh2":"^1.15.5","typescript":"^5.4.0","@biomejs/biome":"^2.4.15"},"engines":{"node":">=20"},"license":"MIT","author":{"name":"Apex Radius"},"repository":{"type":"git","url":"git+https://github.com/apexradius/apex-data-mcp.git"},"gitHead":"a7763db057f7ab231a8809ddc038a14f26d4ba64","types":"./dist/index.d.ts","_id":"@apexradius/apex-data-mcp@3.0.0","bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"homepage":"https://github.com/apexradius/apex-data-mcp#readme","_nodeVersion":"24.15.0","_npmVersion":"11.15.0","dist":{"integrity":"sha512-LQJspVDbo5k0GMDnnkDAx3k/VkxHcWI1AXkaAuuqYtAE1Hajxh/d91PQcnT180wF2/e9pRN5Wr6EkKHGr7gnxA==","shasum":"da8a70a85885188e7b7367193cb930a71e1a63a8","tarball":"https://registry.npmjs.org/@apexradius/apex-data-mcp/-/apex-data-mcp-3.0.0.tgz","fileCount":42,"unpackedSize":120474,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCOUmRgxnp36jT/wsHKnR5PdfRzNcL5niti+i0XbCFPZQIhAOclGnjgIvM2P7W+8dIRKzAjQeD3sVV5vRDEmoyTuA1I"}]},"_npmUser":{"name":"famuagun","email":"apexradiuslabs@gmail.com"},"directories":{},"maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apex-data-mcp_3.0.0_1779842604014_0.8254193062018604"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T03:55:57.239Z","modified":"2026-05-27T00:43:24.300Z","1.0.0":"2026-04-12T03:55:57.506Z","1.0.1":"2026-04-12T03:58:51.786Z","2.0.0":"2026-04-14T06:03:31.661Z","2.1.0":"2026-04-15T17:50:52.579Z","2.2.0":"2026-04-15T20:24:08.516Z","3.0.0":"2026-05-27T00:43:24.164Z"},"bugs":{"url":"https://github.com/apexradius/apex-data-mcp/issues"},"author":{"name":"Apex Radius"},"license":"MIT","homepage":"https://github.com/apexradius/apex-data-mcp#readme","keywords":["mcp","postgres","postgresql","database","ssh","claude","ai"],"repository":{"type":"git","url":"git+https://github.com/apexradius/apex-data-mcp.git"},"description":"PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude","maintainers":[{"name":"famuagun","email":"apexradiuslabs@gmail.com"}],"readme":"# @apexradius/apex-data-mcp\n\nPostgreSQL and SSH MCP server for database inspection, remote operations, and VPS maintenance from MCP-capable clients.\n\n## Install\n\n```bash\nnpx @apexradius/apex-data-mcp --pg-url \"$APEX_PG_URL\" --read-only\n```\n\nFor local development:\n\n```bash\nnpm ci\nnpm run build\nnpm start -- --pg-url \"$APEX_PG_URL\"\n```\n\n## Configuration\n\nPostgres can be configured with a connection URL or individual fields:\n\n```bash\nAPEX_PG_URL=postgres://user:pass@host:5432/db\nAPEX_PG_PASSWORD=...\n```\n\nCLI flags:\n\n```text\n--pg-url <url>\n--pg-host <host>\n--pg-port <port>\n--pg-db <database>\n--pg-user <user>\n--pg-password <password>\n--ssl\n--read-only\n--max-rows <n>\n--timeout <ms>\n--ssh-host <host>\n--ssh-port <port>\n--ssh-user <user>\n--ssh-key <path>\n--ssh-password <password>\n```\n\nAdditional SSH servers can be provided with environment variables:\n\n```bash\nAPEX_SSH_VPS_HOST=100.68.57.21\nAPEX_SSH_VPS_USER=adam\nAPEX_SSH_VPS_PORT=22\nAPEX_SSH_VPS_KEY=/path/to/key\n```\n\nThe alias is the middle segment, lowercased. In the example above, use `server_id: \"vps\"`.\n\n## MCP Client Example\n\n```json\n{\n  \"mcpServers\": {\n    \"apex-data-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"@apexradius/apex-data-mcp\",\n        \"--pg-url\",\n        \"${APEX_PG_URL}\",\n        \"--read-only\"\n      ],\n      \"env\": {\n        \"APEX_PG_URL\": \"postgres://user:pass@localhost:5432/app\"\n      }\n    }\n  }\n}\n```\n\n## Tool Reference\n\nPostgres tools:\n\n- `pg_query`\n- `pg_explain`\n- `pg_list_schemas`\n- `pg_list_tables`\n- `pg_describe_table`\n- `pg_table_stats`\n- `pg_db_health`\n\nSSH execution and sessions:\n\n- `ssh_execute`\n- `ssh_execute_sudo`\n- `ssh_execute_group`\n- `ssh_command_alias`\n- `ssh_session_start`\n- `ssh_session_send`\n- `ssh_session_list`\n- `ssh_session_close`\n- `ssh_history`\n\nSSH network and files:\n\n- `ssh_tunnel_create`\n- `ssh_tunnel_close`\n- `ssh_tunnel_list`\n- `ssh_upload`\n- `ssh_download`\n- `ssh_sync`\n\n`ssh_sync` runs `rsync` locally. With `server_id`, mark the remote side with `remote:/path`, for example:\n\n```text\nsource: ./dist/\ndestination: remote:/var/www/app/dist/\nserver_id: vps\n```\n\nServer management and monitoring:\n\n- `ssh_list_servers`\n- `ssh_connection_status`\n- `ssh_health_check`\n- `ssh_service_status`\n- `ssh_alias`\n- `ssh_key_manage`\n- `ssh_group_manage`\n- `ssh_profile`\n- `ssh_process_manager`\n- `ssh_monitor`\n- `ssh_tail`\n- `ssh_alert_setup`\n- `ssh_deploy`\n\nDatabase and backup operations over SSH:\n\n- `ssh_db_list`\n- `ssh_db_query`\n- `ssh_db_dump`\n- `ssh_db_import`\n- `ssh_backup_create`\n- `ssh_backup_list`\n- `ssh_backup_restore`\n- `ssh_backup_schedule`\n\nApex-specific:\n\n- `keystone_vps_push`\n\nThe removed `ssh_hooks` tool is intentionally absent. The previous implementation advertised session-scoped hooks without actually executing them.\n\n## Security Model\n\n- `--read-only` applies to the direct Postgres client.\n- SSH database queries reject multi-statement SQL and mutating keywords.\n- SSH file and backup tools reject `..` path traversal segments.\n- `ssh_backup_schedule` accepts only five-field numeric cron expressions.\n- `ssh_deploy` validates branch names before shell execution.\n- `ssh_deploy` `pre_deploy` and `restart_command` run remote shell commands; only pass trusted operator input.\n- SSH key files with group or world permissions emit a warning.\n- Extra `APEX_SSH_*` servers without `USER` are skipped with a startup warning.\n- The system health check runs a real SSH `echo ok` probe when SSH is configured.\n\nNo secrets should be committed in MCP client config. Use environment variables or the local secret manager.\n","readmeFilename":"README.md"}