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:

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

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

Available Tools​

  • #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.

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