Creating Bundles
Station bundles package environments with agents, MCP configurations, and tools into distributable .tar.gz
archives that can be shared and installed across different Station instances.
Bundle Creation Methods
Method 1: Station UI (Recommended)
- Navigate to http://localhost:8585/environments
- Select your environment
- Click βCreate Bundleβ
- Choose local save or upload to registry
Method 2: CLI Command
# Create bundle from environment
stn bundle create my-environment
# Create with custom output path
stn bundle create my-environment --output my-bundle.tar.gz
Method 3: MCP Tools (For Claude Code/AI)
# Use MCP tools to create bundles programmatically
create_bundle_from_environment(environmentName="my-environment", outputPath="./bundle.tar.gz")
Setting Up Your Environment for Bundling
1. Configure MCP Tools
Create MCP server configurations in your environment:
# Initialize with Ship integration for curated tools
stn init --ship
# Add custom MCP servers
echo '{
"description": "Filesystem operations with MCP server integration",
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem@latest", "{{ .ALLOWED_PATH }}"]
}
},
"name": "filesystem-config"
}' > ~/.config/station/environments/default/filesystem-config.json
# Create variables file for template processing
echo "ALLOWED_PATH: /home/user/projects" > ~/.config/station/environments/default/variables.yml
# Sync to discover tools
stn sync
2. Create and Test Agents
# Create agents using discovered MCP tools
stn agent create "File Monitor" "Monitor filesystem changes" --tools filesystem
# Test agent execution
stn agent run "File Monitor" "Check recent file changes"
Bundle Structure
Station bundles use a standardized format:
bundle.tar.gz
βββ agents/ # Agent definition files
β βββ file-monitor.prompt
β βββ security-scanner.prompt
β βββ terraform-auditor.prompt
βββ mcp-configs/ # MCP server configurations
β βββ filesystem-config.json
β βββ security-tools.json
β βββ terraform-tools.json
βββ variables.yml # Template variables
βββ bundle-info.json # Bundle metadata
βββ README.md # Documentation
Bundle Metadata
Each bundle includes metadata for validation:
{
"name": "devops-security-bundle",
"version": "1.0.0",
"description": "Comprehensive DevOps security scanning tools",
"agents": [
"Security Scanner",
"Terraform Auditor",
"Infrastructure Auditor"
],
"mcp_configs": [
"checkov-config",
"tflint-config",
"filesystem-config"
],
"tools_count": 16,
"created_at": "2024-08-28T12:00:00Z"
}
Installing Bundles
Via Station UI

- Navigate to Bundles section
- Paste bundle URL or upload file
- Select target environment name
- Click βInstall Bundleβ
Via CLI
# Install from local file
stn bundle install ./my-bundle.tar.gz new-environment
# Install from URL (e.g., GitHub release)
stn bundle install https://github.com/user/repo/releases/download/v1.0/bundle.tar.gz production
Real-World Example: DevOps Security Bundle
Hereβs how to create a production-ready security bundle:
1. Set up the environment
# Initialize with Ship integration
stn init --ship
# Add security-specific MCP tools
stn sync
2. Create specialized agents
# Create security scanning agents
stn agent create "Security Scanner" "Comprehensive security vulnerability scanning" --tools checkov,tflint
stn agent create "Terraform Auditor" "Infrastructure as Code security analysis" --tools tflint,filesystem
stn agent create "Infrastructure Auditor" "Cloud infrastructure compliance scanning" --tools checkov,filesystem
3. Test and validate
# Test each agent
stn agent run "Security Scanner" "Scan current directory for vulnerabilities"
stn agent run "Terraform Auditor" "Analyze Terraform configurations"
4. Create and test bundle
# Create bundle
stn bundle create security-environment --output devops-security-bundle.tar.gz
# Test installation in fresh environment
stn bundle install ./devops-security-bundle.tar.gz test-install
Bundle Best Practices
1. Environment Naming
- Use descriptive names:
devops-security
,data-science
,frontend-tools
- Include version in bundle filename:
devops-security-v1.2.tar.gz
2. Documentation
- Include README.md with setup instructions
- Document required variables and their purposes
- Provide usage examples for each agent
3. Template Variables
- Use meaningful variable names:
PROJECT_ROOT
,API_KEY_PATH
- Set sensible defaults in variables.yml
- Document all variables in README.md
4. Testing
- Test bundle installation in clean environments
- Verify all tools are discovered correctly
- Ensure agents execute successfully
CI/CD Integration
GitHub Actions Example
name: Create and Test Bundle
on:
push:
branches: [main]
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Bundle
run: |
# Use Station CLI to create bundle from environment
stn bundle create production --output ./production-bundle.tar.gz
- name: Test Bundle Installation
run: |
docker run -v $(pwd):/workspace epuerta18/station-default:latest \
stn bundle install /workspace/production-bundle.tar.gz ci-test
- name: Upload Bundle Artifact
uses: actions/upload-artifact@v4
with:
name: production-bundle
path: ./production-bundle.tar.gz
Docker Integration
FROM epuerta18/station-default:latest
COPY ./my-bundle.tar.gz /tmp/
RUN stn bundle install /tmp/my-bundle.tar.gz production && \
stn sync production
Publishing to Bundle Registry
- Create GitHub release with your bundle
- Tag with semantic versioning:
v1.0.0
- Upload
.tar.gz
bundle as release asset - Submit to Station Bundle Registry
Troubleshooting
Bundle Creation Fails
- Verify environment exists and has agents/configurations
- Check file permissions in environment directory
- Ensure all MCP servers are running
Bundle Installation Fails
- Verify bundle file exists and is not corrupted
- Check target environment name doesnβt already exist
- Ensure Station server is running for CLI installs
Missing Tools After Installation
- Run
stn sync <environment>
after installation - Verify MCP server commands are available
- Check variables.yml has correct values for your system
Next Steps
- Bundle Registry - Discover existing bundles
- CI/CD Integration - Automate bundle workflows
- MCP Tools - Learn about available tools