{"_id":"@apexmcp/cli","_rev":"6-1004b298f654a36805d0ea54ce34fe48","name":"@apexmcp/cli","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"@apexmcp/cli","version":"0.1.1","keywords":["cli","mcp","deployment","apexmcp","typescript","deno","subhosting"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/cli@0.1.1","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"homepage":"https://github.com/ApexMCP/deploy-cli#readme","bugs":{"url":"https://github.com/ApexMCP/deploy-cli/issues"},"bin":{"apexmcp":"dist/cli.js"},"dist":{"shasum":"3873d6d00e1164d5b624ea85d7a1dcde44f21cc2","tarball":"https://registry.npmjs.org/@apexmcp/cli/-/cli-0.1.1.tgz","fileCount":9,"integrity":"sha512-O6YIGT9swoMvf0Ze5LhcucebGro/PgbODknzEUjZpbd6T64s6PQ8HHC5NzyAzfWTriyQzlaQD/qbSgYz6qcjIg==","signatures":[{"sig":"MEUCIBOfQMh2tIUFn+8ohka0CuVk3sbOGNuJ9Z9iNPYWv0vlAiEAisjSh5KdR3fAzIsVZ9bt6f/h/74an51CM8/mrp21774=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":316856},"main":"./dist/cli.js","type":"module","engines":{"node":">=18.18.0"},"exports":{".":"./dist/cli.js","./package.json":"./package.json"},"gitHead":"3e3eb9ae3d72a923d464c1f0205839b8771b11af","scripts":{"cli":"node dist/cli.js","dev":"tsup --watch","knip":"knip","test":"bun test","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"bun test --ci","postbuild":"node -e \"try{require('fs').chmodSync('dist/cli.js',0o755)}catch(e){}\"","typecheck":"tsc --noEmit","test:watch":"bun test --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","test:coverage":"bun test --coverage --coverage-reporter=text --coverage-reporter=lcov","prepublishOnly":"npm run clean && npm run build && npm run test:ci","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"repository":{"url":"git+https://github.com/ApexMCP/deploy-cli.git","type":"git"},"_npmVersion":"11.4.2","description":"CLI tool for deploying MCP servers to ApexMCP","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"commander":"^12.1.0","@apexmcp/logger":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.73.4","tsup":"^8.0.2","husky":"^9.1.7","cspell":"^9.4.0","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1766947737777_0.35597846622773854","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@apexmcp/cli","version":"0.1.2","keywords":["cli","mcp","deployment","apexmcp","typescript","deno","subhosting"],"author":{"name":"@keyrxng"},"license":"MIT","_id":"@apexmcp/cli@0.1.2","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"homepage":"https://github.com/ApexMCP/deploy-cli#readme","bugs":{"url":"https://github.com/ApexMCP/deploy-cli/issues"},"bin":{"apexmcp":"dist/cli.js"},"dist":{"shasum":"67d79f8ea7f68c498943fd7fa580610027741f19","tarball":"https://registry.npmjs.org/@apexmcp/cli/-/cli-0.1.2.tgz","fileCount":9,"integrity":"sha512-Uy3q1A7/VwnWRQM3jlF7D5BMzcAD/VfRAaMtrC1goOQRIy/PLBg1F1t52RovhBMAdIvGQirOrGrpu12nV+UvAg==","signatures":[{"sig":"MEQCIFEU0uzkuuCsbiyH5SVot2kDT9LlDdGtk/1wnYWwZ/hzAiA3a5GYCUNwB3yL9o8BPQzKGZT7ZYZyOdjulH/PTZWb4A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":316911},"main":"./dist/cli.js","type":"module","engines":{"node":">=18.18.0"},"exports":{".":"./dist/cli.js","./package.json":"./package.json"},"gitHead":"aa3ec1f62bea68768e461ceada817a2de80dd2bd","scripts":{"cli":"node dist/cli.js","dev":"tsup --watch","knip":"knip","test":"bun test","build":"tsup","clean":"rm -rf dist coverage .swc","format":"run-s format:lint format:prettier format:cspell","prepare":"husky install || true","test:ci":"bun test --ci","postbuild":"node -e \"try{require('fs').chmodSync('dist/cli.js',0o755)}catch(e){}\"","typecheck":"tsc --noEmit","test:watch":"bun test --watch","format:lint":"eslint --fix .","format:cspell":"cspell **/*","test:coverage":"bun test --coverage --coverage-reporter=text --coverage-reporter=lcov","prepublishOnly":"npm run clean && npm run build && npm run test:ci","format:prettier":"prettier --write ."},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"repository":{"url":"git+https://github.com/ApexMCP/deploy-cli.git","type":"git"},"_npmVersion":"11.4.2","description":"CLI tool for deploying MCP servers to ApexMCP","directories":{},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_nodeVersion":"22.17.0","dependencies":{"commander":"^12.1.0","@apexmcp/logger":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.73.4","tsup":"^8.0.2","husky":"^9.1.7","cspell":"^9.4.0","eslint":"^9.39.2","prettier":"^3.1.0","@swc/core":"^1.15.4","jest-junit":"^16.0.0","typescript":"^5.9.3","@types/node":"^25.0.2","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","typescript-eslint":"^8.49.0","eslint-plugin-import":"^2.32.0","@semantic-release/git":"^10.0.1","eslint-plugin-sonarjs":"^3.0.5","eslint-config-prettier":"^10.1.8","@semantic-release/changelog":"^6.0.3","@commitlint/config-conventional":"^20.2.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.2_1766958399445_0.008203996865399077","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@apexmcp/cli","version":"0.1.3","description":"CLI tool for deploying MCP servers to ApexMCP","author":{"name":"@keyrxng"},"license":"MIT","homepage":"https://github.com/ApexMCP/deploy-cli#readme","bugs":{"url":"https://github.com/ApexMCP/deploy-cli/issues"},"repository":{"type":"git","url":"git+https://github.com/ApexMCP/deploy-cli.git"},"type":"module","main":"./dist/cli.js","exports":{".":"./dist/cli.js","./package.json":"./package.json"},"bin":{"apexmcp":"dist/cli.js"},"publishConfig":{"access":"public"},"engines":{"node":">=18.18.0"},"scripts":{"build":"tsup","cli":"node dist/cli.js","dev":"tsup --watch","test":"bun test","test:watch":"bun test --watch","test:ci":"bun test --ci","test:coverage":"bun test --coverage --coverage-reporter=text --coverage-reporter=lcov","format":"run-s format:lint format:prettier format:cspell","format:lint":"eslint --fix .","format:prettier":"prettier --write .","format:cspell":"cspell **/*","typecheck":"tsc --noEmit","knip":"knip","clean":"rm -rf dist coverage .swc","postbuild":"node -e \"try{require('fs').chmodSync('dist/cli.js',0o755)}catch(e){}\"","prepublishOnly":"npm run clean && npm run build && npm run test:ci","prepare":"husky install || true"},"keywords":["cli","mcp","deployment","apexmcp","typescript","deno","subhosting"],"dependencies":{"@apexmcp/logger":"^1.0.0","commander":"^12.1.0"},"devDependencies":{"@commitlint/config-conventional":"^20.2.0","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@swc/core":"^1.15.4","@types/node":"^25.0.2","cspell":"^9.4.0","eslint":"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-import":"^2.32.0","eslint-plugin-sonarjs":"^3.0.5","husky":"^9.1.7","jest-junit":"^16.0.0","knip":"^5.73.4","lint-staged":"^16.2.7","npm-run-all":"^4.1.5","prettier":"^3.1.0","tsup":"^8.0.2","typescript":"^5.9.3","typescript-eslint":"^8.49.0"},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"src/**.{ts,json}":["cspell"]},"_id":"@apexmcp/cli@0.1.3","gitHead":"aa3ec1f62bea68768e461ceada817a2de80dd2bd","_nodeVersion":"22.17.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-mz8geYU8fWpvmZo3eNrdWQNHIP9PatRbeiF1XPOyERfF9u5AL+4uMFr2LlIIVzTqBePjATgwg7nbUJlBQSmmOg==","shasum":"a3928ad8f11b1b043e0d7a1589078ee2904f56bf","tarball":"https://registry.npmjs.org/@apexmcp/cli/-/cli-0.1.3.tgz","fileCount":9,"unpackedSize":318195,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCvkHbdZIDJCL3hqDZ5cGJEJg+/L5RrbdxS83qlMgDUhQIhANWHG6khzUuFOVQsnauNwphAQKk7AGQTXGUmpBHJAbHM"}]},"_npmUser":{"name":"official_apexmcp","email":"kieranpatton@proton.me"},"directories":{},"maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.3_1766959278833_0.31368865280158875"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-28T18:48:57.686Z","modified":"2025-12-28T22:01:19.195Z","0.1.0":"2025-12-28T18:33:09.589Z","0.1.1":"2025-12-28T18:48:57.945Z","0.1.2":"2025-12-28T21:46:39.583Z","0.1.3":"2025-12-28T22:01:18.979Z"},"bugs":{"url":"https://github.com/ApexMCP/deploy-cli/issues"},"author":{"name":"@keyrxng"},"license":"MIT","homepage":"https://github.com/ApexMCP/deploy-cli#readme","keywords":["cli","mcp","deployment","apexmcp","typescript","deno","subhosting"],"repository":{"type":"git","url":"git+https://github.com/ApexMCP/deploy-cli.git"},"description":"CLI tool for deploying MCP servers to ApexMCP","maintainers":[{"name":"official_apexmcp","email":"kieranpatton@proton.me"}],"readme":"# @apexmcp/cli\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=flat&logo=typescript)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-339933?style=flat&logo=node.js)](https://nodejs.org/)\n\nCLI tool for deploying MCP servers to ApexMCP.\n\n## ✨ Features\n\n- **Simple Deployment**: Deploy MCP servers with a single command\n- **Flexible Configuration**: Support for environment files, custom domains, and URL strategies\n- **Deployment Management**: View, update, and delete deployments from the CLI\n- **Authentication Management**: Login/logout with persistent token storage\n- **MCP Server Management**: Enable/disable and configure MCP servers from the catalog\n- **Plugin & Secret Management**: Manage secrets and configurations for MCP servers\n- **MCP Interactions**: List and call tools, read resources directly from the CLI\n- **Configuration Management**: Persistent CLI settings and preferences\n- **Cross-platform**: Works on any platform with Node.js\n\n## 🚀 Installation\n\n### Global Installation (Recommended)\n\n```bash\nnpm install -g @apexmcp/cli\n# or\nyarn global add @apexmcp/cli\n# or\npnpm add -g @apexmcp/cli\n```\n\n### npx (One-time usage)\n\n```bash\nnpx @apexmcp/cli deploy ./my-mcp-server\n```\n\n### Local Development\n\n```bash\ngit clone <repo>\ncd deploy-cli\nbun install\nbun run build\nbun run cli --help\n```\n\n## 🧪 Usage\n\n### Deploy an MCP Server\n\n```bash\n# Basic deployment\napexmcp deploy ./my-mcp-server\n\n# With custom project name\napexmcp deploy ./my-mcp-server --project-name \"My Custom MCP\"\n\n# With environment variables\napexmcp deploy ./my-mcp-server --env-file .env.production\n\n# With custom domain and authentication\napexmcp deploy ./my-mcp-server --domain my-custom-domain.com --token your-auth-token\n\n# Full example\napexmcp deploy ./my-mcp-server \\\n  --project-name \"My MCP Server\" \\\n  --env-file .env \\\n  --url-strategy readable \\\n  --endpoint https://deploy.apexmcp.dev \\\n  --token eyJhbGciOiJIUzI1NiIs...\n```\n\n### Deployment Command Options\n\n| Option                      | Description                                                                 | Default                     |\n| --------------------------- | --------------------------------------------------------------------------- | --------------------------- |\n| `--project-name <name>`     | Display name for the deployment                                             | Derived from directory name |\n| `--env-file <file>`         | Environment variables file                                                  | None                        |\n| `--domain <domain>`         | Custom domain for deployment                                                | None                        |\n| `--url-strategy <strategy>` | URL generation strategy (`readable`, `obscure`, `timestamp-only`, `random`) | `readable`                  |\n| `--endpoint <url>`          | Deploy service endpoint                                                     | Configured endpoint         |\n| `--token <token>`           | Authentication token                                                        | Configured token            |\n\n### Authentication Commands\n\n```bash\n# Login with token\napexmcp login --token your-jwt-token\n\n# Login with email/password (if supported)\napexmcp login --email user@example.com --password yourpassword\n\n# Logout and clear credentials\napexmcp logout\n\n# Show current authentication status\napexmcp whoami\n```\n\n### MCP Server Management\n\n```bash\n# List all available MCP servers\napexmcp servers\n\n# List enabled MCP servers for your organization\napexmcp servers:enabled\n\n# Enable an MCP server\napexmcp servers:enable <catalog-id>\n\n# Disable an MCP server\napexmcp servers:disable <catalog-id>\n\n# Get detailed info about an MCP server\napexmcp servers:info <catalog-id>\n```\n\n### Deployment Management\n\n```bash\n# List all deployments\napexmcp list\n\n# Get detailed status of a specific deployment (use the deployment ID from `apexmcp list`)\napexmcp status <deployment-id>\n\n# Update deployment properties\napexmcp update <deployment-id> --name \"New Name\"\napexmcp update <deployment-id> --domain \"new-domain.com\"\napexmcp update <deployment-id> --env-file .env.production\n\n# Delete a deployment (with confirmation)\napexmcp delete <deployment-id>\n\n# Force delete without confirmation\napexmcp delete <deployment-id> --force\n```\n\n#### Deletion Process\n\nWhen you delete a deployment, ApexMCP will:\n\n1. **Mark as deleted** in the ApexMCP database (status = 'deleted')\n2. **Delete the Deno deployment** from Deno Deploy\n3. **Remove DNS records** from Cloudflare\n4. **Clear external references** (project_id, URLs)\n\nThe CLI now calls the `/api/deployments/:id` DELETE endpoint using the deployment ID returned by `apexmcp list`, and the API handles all cleanup operations.\n\n### Plugin & Secret Management\n\n```bash\n# List secrets for an MCP server\napexmcp secrets <catalog-id>\n\n# Set a secret for an MCP server\napexmcp secrets:set <catalog-id> <secret-key> <secret-value>\n\n# Delete a secret for an MCP server\napexmcp secrets:delete <catalog-id> <secret-key>\n\n# Delete entire plugin configuration\napexmcp plugins:delete <catalog-id>\n```\n\n### MCP Interactions\n\n```bash\n# List available tools\napexmcp tools\n\n# Call a tool with parameters\napexmcp tools:call <tool-name> '{\"param1\": \"value1\", \"param2\": \"value2\"}'\n\n# List available resources\napexmcp resources\n\n# Read a specific resource\napexmcp resources:read <resource-uri>\n\n# List resource templates\napexmcp resources:templates\n```\n\n### Configuration Management\n\n```bash\n# Show current configuration\napexmcp config get\n\n# Set configuration values\napexmcp config set endpoints.core https://api.apexmcp.dev\napexmcp config set endpoints.deploy https://deploy.apexmcp.dev\napexmcp config set preferences.json true\n\n# Reset configuration to defaults\napexmcp config reset\n```\n\n### URL Strategies\n\n- **`readable`** (default): Project name + date + random suffix (e.g., `my-project-241219ab.org-123.apexmcp.dev`)\n- **`obscure`**: Date + random characters only (e.g., `241219abcd.org-123.apexmcp.dev`)\n- **`timestamp-only`**: Clean date/time format (e.g., `2412191435.org-123.apexmcp.dev`)\n- **`random`**: Pure random characters (e.g., `a8b3c9d2ef.org-123.apexmcp.dev`)\n\n## 📁 Project Structure\n\nYour MCP server project should have an entry point file. Configuration files are optional but recommended.\n\n### Minimal Project Structure\n\n```\nmy-mcp-server/\n├── main.ts           # Entry point (or index.ts, server.ts, app.ts)\n└── [other files...]  # Additional source files\n```\n\n### Recommended Project Structure\n\n```\nmy-mcp-server/\n├── deno.json          # Optional: Deno configuration\n├── package.json       # Optional: Node.js configuration\n├── main.ts           # Entry point\n├── README.md         # Documentation\n└── [other files...]  # Additional source files\n```\n\n### Entry Point Detection\n\nThe CLI automatically detects entry points in this order:\n\n1. **Configuration files** (if present):\n   - `deno.json` / `deno.jsonc`: `main` or `entryPoint` field\n   - `package.json`: `main`, `module`, or `exports[\".\"]` field\n\n2. **Common filenames** (fallback):\n   - `main.ts`, `main.js`\n   - `index.ts`, `index.js`\n   - `server.ts`, `server.js`\n   - `app.ts`, `app.js`\n\n### Configuration Examples\n\n**deno.json:**\n```json\n{\n  \"main\": \"main.ts\",\n  \"name\": \"my-mcp-server\",\n  \"version\": \"1.0.0\"\n}\n```\n\n**package.json:**\n```json\n{\n  \"name\": \"my-mcp-server\",\n  \"version\": \"1.0.0\",\n  \"main\": \"server.js\"\n}\n```\n\n**deno.jsonc:**\n```jsonc\n{\n  \"main\": \"main.ts\",\n  \"name\": \"my-mcp-server\"\n}\n```\n\n### Supported Files\n\nThe CLI includes **all project files** in deployments, letting the deploy service decide what's acceptable. This includes:\n\n- **Source files**: `.ts`, `.js`, `.mjs`, `.cjs`, HTML, CSS, etc.\n- **Configuration files**: `deno.json`, `package.json`, `tsconfig.json`, etc.\n- **Documentation**: `README.md`, `LICENSE`, `CHANGELOG.md`\n- **Package files**: Lock files, manifest files, etc.\n- **Assets**: Images, fonts, and other web assets\n- **Build outputs**: Generated files from build processes\n\n**Excluded files:** Temporary files, OS-specific files (`.DS_Store`, `Thumbs.db`), and development artifacts.\n\n**Note:** The deploy service validates all files and may reject certain types or enforce size limits with clear error messages.\n\n## 🔐 Authentication\n\nGet your authentication token from the ApexMCP dashboard or your deployment service administrator.\n\n## 📝 Scripts\n\n- `bun run build` - Build the CLI with tsup\n- `bun run cli` - Run the CLI locally\n- `bun run dev` - Build with watch mode\n- `bun test` - Run tests\n\n---\n\nBuilt with Commander.js. MIT License.\n","readmeFilename":"README.md"}