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

@apexmcp/cli

v0.1.3

Published

CLI tool for deploying MCP servers to ApexMCP

Readme

@apexmcp/cli

TypeScript Node.js

CLI tool for deploying MCP servers to ApexMCP.

✨ Features

  • Simple Deployment: Deploy MCP servers with a single command
  • Flexible Configuration: Support for environment files, custom domains, and URL strategies
  • Deployment Management: View, update, and delete deployments from the CLI
  • Authentication Management: Login/logout with persistent token storage
  • MCP Server Management: Enable/disable and configure MCP servers from the catalog
  • Plugin & Secret Management: Manage secrets and configurations for MCP servers
  • MCP Interactions: List and call tools, read resources directly from the CLI
  • Configuration Management: Persistent CLI settings and preferences
  • Cross-platform: Works on any platform with Node.js

🚀 Installation

Global Installation (Recommended)

npm install -g @apexmcp/cli
# or
yarn global add @apexmcp/cli
# or
pnpm add -g @apexmcp/cli

npx (One-time usage)

npx @apexmcp/cli deploy ./my-mcp-server

Local Development

git clone <repo>
cd deploy-cli
bun install
bun run build
bun run cli --help

🧪 Usage

Deploy an MCP Server

# Basic deployment
apexmcp deploy ./my-mcp-server

# With custom project name
apexmcp deploy ./my-mcp-server --project-name "My Custom MCP"

# With environment variables
apexmcp deploy ./my-mcp-server --env-file .env.production

# With custom domain and authentication
apexmcp deploy ./my-mcp-server --domain my-custom-domain.com --token your-auth-token

# Full example
apexmcp deploy ./my-mcp-server \
  --project-name "My MCP Server" \
  --env-file .env \
  --url-strategy readable \
  --endpoint https://deploy.apexmcp.dev \
  --token eyJhbGciOiJIUzI1NiIs...

Deployment Command Options

| Option | Description | Default | | --------------------------- | --------------------------------------------------------------------------- | --------------------------- | | --project-name <name> | Display name for the deployment | Derived from directory name | | --env-file <file> | Environment variables file | None | | --domain <domain> | Custom domain for deployment | None | | --url-strategy <strategy> | URL generation strategy (readable, obscure, timestamp-only, random) | readable | | --endpoint <url> | Deploy service endpoint | Configured endpoint | | --token <token> | Authentication token | Configured token |

Authentication Commands

# Login with token
apexmcp login --token your-jwt-token

# Login with email/password (if supported)
apexmcp login --email [email protected] --password yourpassword

# Logout and clear credentials
apexmcp logout

# Show current authentication status
apexmcp whoami

MCP Server Management

# List all available MCP servers
apexmcp servers

# List enabled MCP servers for your organization
apexmcp servers:enabled

# Enable an MCP server
apexmcp servers:enable <catalog-id>

# Disable an MCP server
apexmcp servers:disable <catalog-id>

# Get detailed info about an MCP server
apexmcp servers:info <catalog-id>

Deployment Management

# List all deployments
apexmcp list

# Get detailed status of a specific deployment (use the deployment ID from `apexmcp list`)
apexmcp status <deployment-id>

# Update deployment properties
apexmcp update <deployment-id> --name "New Name"
apexmcp update <deployment-id> --domain "new-domain.com"
apexmcp update <deployment-id> --env-file .env.production

# Delete a deployment (with confirmation)
apexmcp delete <deployment-id>

# Force delete without confirmation
apexmcp delete <deployment-id> --force

Deletion Process

When you delete a deployment, ApexMCP will:

  1. Mark as deleted in the ApexMCP database (status = 'deleted')
  2. Delete the Deno deployment from Deno Deploy
  3. Remove DNS records from Cloudflare
  4. Clear external references (project_id, URLs)

The CLI now calls the /api/deployments/:id DELETE endpoint using the deployment ID returned by apexmcp list, and the API handles all cleanup operations.

Plugin & Secret Management

# List secrets for an MCP server
apexmcp secrets <catalog-id>

# Set a secret for an MCP server
apexmcp secrets:set <catalog-id> <secret-key> <secret-value>

# Delete a secret for an MCP server
apexmcp secrets:delete <catalog-id> <secret-key>

# Delete entire plugin configuration
apexmcp plugins:delete <catalog-id>

MCP Interactions

# List available tools
apexmcp tools

# Call a tool with parameters
apexmcp tools:call <tool-name> '{"param1": "value1", "param2": "value2"}'

# List available resources
apexmcp resources

# Read a specific resource
apexmcp resources:read <resource-uri>

# List resource templates
apexmcp resources:templates

Configuration Management

# Show current configuration
apexmcp config get

# Set configuration values
apexmcp config set endpoints.core https://api.apexmcp.dev
apexmcp config set endpoints.deploy https://deploy.apexmcp.dev
apexmcp config set preferences.json true

# Reset configuration to defaults
apexmcp config reset

URL Strategies

  • readable (default): Project name + date + random suffix (e.g., my-project-241219ab.org-123.apexmcp.dev)
  • obscure: Date + random characters only (e.g., 241219abcd.org-123.apexmcp.dev)
  • timestamp-only: Clean date/time format (e.g., 2412191435.org-123.apexmcp.dev)
  • random: Pure random characters (e.g., a8b3c9d2ef.org-123.apexmcp.dev)

📁 Project Structure

Your MCP server project should have an entry point file. Configuration files are optional but recommended.

Minimal Project Structure

my-mcp-server/
├── main.ts           # Entry point (or index.ts, server.ts, app.ts)
└── [other files...]  # Additional source files

Recommended Project Structure

my-mcp-server/
├── deno.json          # Optional: Deno configuration
├── package.json       # Optional: Node.js configuration
├── main.ts           # Entry point
├── README.md         # Documentation
└── [other files...]  # Additional source files

Entry Point Detection

The CLI automatically detects entry points in this order:

  1. Configuration files (if present):

    • deno.json / deno.jsonc: main or entryPoint field
    • package.json: main, module, or exports["."] field
  2. Common filenames (fallback):

    • main.ts, main.js
    • index.ts, index.js
    • server.ts, server.js
    • app.ts, app.js

Configuration Examples

deno.json:

{
  "main": "main.ts",
  "name": "my-mcp-server",
  "version": "1.0.0"
}

package.json:

{
  "name": "my-mcp-server",
  "version": "1.0.0",
  "main": "server.js"
}

deno.jsonc:

{
  "main": "main.ts",
  "name": "my-mcp-server"
}

Supported Files

The CLI includes all project files in deployments, letting the deploy service decide what's acceptable. This includes:

  • Source files: .ts, .js, .mjs, .cjs, HTML, CSS, etc.
  • Configuration files: deno.json, package.json, tsconfig.json, etc.
  • Documentation: README.md, LICENSE, CHANGELOG.md
  • Package files: Lock files, manifest files, etc.
  • Assets: Images, fonts, and other web assets
  • Build outputs: Generated files from build processes

Excluded files: Temporary files, OS-specific files (.DS_Store, Thumbs.db), and development artifacts.

Note: The deploy service validates all files and may reject certain types or enforce size limits with clear error messages.

🔐 Authentication

Get your authentication token from the ApexMCP dashboard or your deployment service administrator.

📝 Scripts

  • bun run build - Build the CLI with tsup
  • bun run cli - Run the CLI locally
  • bun run dev - Build with watch mode
  • bun test - Run tests

Built with Commander.js. MIT License.