npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apexradius/apex-data-mcp

v3.0.0

Published

PostgreSQL MCP server with SSH tunnel support — query, inspect, and audit Postgres databases from Claude

Downloads

59

Readme

@apexradius/apex-data-mcp

PostgreSQL and SSH MCP server for database inspection, remote operations, and VPS maintenance from MCP-capable clients.

Install

npx @apexradius/apex-data-mcp --pg-url "$APEX_PG_URL" --read-only

For local development:

npm ci
npm run build
npm start -- --pg-url "$APEX_PG_URL"

Configuration

Postgres can be configured with a connection URL or individual fields:

APEX_PG_URL=postgres://user:pass@host:5432/db
APEX_PG_PASSWORD=...

CLI flags:

--pg-url <url>
--pg-host <host>
--pg-port <port>
--pg-db <database>
--pg-user <user>
--pg-password <password>
--ssl
--read-only
--max-rows <n>
--timeout <ms>
--ssh-host <host>
--ssh-port <port>
--ssh-user <user>
--ssh-key <path>
--ssh-password <password>

Additional SSH servers can be provided with environment variables:

APEX_SSH_VPS_HOST=100.68.57.21
APEX_SSH_VPS_USER=adam
APEX_SSH_VPS_PORT=22
APEX_SSH_VPS_KEY=/path/to/key

The alias is the middle segment, lowercased. In the example above, use server_id: "vps".

MCP Client Example

{
  "mcpServers": {
    "apex-data-mcp": {
      "command": "npx",
      "args": [
        "@apexradius/apex-data-mcp",
        "--pg-url",
        "${APEX_PG_URL}",
        "--read-only"
      ],
      "env": {
        "APEX_PG_URL": "postgres://user:pass@localhost:5432/app"
      }
    }
  }
}

Tool Reference

Postgres tools:

  • pg_query
  • pg_explain
  • pg_list_schemas
  • pg_list_tables
  • pg_describe_table
  • pg_table_stats
  • pg_db_health

SSH execution and sessions:

  • ssh_execute
  • ssh_execute_sudo
  • ssh_execute_group
  • ssh_command_alias
  • ssh_session_start
  • ssh_session_send
  • ssh_session_list
  • ssh_session_close
  • ssh_history

SSH network and files:

  • ssh_tunnel_create
  • ssh_tunnel_close
  • ssh_tunnel_list
  • ssh_upload
  • ssh_download
  • ssh_sync

ssh_sync runs rsync locally. With server_id, mark the remote side with remote:/path, for example:

source: ./dist/
destination: remote:/var/www/app/dist/
server_id: vps

Server management and monitoring:

  • ssh_list_servers
  • ssh_connection_status
  • ssh_health_check
  • ssh_service_status
  • ssh_alias
  • ssh_key_manage
  • ssh_group_manage
  • ssh_profile
  • ssh_process_manager
  • ssh_monitor
  • ssh_tail
  • ssh_alert_setup
  • ssh_deploy

Database and backup operations over SSH:

  • ssh_db_list
  • ssh_db_query
  • ssh_db_dump
  • ssh_db_import
  • ssh_backup_create
  • ssh_backup_list
  • ssh_backup_restore
  • ssh_backup_schedule

Apex-specific:

  • keystone_vps_push

The removed ssh_hooks tool is intentionally absent. The previous implementation advertised session-scoped hooks without actually executing them.

Security Model

  • --read-only applies to the direct Postgres client.
  • SSH database queries reject multi-statement SQL and mutating keywords.
  • SSH file and backup tools reject .. path traversal segments.
  • ssh_backup_schedule accepts only five-field numeric cron expressions.
  • ssh_deploy validates branch names before shell execution.
  • ssh_deploy pre_deploy and restart_command run remote shell commands; only pass trusted operator input.
  • SSH key files with group or world permissions emit a warning.
  • Extra APEX_SSH_* servers without USER are skipped with a startup warning.
  • The system health check runs a real SSH echo ok probe when SSH is configured.

No secrets should be committed in MCP client config. Use environment variables or the local secret manager.