Skip to main content 首页 创作者 forceinjection domain-driven-design-skills fastmcp-cloud-deployment
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 validation, pre-deployment checks, post-deployment verification, deployment troubleshooting, or deployment lifecycle management.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill fastmcp-cloud-deployment命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
name fastmcp-cloud-deployment description 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 validation, pre-deployment checks, post-deployment verification, deployment troubleshooting, or deployment lifecycle management. allowed-tools Bash, Read, Write, Edit
FastMCP Cloud Deployment Skill
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.
Overview
The deployment lifecycle consists of five phases:
Pre-Deployment Validation - Syntax, dependencies, configuration
Local Testing - STDIO and HTTP transport testing
Environment Verification - Environment variable validation
Deployment - To FastMCP Cloud, HTTP, or STDIO
Post-Deployment Verification - Health checks, endpoint testing
Available Scripts
1. Pre-Deployment Validation
Script : scripts/validate-server.sh <server-path>
Purpose : Validates server is ready for deployment
Checks :
Server file exists (server.py, server.ts, index.ts)
Syntax validation (Python/TypeScript)
Dependencies declared (requirements.txt or package.json)
FastMCP dependency included
fastmcp.json configuration valid
No hardcoded secrets
Environment configuration present
.gitignore properly configured
./scripts/validate-server.sh .
./scripts/validate-server.sh /path/to/server
VERBOSE=1 ./scripts/validate-server.sh .
0: Validation passed (may have warnings)
1: Validation failed (must fix before deployment)
=== 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
2. Local Testing Script : scripts/test-local.sh <server-path>
Purpose : Tests server locally before deployment
Module imports successful
STDIO transport working
HTTP transport responding
Environment variables configured
Health endpoints (if configured)
Server stability (runs for 5+ seconds)
./scripts/test-local.sh .
TRANSPORT=both ./scripts/test-local.sh .
TRANSPORT=http PORT=3000 ./scripts/test-local.sh .
TEST_DURATION=30 ./scripts/test-local.sh .
TRANSPORT: stdio, http, or both (default: stdio)
PORT: Port for HTTP testing (default: 8000)
TEST_DURATION: Test duration in seconds (default: 10)
=== 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
3. Environment Variable Check Script : scripts/check-env-vars.sh <server-path>
Purpose : Validates environment variables are properly configured
.env.example exists and documents variables
Required vs optional variables identified
Local .env file has all required variables
fastmcp.json env declarations match .env.example
.env in .gitignore (security)
No placeholder values in production
./scripts/check-env-vars.sh .
ENV_FILE=.env.production ./scripts/check-env-vars.sh .
CHECK_MODE=required ./scripts/check-env-vars.sh .
ENV_FILE: Environment file to check (default: .env)
CHECK_MODE: all, required, or optional (default: all)
=== 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
4. Post-Deployment Verification Script : scripts/verify-deployment.sh <deployment-url>
Purpose : Verifies deployed server is accessible and functioning
DNS resolution working
Server is reachable
Health endpoint responding
MCP endpoint accepting requests
Valid JSON-RPC responses
Tools are available
SSL/TLS certificate valid (HTTPS)
Response time acceptable
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp
./scripts/verify-deployment.sh https://my-server.example.com/mcp
MAX_RETRIES=10 TIMEOUT=60 ./scripts/verify-deployment.sh https://my-server.com/mcp
VERBOSE=1 ./scripts/verify-deployment.sh https://my-server.com/mcp
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)
=== 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
Templates
Deployment Tracking Template File : templates/.fastmcp-deployments.json
Purpose : Track all server deployments with metadata
{
"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
Deployment Checklist File : templates/deployment-checklist.md
Purpose : Step-by-step checklist for successful deployments
Pre-Deployment Checklist (code quality, dependencies, config)
Deployment Checklist (by target: FastMCP Cloud, HTTP, STDIO)
Post-Deployment Verification (accessibility, functionality, performance)
Deployment Tracking (record keeping)
Rollback Plan (if issues occur)
Usage : Copy checklist for each deployment, check off items as completed
Environment Variables Documentation File : templates/env-var-template.md
Purpose : Template for documenting all environment variables
Required Variables (must be set)
Optional Variables (have defaults)
Development-Only Variables
Environment-Specific Configurations
Security Best Practices
Troubleshooting
Usage : Copy template to server repo as ENV_VARS.md, customize with actual variables
Examples
Successful Deployment Workflow File : examples/successful-deployment.md
Contents : Complete end-to-end deployment example including:
Pre-deployment validation output
Environment variable checking
Local testing results
Deployment process
Post-deployment verification
Deployment tracking record
Post-deployment monitoring
Lessons learned
Use Case : Reference for first-time deployments or training
Troubleshooting Guide File : examples/troubleshooting.md
Contents : Common issues and solutions including:
Pre-deployment validation failures
Environment variable issues
Local testing problems
FastMCP Cloud deployment errors
HTTP deployment issues
SSL/TLS certificate problems
Post-deployment verification failures
Performance issues
Runtime crashes
Debugging tools and techniques
Use Case : Reference when deployments fail or issues occur
Deployment Workflow
Standard Deployment Process 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
TRANSPORT=both ./scripts/test-local.sh .
Expected : Server runs successfully in both STDIO and HTTP modes
Create separate GitHub repository
Push code
Connect to FastMCP Cloud
Set environment variables in dashboard
Trigger deployment
For HTTP (your infrastructure):
Deploy to server (VPS, container, etc.)
Configure environment variables
Set up reverse proxy (nginx/caddy)
Configure SSL/TLS
Start server
Update .mcp.json or IDE config
Ensure .env file has required variables
Restart IDE
Step 5: Post-Deployment Verification
./scripts/verify-deployment.sh https://your-deployment-url/mcp
Expected : All checks pass, server responding correctly
Update .fastmcp-deployments.json with:
Deployment timestamp
Git commit hash
Version number
Validation results
Environment variables used
Emergency Rollback
Check deployment logs for errors
Run verification script to identify issues
Review troubleshooting guide for solutions
If critical: Rollback to previous version
Fix issues locally
Re-run validation scripts
Redeploy
Integration with Other Skills
mcp-server-config : Uses config templates for deployment setup
newman-runner : Can integrate API testing before deployment
api-schema-analyzer : Validates API schemas match deployment
Best Practices
Before Every Deployment
Run all validation scripts in order
Test locally in target transport mode
Verify all environment variables
Review deployment checklist
Have rollback plan ready
Security
Never commit .env files
Use .env.example for documentation only
Rotate secrets regularly
Use different values per environment
Store production secrets in secrets manager
Monitoring
Check health endpoint immediately after deployment
Monitor logs for first 24 hours
Set up alerts for failures
Track performance metrics
Document any issues encountered
Documentation
Keep .env.example up to date
Document all environment variables
Track deployments in .fastmcp-deployments.json
Update troubleshooting guide with new issues
Maintain deployment checklist
Common Use Cases
Use Case 1: First Production Deployment
./scripts/validate-server.sh .
./scripts/check-env-vars.sh .
TRANSPORT=both ./scripts/test-local.sh .
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp
Use Case 2: Staging Environment Testing
ENV_FILE=.env.staging ./scripts/check-env-vars.sh .
cp .env.staging .env
TRANSPORT=http ./scripts/test-local.sh .
./scripts/verify-deployment.sh https://staging.example.com/mcp
Use Case 3: Multi-Environment Deployment
./scripts/validate-server.sh .
for env in development staging production; do
echo "Checking $env ..."
ENV_FILE=.env .$env ./scripts/check-env-vars.sh .
done
./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
Use Case 4: Continuous Deployment Pipeline #!/bin/bash
set -e
./scripts/validate-server.sh . || exit 1
ENV_FILE=.env.production ./scripts/check-env-vars.sh . || exit 1
TRANSPORT=both ./scripts/test-local.sh . || exit 1
fastmcp deploy --env production
sleep 30
./scripts/verify-deployment.sh https://my-server.fastmcp.app/mcp || exit 1
echo "Deployment successful!"
Troubleshooting Quick Reference Script fails with permission denied :
sudo apt install python3 python3-pip
Script hangs during testing :
TEST_DURATION=5 ./scripts/test-local.sh .
Verification fails immediately :
TIMEOUT=60 ./scripts/verify-deployment.sh <url>
Success Criteria A deployment is successful when:
✅ All validation scripts pass
✅ Local tests complete successfully
✅ Environment variables properly configured
✅ Deployment completes without errors
✅ Post-deployment verification passes
✅ Health endpoint returns 200 OK
✅ MCP endpoint responds to JSON-RPC
✅ All tools are available
✅ Response time is acceptable
✅ No errors in first 24 hours of logs
✅ Deployment tracked in .fastmcp-deployments.json
Skill Version : 1.0.0
Last Updated : 2025-01-15
Maintained By : FastMCP Plugin Team