@deploxy/cli) is the primary tool for managing and deploying your MCP server projects. It is designed to be a direct replacement for the npm publish command, integrating seamlessly into your existing workflow.
Installation
You can run the CLI without installation usingnpx, or you can install it globally.
Core Commands
init
Initializes a new Deploxy project in the specified directory by creating a .deploxy.json configuration file and adding it to your .gitignore.
Optional path to the directory where the project should be initialized. Defaults to the current directory.
.deploxy.json file.
deploy
The central command for deploying your project. It validates your configuration, checks NPM for version and permission validity, collects your project files, and uploads them to the Deploxy platform for deployment.
The
deploy command does not build your project. You must run your build script (e.g., npm run build) before deploying to ensure your compiled code is included.Optional path to the project directory you want to deploy. Defaults to the current directory.
deploy command performs the following steps:
- Configuration Check: Reads and validates your
.deploxy.jsonandpackage.json. - NPM Validation: Verifies that your package version is higher than the one on the NPM registry and that you have permission to publish.
- File Collection: Gathers all files and directories specified in the
filesarray of yourpackage.json. - Upload: Securely uploads a compressed archive of your project to the Deploxy platform.
- Deployment: Deploxy’s backend takes over, installs production dependencies, deploys your serverless functions globally, and publishes the proxy package to NPM.
Global Options
These options can be used with any command:--help: Show help information for a command.--version: Display the installed CLI version.
Configuration Files
.deploxy.json
This file is the control center for your deployment. See the Configuration Guide for a more detailed explanation of each property.
.npmrc
To publish the proxy package to NPM, the CLI needs your NPM authentication token. Create a .npmrc file in your project root.
Using an environment variable for your token is a critical security practice.
.npmrc
NPM_TOKEN environment variable in the shell where you run the deploy command.
