xiaohongshu
xiaohongshu
fastmcp-cloud-deployment
FastMCP Cloud deployment validation, testing, and verification patterns. Use when deploying MCP servers, validating deployments, testing server configurations, checking environment variables, verifying deployment health, tracking deployments, or when user mentions FastMCP Cloud, deployment valida...
Full skill instructions
This skill provides comprehensive deployment lifecycle management for FastMCP servers, including pre-deployment validation, local testing, post-deployment verification, environment variable checking, and deployment tracking.
The deployment lifecycle consists of five phases:
Script: scripts/validate-server.sh <server-path>
Purpose: Validates server is ready for deployment
Checks:
Usage:
# Validate current directory
./scripts/validate-server.sh .
# Validate specific server
./scripts/validate-server.sh /path/to/server
# Verbose mode
VERBOSE=1 ./scripts/validate-server.sh .
Exit Codes:
0: Validation passed (may have warnings)1: Validation failed (must fix before deployment)Example Output:
=== FastMCP Server Pre-Deployment Validation ===
✓ Found Python server file: server.py
✓ Python syntax is valid
✓ FastMCP dependency declared in requirements.txt
✓ fastmcp.json has valid JSON syntax
✓ Server name: my-server
⚠ Found 2 unpinned dependencies
✓ No obvious hardcoded secrets detected
Results: 12 passed, 0 failed, 1 warnings
✓ Server passed validation - ready for deployment
Script: scripts/test-local.sh <server-path>
Purpose: Tests server locally before deployment
Tests:
Usage:
# Test with default transport (STDIO)
./scripts/test-local.sh .
# Test both STDIO and HTTP
TRANSPORT=both ./scripts/test-local.sh .
# Test HTTP only on custom port
TRANSPORT=http PORT=3000 ./scripts/test-local.sh .
# Longer test duration
TEST_DURATION=30 ./scripts/test-local.sh .
Environment Variables:
TRANSPORT: stdio, http, or both (default: stdio)PORT: Port for HTTP testing (default: 8000)TEST_DURATION: Test duration in seconds (default: 10)Example Output:
=== FastMCP Server Local Testing ===
✓ Python imports successful
✓ Server started successfully (PID: 12345)
✓ Server is producing MCP protocol messages
✓ HTTP server started (PID: 12346)
✓ Health endpoint responding
Results: 12 passed, 0 failed, 0 warnings
✓ Server tests passed - ready for deployment testing
Script: scripts/check-env-vars.sh <server-path>
Purpose: Validates environment variables are properly configured
Checks:
Usage:
# Check default .env file
./scripts/check-env-vars.sh .
# Check specific env file
ENV_FILE=.env.production ./scripts/check-env-vars.sh .
# Check only required variables
CHECK_MODE=required ./scripts/check-env-vars.sh .
Environment Variables:
ENV_FILE: Environment file to check (default: .env)CHECK_MODE: all, required, or optional (default: all)Example Output:
=== FastMCP Server Environment Variable Check ===
✓ Found .env.example template
ℹ Required: API_KEY
ℹ Optional: LOG_LEVEL (default: INFO)
✓ All required variables are set
✓ All fastmcp.json variables documented in .env.example
✓ .env files properly excluded from git
Results: 6 passed, 0 failed, 0 warnings
✓ Environment configuration validated
Script: scripts/verify-deployment.sh <deployment-url>
Purpose: Verifies deployed server is accessible and functioning
Checks:
Usage:
# Verify FastMCP Cloud deployment
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp
# Verify HTTP deployment
./scripts/verify-deployment.sh https://my-server.example.com/mcp
# Custom timeout and retries
MAX_RETRIES=10 TIMEOUT=60 ./scripts/verify-deployment.sh https://my-server.com/mcp
# Verbose output
VERBOSE=1 ./scripts/verify-deployment.sh https://my-server.com/mcp
Environment Variables:
MAX_RETRIES: Maximum retry attempts (default: 5)RETRY_DELAY: Seconds between retries (default: 10)TIMEOUT: Request timeout in seconds (default: 30)VERBOSE: Show detailed output (default: 0)Example Output:
=== FastMCP Server Deployment Verification ===
✓ DNS resolved: my-server.fastmcp.app -> 104.21.45.123
✓ Server is reachable
✓ Health endpoint available at /health (HTTP 200)
✓ MCP endpoint responding (HTTP 200)
✓ Valid JSON-RPC response received
✓ Server provides 3 tool(s)
✓ Valid SSL/TLS certificate
✓ Response time excellent (<1s)
Results: 11 passed, 0 failed, 0 warnings
✓ Deployment verified successfully
File: templates/.fastmcp-deployments.json
Purpose: Track all server deployments with metadata
Structure:
{
"version": "1.0.0",
"deployments": [
{
"id": "deployment-uuid",
"serverName": "my-server",
"environment": "production",
"target": "fastmcp-cloud",
"url": "https://my-server.fastmcp.app/mcp",
"status": "active",
"deployedAt": "2025-01-15T10:30:00Z",
"version": "1.0.0",
"validationResults": {
"preDeployment": {...},
"postDeployment": {...}
}
}
]
}
Usage: Copy template and update with actual deployment details
File: templates/deployment-checklist.md
Purpose: Step-by-step checklist for successful deployments
Sections:
Usage: Copy checklist for each deployment, check off items as completed
File: templates/env-var-template.md
Purpose: Template for documenting all environment variables
Sections:
Usage: Copy template to server repo as ENV_VARS.md, customize with actual variables
File: examples/successful-deployment.md
Contents: Complete end-to-end deployment example including:
Use Case: Reference for first-time deployments or training
File: examples/troubleshooting.md
Contents: Common issues and solutions including:
Use Case: Reference when deployments fail or issues occur
Step 1: Pre-Deployment Validation
cd /path/to/server
./scripts/validate-server.sh .
Expected: All checks pass, address any warnings
Step 2: Environment Variable Check
./scripts/check-env-vars.sh .
Expected: All required variables set, no security issues
Step 3: Local Testing
TRANSPORT=both ./scripts/test-local.sh .
Expected: Server runs successfully in both STDIO and HTTP modes
Step 4: Deploy
For FastMCP Cloud:
For HTTP (your infrastructure):
For STDIO (local/IDE):
.mcp.json or IDE config.env file has required variablesStep 5: Post-Deployment Verification
./scripts/verify-deployment.sh https://your-deployment-url/mcp
Expected: All checks pass, server responding correctly
Step 6: Track Deployment
Update .fastmcp-deployments.json with:
If deployment fails:
This skill complements:
.env files.env.example for documentation only.env.example up to date.fastmcp-deployments.json# Validate server is ready
./scripts/validate-server.sh .
# Check environment variables
./scripts/check-env-vars.sh .
# Test locally
TRANSPORT=both ./scripts/test-local.sh .
# Deploy to FastMCP Cloud
# (via dashboard or CLI)
# Verify deployment
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp
# Use staging environment file
ENV_FILE=.env.staging ./scripts/check-env-vars.sh .
# Test with staging config
cp .env.staging .env
TRANSPORT=http ./scripts/test-local.sh .
# Deploy to staging
# ...
# Verify staging deployment
./scripts/verify-deployment.sh https://staging.example.com/mcp
# Validate once
./scripts/validate-server.sh .
# Check each environment's variables
for env in development staging production; do
echo "Checking $env..."
ENV_FILE=.env.$env ./scripts/check-env-vars.sh .
done
# Deploy to each environment
# ...
# Verify each deployment
./scripts/verify-deployment.sh https://dev.example.com/mcp
./scripts/verify-deployment.sh https://staging.example.com/mcp
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp
#!/bin/bash
# .github/workflows/deploy.sh
set -e
# Validation
./scripts/validate-server.sh . || exit 1
# Environment check
ENV_FILE=.env.production ./scripts/check-env-vars.sh . || exit 1
# Local testing
TRANSPORT=both ./scripts/test-local.sh . || exit 1
# Deploy (example using FastMCP Cloud CLI)
fastmcp deploy --env production
# Wait for deployment
sleep 30
# Verify
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp || exit 1
echo "Deployment successful!"
Script fails with permission denied:
chmod +x scripts/*.sh
Python not found:
# Install Python 3
sudo apt install python3 python3-pip
jq not found:
# Install jq for JSON parsing
sudo apt install jq
curl not found:
# Install curl
sudo apt install curl
Script hangs during testing:
# Reduce test duration
TEST_DURATION=5 ./scripts/test-local.sh .
Verification fails immediately:
# Increase timeout
TIMEOUT=60 ./scripts/verify-deployment.sh <url>
A deployment is successful when:
.fastmcp-deployments.jsonSkill Version: 1.0.0 Last Updated: 2025-01-15 Maintained By: FastMCP Plugin Team
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience