Skip to main content

Usage Guide

This guide provides detailed instructions on how to install, configure, and use the CWCloud MCP Server.

Prerequisites​

Installation​

Option 1: Clone and Build​

# Clone the repository
git clone https://github.com/cwloudtech/cwcloud-mcp.git
cd cwcloud-mcp

# Build the server
go build -o cwcloud-mcp ./cmd/server

# Make it executable
chmod +x cwcloud-mcp

Option 2: Direct Installation​

# Install directly from source
go install github.com/cwloudtech/cwcloud-mcp/cmd/server@latest

Configuration​

Environment Setup​

Create a .env file in the project root:

# Copy the example configuration
cp .env.example .env

Edit .env with your CWCloud credentials:

# CWCloud API Configuration
COMWORK_API_URL=https://api.cwcloud.tech
COMWORK_ACCESS_KEY=your_access_key_here
COMWORK_SECRET_KEY=your_secret_key_here

# Server Configuration (optional)
SERVER_PORT=8080
LOG_LEVEL=info

Getting Your API Keys​

  1. Log in to your CWCloud Dashboard
  2. Navigate to Credentials β†’ API Keys
  3. Generate a new API key pair
  4. Copy the Access Key and Secret Key to your .env file

Quick Start​

The fastest way to get started with CWCloud MCP Server and GitHub Copilot:

# Clone and navigate to the project
git clone https://github.com/cwloudtech/cwcloud-mcp.git
cd cwcloud-mcp

# Run the automated setup
./setup-github-copilot.sh

This will:

  • Build the server
  • Configure your CWCloud API credentials
  • Set up VS Code MCP integration
  • Test the connection

See Github Copilot Integration Guide for detailed setup guide

Manual Testing​

# Run interactive tests with AI functionality
./test-interactive.sh

Connect with MCP Clients​

GitHub Copilot​

After running ./setup-github-copilot.sh, restart VS Code and use:

AI Tools:

  • #generate_ai_prompt - Generate AI responses using various models
  • #list_conversations - List conversation history
  • #list_adapters - List available AI adapters

User Environment Tools (Read-Only):

  • #list_environments - List all your cloud environments
  • #get_environment - Get detailed information about a specific environment

Admin Environment Tools (Full Management):

  • #admin_list_environments - List environments with admin details and statistics
  • #admin_get_environment - Get environment details with admin metadata
  • #admin_create_environment - Create new cloud environments (admin only)
  • #admin_update_environment - Update existing environment properties (admin only)
  • #admin_delete_environment - Delete environments with confirmation (admin only)

Docker Usage​

Build Docker Image​

# Build the Docker image
docker build -t cwcloud-mcp .

Run with Environment Variables​

# Method 1: Using individual environment variables
docker run -i --rm \
-e COMWORK_API_URL=https://api.cwcloud.tech \
-e COMWORK_ACCESS_KEY=your_access_key \
-e COMWORK_SECRET_KEY=your_secret_key \
-e LOG_LEVEL=info \
cwcloud-mcp

# Method 2: Using environment file
docker run -i --rm --env-file .env.docker cwcloud-mcp

Test Docker Container​

# Test MCP protocol (basic functionality)
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {"tools": {}}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | \
docker run -i --rm --env-file .env.docker cwcloud-mcp

# Test AI generation
echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "generate_ai_prompt", "arguments": {"adapter": "gpt4o", "message": "Hello world!"}}}' | \
docker run -i --rm --env-file .env.docker cwcloud-mcp

# Test conversation listing
echo '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "list_conversations", "arguments": {}}}' | \
docker run -i --rm --env-file .env.docker cwcloud-mcp

# Test environment listing
echo '{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "list_environments", "arguments": {"format": "table"}}}' | \
docker run -i --rm --env-file .env.docker cwcloud-mcp

# Test admin environment listing (requires admin privileges)
echo '{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "admin_list_environments", "arguments": {"format": "table", "include_stats": true}}}' | \
docker run -i --rm --env-file .env.docker cwcloud-mcp

Available Tools (119 Total)​

AI Tools (3):

  • generate_ai_prompt: Generate AI responses using various models (GPT-4, Claude, Gemini).
  • list_conversations: List and manage your AI conversation history.
  • list_adapters: List all available AI adapters and their current status.

Environment Management (11 tools):

  • list_environments: List all your cloud environments with various output formats.
  • get_environment: Get detailed information about a specific environment.
  • admin_list_environments: List environments with enhanced admin details and statistics.
  • admin_get_environment: Get environment details with admin metadata and additional information.
  • admin_create_environment: Create new cloud environments (VM, Kubernetes, Functions, etc.).
  • admin_update_environment: Update environment properties like name, size, or configuration.
  • admin_delete_environment: Safely delete environments with confirmation requirements.

Project Management (7 tools):

  • list_projects: List all your projects with various output formats.
  • get_project: Get detailed information about a specific project.
  • admin_list_projects: List projects with admin privileges and enhanced details.
  • admin_get_project: Get project details with admin metadata.
  • admin_create_project: Create new projects with admin privileges.
  • admin_update_project: Update project properties with admin privileges.
  • admin_delete_project: Delete projects with admin privileges and confirmation.

Instance Management (10 tools):

  • list_instances: List all your VM instances with various output formats.
  • get_instance: Get detailed information about a specific instance.
  • create_instance: Create new VM instances.
  • update_instance: Update existing instance properties.
  • delete_instance: Delete VM instances.
  • admin_list_instances: List instances with admin privileges and enhanced details.
  • admin_get_instance: Get instance details with admin metadata.
  • admin_create_instance: Create instances with admin privileges.
  • admin_update_instance: Update instances with admin privileges.
  • admin_delete_instance: Delete instances with admin privileges.

Storage Management (10 tools):

  • list_buckets: List all your storage buckets with various output formats.
  • get_bucket: Get detailed information about a specific bucket.
  • create_bucket: Create new storage buckets.
  • update_bucket: Update existing bucket properties.
  • delete_bucket: Delete storage buckets.
  • admin_list_buckets: List buckets with admin privileges and enhanced details.
  • admin_get_bucket: Get bucket details with admin metadata.
  • admin_create_bucket: Create buckets with admin privileges.
  • admin_update_bucket: Update buckets with admin privileges.
  • admin_delete_bucket: Delete buckets with admin privileges.

Registry Management (10 tools):

  • list_registries: List all your container registries with various output formats.
  • get_registry: Get detailed information about a specific registry.
  • create_registry: Create new container registries.
  • update_registry: Update existing registry properties.
  • delete_registry: Delete container registries.
  • admin_list_registries: List registries with admin privileges and enhanced details.
  • admin_get_registry: Get registry details with admin metadata.
  • admin_create_registry: Create registries with admin privileges.
  • admin_update_registry: Update registries with admin privileges.
  • admin_delete_registry: Delete registries with admin privileges.

Function Management (12 tools):

  • list_functions: List all your serverless functions with various output formats.
  • get_function: Get detailed information about a specific function.
  • create_function: Create new serverless functions.
  • update_function: Update existing function properties.
  • delete_function: Delete serverless functions.
  • invoke_function: Execute serverless functions with parameters.
  • list_invocations: List function invocation history and logs.
  • admin_list_functions: List functions with admin privileges and enhanced details.
  • admin_get_function: Get function details with admin metadata.
  • admin_create_function: Create functions with admin privileges.
  • admin_update_function: Update functions with admin privileges.
  • admin_delete_function: Delete functions with admin privileges.

Monitoring Management (10 tools):

  • list_monitors: List all your monitoring endpoints with various output formats.
  • get_monitor: Get detailed information about a specific monitor.
  • create_monitor: Create new monitoring endpoints.
  • update_monitor: Update existing monitor properties.
  • delete_monitor: Delete monitoring endpoints.
  • admin_list_monitors: List monitors with admin privileges and enhanced details.
  • admin_get_monitor: Get monitor details with admin metadata.
  • admin_create_monitor: Create monitors with admin privileges.
  • admin_update_monitor: Update monitors with admin privileges.
  • admin_delete_monitor: Delete monitors with admin privileges.

User Management (10 tools):

  • list_users: List all system users with various output formats.
  • get_user: Get detailed information about a specific user.
  • create_user: Create new system users.
  • update_user: Update existing user properties.
  • delete_user: Delete system users.
  • admin_list_users: List users with admin privileges and enhanced details.
  • admin_get_user: Get user details with admin metadata.
  • admin_create_user: Create users with admin privileges.
  • admin_update_user: Update users with admin privileges.
  • admin_delete_user: Delete users with admin privileges.

DNS Management (10 tools):

  • list_dns_records: List all your DNS records with various output formats.
  • get_dns_record: Get detailed information about a specific DNS record.
  • create_dns_record: Create new DNS records (A, AAAA, CNAME, MX, etc.).
  • update_dns_record: Update existing DNS record properties.
  • delete_dns_record: Delete DNS records.
  • admin_list_dns_records: List DNS records with admin privileges and enhanced details.
  • admin_get_dns_record: Get DNS record details with admin metadata.
  • admin_create_dns_record: Create DNS records with admin privileges.
  • admin_update_dns_record: Update DNS records with admin privileges.
  • admin_delete_dns_record: Delete DNS records with admin privileges.

Supported AI Models:

  • gpt4o, gpt4o-mini - OpenAI GPT-4 variants
  • claude3sonnet, claude3haiku - Anthropic Claude 3
  • gemini, gemini-pro - Google Gemini
  • openmistral - OpenMistral

For detailed usage examples, see Github Copilot Integration Guide