{"id":"a7290e07-d1ad-4da1-b426-210bf5fb11ed","slug":"spacelift-solutions-intent","kind":"mcp","name":"intent","summary":"demo files for Spacelift Intent","owner":"spacelift-solutions","repoUrl":"https://github.com/spacelift-solutions/intent","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2025-10-27T15:18:27.000Z","addedAt":"2026-10-21T16:11:15.750Z","logoUrl":"https://avatars.githubusercontent.com/u/185397681?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["files-documents"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-27T20:32:10.551Z","sample":false,"url":"https://conduits.dev/tools/spacelift-solutions-intent","language":"HTML","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Spacelift Intent MCP Server Demo - Snake Game\n\nThis project demonstrates the capabilities of the Spacelift Intent MCP Server by deploying a fully functional browser-based Snake game to static website hosting - entirely through AI-driven infrastructure management. The demo is **cloud-agnostic**: run it on **AWS S3** or **Azure Blob Storage** (the same Snake game, deployed and governed the same way on either cloud).\n\n## Project Overview\n\nThis snake game was **100% created using AI**, including:\n- Game logic and implementation\n- UI/UX design with Dracula theme color scheme\n- AWS infrastructure setup and configuration\n- Debugging and bug fixes based on user feedback\n- All infrastructure deployed through the Spacelift Intent MCP Server\n\n## What is Spacelift Intent?\n\nSpacelift Intent is an MCP (Model Context Protocol) server that provides AI assistants with the ability to manage infrastructure through OpenTofu/Terraform. It handles:\n- Resource lifecycle management (create, read, update, delete)\n- Dependency tracking between resources\n- Policy enforcement and validation\n- State management\n- Provider schema discovery\n\n## Replicating This Demo\n\n**Phase 1: Setup Intent Project**\n\n1. Clone this repository to your local machine: `git clone git@github.com:spacelift-solutions/intent.git`\n    - cd into its directory before continuing (if you dont do this, the mcp server wont work correctly with claude code)\n2. Create a new Spacelift Intent Project in your Spacelift account (note its id for later)\n3. Create the **intent** policy for your target cloud in your Spacelift account:\n   - AWS: `block-public-s3-websites.rego`\n   - Azure: `block-public-azure-static-websites.rego`\n4. Attach the policy to your Intent Project.\n5. Setup claude with your Spacelift Intent Server ex. `claude mcp add -t http spacelift https://spacelift-solutions.app.spacelift.io/intent/mcp`\n6. Ensure the MCP server is authenticated by starting a new claude code session and running `/mcp`. \n\n**Phase 2: Start Demo and Demonstrate Blocking**\n\n1. Start a new Claude Code session\n2. Request: \"Use Spacelift Intent project `{your-intent-project-id}`\"\n3. Request: \"Let's deploy my snake game to Amazon S3\"\n4. Observe: The AI will successfully create the S3 bucket, but policy violations will block:\n   - `aws_s3_bucket_website_configuration` - Public hosting blocked\n   - `aws_s3_bucket_public_access_block` - Public access blocked (all 4 settings must be `true`)\n   - `aws_s3_bucket_policy` - Public bucket policy blocked (Principal: \"*\" not allowed)\n5. The deployment will fail with clear policy violation messages\n\n**Phase 3: Remove Policy and Deploy Successfully**\n\n1. Remove the policy from your Intent Project in Spacelift\n2. Request: \"I've removed the policy, lets try deploying it now.\"\n3. Observe: All resources create successfully without policy blocking\n4. The snake game is now publicly accessible\n\n**Phase 4: Import Unmanaged Resources and Generate IaC**\n\nThis phase demonstrates Intent's ability to adopt existing infrastructure and generate IaC code:\n\n1. Create an unmanaged AWS resource outside Intent (e.g., via AWS console or CLI):\n   ```bash\n   aws s3api create-bucket --bucket my-unmanaged-demo-bucket-$(date +%s) --region us-east-1\n   ```\n   Note the bucket name for the next step.\n\n2. Request: \"Import the existing S3 bucket `my-unmanaged-demo-bucket-XXXXX` into Intent\"\n3. Observe: The AI will:\n   - Use `lifecycle-resources-import` to bring the resource under management\n   - Add it to the Intent state\n   - Show the imported resource configuration\n\n4. Request: \"Generate OpenTofu HCL code, including import blocks, into a file for all resources in this project\"\n5. Observe: The AI will:\n   - Retrieve state for all managed resources\n   - Generate proper HCL configuration with resource blocks\n   - Include resource dependencies and references\n   - Output ready-to-use `.tf` files\n\n**Phase 5: Cleanup**\n\n1. Request: \"Delete all resources in my Intent project\"\n2. Confirm with: `CONFIRM`\n\n## Azure Variant\n\nThe phases above use AWS. To run the same demo on **Azure Blob Storage static website hosting**, attach `block-public-azure-static-websites.rego` instead and use these requests. Everything else (project setup, removing the policy, import, IaC generation, cleanup) is identical.\n\n**Phase 2 (Azure): Start Demo and Demonstrate Blocking**\n\n1. Request: \"Use Spacelift Intent project `{your-intent-project-id}`\"\n2. Request: \"Let's deploy my snake game to Azure Blob Storage static website hosting\"\n3. Observe: The AI creates the resource group and storage account, but policy violations block:\n   - `azurerm_storage_account_static_website` - Public static website hosting blocked\n   - `azurerm_storage_account` with `allow_nested_items_to_be_public = true` - Public blob access blocked\n4. The deployment fails with clear policy violation messages\n\n**Phase 3 (Azure): Remove Policy and Deploy Successfully**\n\n1. Remove the policy from your Intent Project in Spacelift\n2. Request: \"I've removed the policy, lets try deploying it now.\"\n3. Observe: All resources create successfully; the game is served at the storage account's `primary_web_endpoint`\n\n**Phase 4 (Azure): Import Unmanaged Resources and Generate IaC**\n\n1. Create an unmanaged Azure resource outside Intent, e.g.:\n   ```bash\n   az storage account create --name unmanageddemo$RANDOM --resource-group <rg> --location eastus\n   ```\n2. Request: \"Import the existing storage account `<name>` into Intent\"\n3. Request: \"Generate OpenTofu HCL code, including import blocks, into a file for all resources in this project\"\n\nPhases 1 and 5 (setup and cleanup) are the same as the AWS track.\n\n### Key Demo Highlights\n\n- **Policy-as-Code**: Rego policies provide governance and compliance guardrails\n- **Clear Violations**: Policy messages explain exactly what's blocked and why\n- **Selective Enforcement**: Policies allow private S3 buckets while blocking public ones\n- **AI Understanding**: The AI interprets policy violations and explains them to users\n- **Flexible Governance**: Policies can be attached/removed as needed per environment\n\n**Important**: The README.md file contains implementation details that make for a less engaging demo. The CLAUDE.md file ensures the AI doesn't read this file unless explicitly requested.\n"}