|
|
||
|---|---|---|
| .claude | ||
| .github/workflows | ||
| scripts/hooks | ||
| .claudeignore | ||
| .env.example | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| auth.go | ||
| config.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| QUICKSTART.md | ||
| README.md | ||
| REMOTE_SERVER.md | ||
| tools.go | ||
Edge Connect MCP Server
A Model Context Protocol (MCP) server implementation for Edge Connect, providing tools to manage applications and application instances.
Supports both local (stdio) and remote (HTTP/SSE) operation modes.
Features
This MCP server implements all Edge Connect API endpoints for:
Apps Management
create_app- Create a new Edge Connect applicationshow_app- Retrieve a specific application by keylist_apps- List all applications matching filter criteriaupdate_app- Update an existing applicationdelete_app- Delete an application (idempotent)
App Instance Management
create_app_instance- Create a new application instance on a cloudletshow_app_instance- Retrieve a specific application instancelist_app_instances- List all application instances matching filter criteriaupdate_app_instance- Update an existing application instancerefresh_app_instance- Refresh instance statedelete_app_instance- Delete an application instance (idempotent)
Installation
- Clone this repository
- Build the server:
go build -o edge-connect-mcp
Configuration
The server is configured via environment variables:
Required Configuration
EDGE_CONNECT_BASE_URL- Base URL of the Edge Connect API (e.g.,https://hub.apps.edge.platform.mg3.mdb.osc.live)EDGE_CONNECT_AUTH_TYPE- Authentication type:token,credentials, ornone
Authentication Configuration
For token-based authentication (auth_type=token):
EDGE_CONNECT_TOKEN- Bearer token for authentication
For credentials-based authentication (auth_type=credentials):
EDGE_CONNECT_USERNAME- Username for authenticationEDGE_CONNECT_PASSWORD- Password for authentication
For no authentication (auth_type=none):
- No additional configuration required (useful for testing)
Optional Configuration
EDGE_CONNECT_DEFAULT_REGION- Default region to use when not specified in tool calls (default:EU)EDGE_CONNECT_DEBUG- Enable debug logging (trueor1)
Usage
Running the Server
The server can run in two modes:
1. Local Mode (stdio)
For local integration with Claude Desktop or other MCP clients:
export EDGE_CONNECT_BASE_URL="https://hub.apps.edge.platform.mg3.mdb.osc.live"
export EDGE_CONNECT_AUTH_TYPE="credentials"
export EDGE_CONNECT_USERNAME="your-username"
export EDGE_CONNECT_PASSWORD="your-password"
export EDGE_CONNECT_DEFAULT_REGION="EU"
# Run in stdio mode (default)
./edge-connect-mcp
# Or explicitly specify stdio mode
./edge-connect-mcp -mode stdio
2. Remote Mode (HTTP/SSE)
For remote access over HTTP with Server-Sent Events:
export EDGE_CONNECT_BASE_URL="https://hub.apps.edge.platform.mg3.mdb.osc.live"
export EDGE_CONNECT_AUTH_TYPE="credentials"
export EDGE_CONNECT_USERNAME="your-username"
export EDGE_CONNECT_PASSWORD="your-password"
export EDGE_CONNECT_DEFAULT_REGION="EU"
# Remote server configuration
export MCP_SERVER_MODE="remote"
export MCP_REMOTE_HOST="0.0.0.0"
export MCP_REMOTE_PORT="8080"
# Optional: Enable authentication for remote access
export MCP_REMOTE_AUTH_REQUIRED="true"
export MCP_REMOTE_AUTH_TOKENS="your-secret-token-1,your-secret-token-2"
# Run in remote mode
./edge-connect-mcp -mode remote -host 0.0.0.0 -port 8080
Command-line flags override environment variables:
-mode: Server mode (stdioorremote)-host: Host to bind to (remote mode only)-port: Port to bind to (remote mode only)
Integrating with Claude Code (CLI)
To add this MCP server to Claude Code, use the mcp add command:
# Add the MCP server
claude mcp add edge-connect
# Configure the command
claude mcp edit edge-connect --set command=/path/to/edge-connect-mcp
# Set environment variables
claude mcp edit edge-connect --set-env EDGE_CONNECT_BASE_URL=https://hub.apps.edge.platform.mg3.mdb.osc.live
claude mcp edit edge-connect --set-env EDGE_CONNECT_AUTH_TYPE=credentials
claude mcp edit edge-connect --set-env EDGE_CONNECT_USERNAME=your-username
claude mcp edit edge-connect --set-env EDGE_CONNECT_PASSWORD=your-password
claude mcp edit edge-connect --set-env EDGE_CONNECT_DEFAULT_REGION=EU
Or edit your Claude Code settings file directly:
Location: ~/.claude.json (Linux/macOS) or %APPDATA%\claude-code\settings.json (Windows)
{
"mcpServers": {
"edge-connect": {
"command": "/path/to/edge-connect-mcp",
"env": {
"EDGE_CONNECT_BASE_URL": "https://hub.apps.edge.platform.mg3.mdb.osc.live",
"EDGE_CONNECT_AUTH_TYPE": "credentials",
"EDGE_CONNECT_USERNAME": "your-username",
"EDGE_CONNECT_PASSWORD": "your-password",
"EDGE_CONNECT_DEFAULT_REGION": "EU"
}
}
}
}
Verify the server is working:
# List MCP servers
claude mcp list
# Test the connection
claude mcp test edge-connect
Integrating with Claude Desktop
Local Integration (stdio mode)
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"edge-connect": {
"command": "/path/to/edge-connect-mcp",
"env": {
"EDGE_CONNECT_BASE_URL": "https://hub.apps.edge.platform.mg3.mdb.osc.live",
"EDGE_CONNECT_AUTH_TYPE": "credentials",
"EDGE_CONNECT_USERNAME": "your-username",
"EDGE_CONNECT_PASSWORD": "your-password",
"EDGE_CONNECT_DEFAULT_REGION": "EU"
}
}
}
}
Remote Integration (HTTP/SSE mode)
-
Start the server in remote mode:
./edge-connect-mcp -mode remote -host 0.0.0.0 -port 8080 -
Connect to the remote server using SSE endpoint:
http://your-server:8080/sse -
If authentication is enabled, include Bearer token in requests:
Authorization: Bearer your-secret-token
The remote server provides:
- SSE Endpoint:
http://host:port/sse- MCP communication via Server-Sent Events - Health Check:
http://host:port/health- Server health status
Tool Examples
Create an Application
{
"organization": "my-org",
"name": "my-app",
"version": "1.0.0",
"deployment": "docker",
"image_path": "https://registry-1.docker.io/library/nginx:latest",
"access_ports": "tcp:80",
"default_flavor_name": "EU.small"
}
List Applications
{
"organization": "my-org"
}
Create an Application Instance
{
"organization": "my-org",
"instance_name": "my-instance",
"cloudlet_org": "cloudlet-org",
"cloudlet_name": "cloudlet-01",
"app_org": "my-org",
"app_name": "my-app",
"app_version": "1.0.0",
"flavor_name": "EU.small"
}
List Application Instances
{
"organization": "my-org",
"app_name": "my-app"
}
Security
This implementation follows the security guidelines from CLAUDE.md:
Edge Connect API Security
- Authentication: Supports token-based auth and credentials-based auth for Edge Connect API
- Input Validation: All inputs are strictly validated using JSON schemas
- Error Handling: Errors are properly categorized without leaking sensitive details
- Transport Security: Expects HTTPS/TLS connections to the Edge Connect API
- Least Privilege: Scoped access based on authentication credentials
Remote Server Security
When running in remote mode:
- Bearer Token Authentication: Optional Bearer token validation for remote access
- Rate Limiting: Basic rate limiting to prevent DoS attacks
- CORS: Configurable CORS headers for web client access
- Timeouts: Request/response timeouts to prevent resource exhaustion
- Graceful Shutdown: Proper shutdown handling for safe termination
Production Recommendations:
- Always enable
MCP_REMOTE_AUTH_REQUIRED=truefor remote deployments - Use strong, randomly generated tokens (min 32 characters)
- Deploy behind a reverse proxy with HTTPS/TLS termination
- Implement proper OAuth 2.1 with PKCE for production use
- Use firewall rules to restrict access to trusted networks
- Enable rate limiting at the reverse proxy level
- Monitor and log all access attempts
Dependencies
edp.buildth.ing/DevFW-CICD/edge-connect-client/v2- Edge Connect Go SDKgithub.com/modelcontextprotocol/go-sdk- Model Context Protocol Go SDK
Development
Project Structure
.
├── main.go # Server entry point and initialization
├── config.go # Configuration loading and validation
├── tools.go # MCP tool definitions and handlers
├── utils.go # Utility functions
├── README.md # This file
└── .env.example # Example environment configuration
Building
go build -o edge-connect-mcp
Testing
Set up your environment variables and run the server:
./edge-connect-mcp
The server will start in stdio mode and communicate via JSON-RPC over stdin/stdout.
License
See LICENSE file for details.
Support
For issues or questions, please refer to the Edge Connect documentation or contact support.