sasdeployer/nexlayer-mcp-backup
If you are the rightful owner of nexlayer-mcp-backup and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Nexlayer MCP Server is a Model Context Protocol server designed to facilitate the deployment and management of applications on the Nexlayer cloud platform using AI agents.
Nexlayer MCP Server
A Model Context Protocol (MCP) server that provides tools for deploying and managing applications on the Nexlayer cloud platform through AI agents.
Features
This MCP server provides 14 essential tools for complete application deployment workflows with AI agent optimization:
Core Deployment Tools
nexlayer_complete_deployment- NEW Complete 6-step workflow orchestrator (recommended for new deployments)nexlayer_deploy- Final deployment step (requires prepared YAML with ttl.sh images)nexlayer_extend_deployment- Extend deployment duration using session tokennexlayer_claim_deployment- Claim ownership of a deploymentnexlayer_get_schema- Get current YAML schema with LLM-friendly examples and validationnexlayer_add_deployment_reservation- Reserve application names to prevent conflictsnexlayer_remove_deployment_reservation- Release reserved application namesnexlayer_get_reservations- List all active deployment reservationsnexlayer_feedback- Send feedback to Nexlayer team
Repository Analysis Tools
nexlayer_clone_repo- Clone GitHub repositories for analysisnexlayer_analyze_repository- Deep project analysis with framework detectionnexlayer_detect_env_and_secrets- Scan for environment variables and secrets
Container Building Tools
nexlayer_build_images- Build container images using Dagger and push to ttl.sh
File Generation Tools
nexlayer_generate_intelligent_dockerfile- AI-powered Dockerfile generation (overwrites existing broken Dockerfiles)nexlayer_generate_intelligent_yaml- Schema-driven YAML configuration generation
Advanced Features
- 6-Step Workflow Orchestration: Guided deployment process with
nexlayer_complete_deployment - Schema-Driven YAML Generation: Automatically fetches and uses current Nexlayer schema
- Dockerfile Overwrite Protection: Automatically fixes broken existing Dockerfiles
- AI Agent Optimization: Automatically detects and optimizes for different AI clients (Claude, Cursor, Windsurf)
- Session Tracking: Complete deployment lifecycle tracking with performance metrics
- Structured Logging: Comprehensive logging with parameter sanitization
- Error Handling: Detailed error messages with troubleshooting guidance
- Security: Built-in parameter validation and sanitization
Installation
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"nexlayer": {
"command": "npx",
"args": ["nexlayer-mcp@latest"]
}
}
}
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor IDE
Add to your cursor-mcp-config.json:
{
"mcpServers": {
"nexlayer": {
"command": "npx",
"args": ["nexlayer-mcp@latest"]
}
}
}
Other AI Clients
Configure in your MCP settings using the same command structure.
API Integration
The server integrates with these Nexlayer API endpoints:
Core Deployment
POST /startUserDeployment- Deploy applications with validationPOST /extendDeployment- Extend deployment durationPOST /claimDeployment- Claim deployment ownership
Validation & Schema
GET /schema- Get YAML schema for configurationPOST /validate- Validate YAML configurationPOST /feedback- Submit feedback to Nexlayer team
Reservation Management
POST /addDeploymentReservation- Reserve application namesPOST /removeDeploymentReservation- Release name reservationsGET /getReservations- List active reservations
Advanced Features
- Agent metadata injection for analytics
- Session token management
- Error categorization and guidance
Authentication
Authentication uses session tokens:
- Initial deployments return session tokens
- Management operations require session tokens
- Tokens are automatically managed by the tools
- Agent metadata is included in all API calls
Usage
Basic Deployment
"Deploy https://github.com/username/repository to Nexlayer"
Advanced Deployment
"Deploy with custom YAML configuration"
"Auto-generate deployment config from project analysis"
"Validate my YAML before deploying"
Deployment Management
"Extend my deployment with session token abc123"
"Claim deployment my-app with token def456"
"Send feedback about my deployment experience"
6-Step Deployment Workflow
- Clone - Download repository from GitHub with
nexlayer_clone_repo - Analyze - Detect frameworks, dependencies, and configuration with
nexlayer_analyze_repository - Generate - Create optimized Dockerfiles with
nexlayer_generate_intelligent_dockerfile - Build - Build container images with
nexlayer_build_imagesusing Dagger - Configure - Generate Nexlayer YAML with
nexlayer_generate_intelligent_yaml - Deploy - Deploy to Nexlayer platform with
nexlayer_deploy
Development
Project Structure
src/
├── server.ts # MCP server initialization and agent detection
├── tools/ # Modular tool implementations
│ ├── registry.ts # Centralized tool registration system
│ ├── core.ts # Deployment lifecycle tools (5 tools)
│ ├── analysis.ts # Repository analysis tools (3 tools)
│ ├── dagger.ts # Container building tools (1 tool)
│ └── generator.ts # File generation tools (2 tools)
├── services/ # External service integrations
├── utils/ # Logging, tracing, and utilities
├── prompts/ # AI agent guidance prompts
└── agent/ # AI agent detection and optimization
Adding New Tools
- Define interfaces in
types/nexlayer.ts - Add API methods in
services/nexlayer-api.ts - Implement in appropriate tool module
- Register in module's
registerTools()method - Follow the standardized tool implementation pattern
Building
npm install
npm run build
Error Handling
All tools include comprehensive error handling with:
- Detailed error messages with context
- Troubleshooting guidance and solutions
- Session tracking for debugging
- Parameter sanitization for security
- Error categorization (validation, resource, network, etc.)
Performance & Security
- Rate Limiting: Built-in protection against abuse
- Input Validation: Comprehensive parameter validation
- Error Sanitization: Never expose internal system details
- Resource Management: Automatic cleanup of temporary files
- Caching: Optimized API response caching
License
MIT
Support
- GitHub Issues
- Nexlayer Platform
- - Complete technical documentation