A secure, sandboxed environment for running npx commands with caching.
- ✅ Runs any
npxcommand in a sandboxed Docker environment - ✅ Caches downloaded npm modules between runs
- ✅ Works seamlessly as a drop-in replacement for
npx - ✅ No configuration required
- ✅ Pre-built Docker image available on Docker Hub
- Docker must be installed on your system
- Node.js and npm
npm install -g mcp-armorAfter installation, you'll have access to two CLI commands:
mcp-armor-npx- The primary commandnpx-armor- An alias for the same functionality
Both commands function identically, choose whichever is easier to remember.
Use either mcp-armor-npx or npx-armor exactly as you would use npx:
# Run a package directly
mcp-armor-npx cowsay "Hello, secure world!"
# Or using the alias
npx-armor cowsay "Hello, secure world!"
# Run a specific version of a package
mcp-armor-npx cowsay@2.0.0 "Version specific"
# Run a package with arguments
mcp-armor-npx figlet "Big text"# Push the Docker image to Docker Hub (requires Docker Hub login)
mcp-armor-npx --push-image- First run: Downloads the requested package inside Docker container
- Second run: Uses cached version for instant execution
- All execution happens in a sandboxed Docker environment
- Your npm cache is preserved between runs
The Docker image is available on Docker Hub at dheerajpai/mcp-armor-npx.
If you want to use the image directly:
docker run --rm -v ~/.npm:/home/runner/.npm dheerajpai/mcp-armor-npx [your-npx-args]All commands run inside an isolated Docker container with:
- A non-root user account
- Limited access to the host system
- Only npm cache is shared with the host
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
Please visit our GitHub repository to contribute.
ISC
Dheeraj Pai dheerajmpaicmu@gmail.com