MCP Examples
Practical examples and workflows for using Model Context Protocol (MCP) with AI code assistants to streamline Azion Platform development.
Learn how to leverage MCP-enabled code assistants for common Azion Platform tasks.
Deploy a static site
Use natural language to get step-by-step deployment guidance.
Example conversation
Request
Response
The assistant will:
- Use
deploy_azion_static_sitetool to retrieve deployment guide - Provide step-by-step instructions
- Guide you through:
- Project initialization with
azion init - Configuration setup
- Build process with
azion build - Deployment with
azion deploy
- Project initialization with
- Share the production URL after deployment
What happens behind the scenes
- MCP server searches deployment documentation
- Returns context-aware guidance based on your project type
- Provides commands specific to static site deployment
Create analytics queries
Generate GraphQL queries for Real-Time Metrics without memorizing the schema.
Example: Traffic analysis
Request
Response
Example: Cache performance
Request
Response
Configure Rules Engine
Create complex Rules Engine configurations using natural language descriptions.
Example: Security headers
Request
Response
Example: Cache optimization
Request
Response
Search documentation
Get instant answers about Azion Platform features and capabilities.
Common queries
| Query | Tool Used | Result |
|---|---|---|
| ”How do I configure DDoS protection?” | search_azion_docs_and_site | DDoS Protection setup guide |
| ”Show me Next.js deployment examples” | search_azion_code_samples | Next.js templates and samples |
| ”What CLI commands manage functions?” | search_azion_cli_commands | Functions-related CLI commands |
| ”How to create Terraform resources?” | search_azion_terraform | Terraform provider examples |
Troubleshooting deployments
Get help diagnosing and fixing deployment issues.
Example workflow
Request
Response
-
Check deployment logs:
-
Verify origin configuration:
- The assistant searches for origin troubleshooting docs
- Provides checklist of common origin issues
-
Test origin connectivity:
-
Review Rules Engine:
- Checks for redirect loops
- Validates cache configurations
-
Monitor Real-Time Metrics:
- Generates GraphQL query for error analysis
Framework-specific deployments
Get tailored guidance for your specific framework.
Supported frameworks
The MCP server provides specialized guidance for:
- Next.js: SSR/SSG configuration, API routes, middleware
- React: SPA deployment, routing configuration
- Vue.js: Build optimization, history mode setup
- Angular: Production builds, service workers
- Astro: Static and SSR modes, integrations
- Remix: Edge deployment, data loading
- SvelteKit: Adapter configuration, endpoints
Example: Next.js with ISR
The assistant will:
- Check for Next.js in your project
- Configure
azion.config.jsfor ISR support - Set up proper cache policies
- Deploy with optimized settings
- Provide monitoring queries for ISR performance
Advanced workflows
Multi-environment deployment
The assistant helps:
- Create separate applications
- Configure environment variables
- Set up deployment pipelines
- Implement proper domain routing
Performance optimization
The assistant provides:
- Image optimization strategies
- Cache configuration recommendations
- Rules Engine for resource hints
- GraphQL queries to monitor improvements
Tips for effective use
- Be specific: Provide context about your project type and requirements
- Iterative refinement: Start simple and add complexity gradually
- Combine tools: Use multiple MCP tools together for comprehensive solutions
- Learn patterns: Save successful configurations for reuse