Connect your AI assistant (Claude Desktop, Cursor, or any MCP-compatible client) to your Scalr infrastructure platform.
The Scalr MCP (Model Context Protocol) Server enables AI assistants to interact with your Scalr infrastructure through natural language. Ask questions, query resources, create workspaces, and manage your infrastructure—all through conversation.
Key Benefits:
Transport Modes:
SCALR_API_TOKEN.Authorization header.Create a Scalr API token:
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"scalr": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--pull=always",
"--env",
"SCALR_API_TOKEN=your_api_token_here",
"--env",
"SCALR_API_URL=https://your-account.scalr.io",
"scalr/mcp-server:latest"
]
}
}
}
Restart Claude Desktop to apply changes.
~/.cursor/mcp.json:{
"mcpServers": {
"scalr": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--pull=always",
"--env",
"SCALR_API_TOKEN=your_api_token_here",
"--env",
"SCALR_API_URL=https://your-account.scalr.io",
"scalr/mcp-server:latest"
]
}
}
}
For remote integrations:
docker run -d \
--pull always \
--name scalr-mcp-server \
-p 8000:8000 \
-e SCALR_API_URL=https://your-account.scalr.io \
-e MCP_TRANSPORT=http \
-e MCP_HTTP_HOST=0.0.0.0 \
-e MCP_LOG_FILE=/var/log/mcp/server.log \
-v ~/mcp-logs:/var/log/mcp \
scalr/mcp-server:latest
Authentication:
Authorization: Bearer <token> header (per-request)SCALR_API_TOKEN environment variable as global fallbackSecurity:
-e MCP_CORS_ORIGINS='http://localhost:3000'-e MCP_HTTP_ALLOWED_HOSTS='your-domain.com'Browser requests to /mcp accept only http://localhost:<port>, http://127.0.0.1:<port> and http://[::1]:<port>. MCP_CORS_ORIGINS can only narrow this list. External origins remain rejected even when explicitly listed or when the value is *. Requests without an Origin header remain allowed, subject to Host and token checks.
If running the server in HTTP mode (MCP_TRANSPORT=http), use this configuration:
{
"mcpServers": {
"scalr-local": {
"url": "http://localhost:8000/mcp",
"headers": {
"Authorization": "Bearer <your token>",
"Content-Type": "application/json"
}
}
}
}
Important for stdio clients: Replace:
your_api_token_here with your actual Scalr API tokenyour-account.scalr.io with your Scalr account URL (e.g., mycompany.scalr.io)Open your AI client and try these example queries:
The MCP server is configured through environment variables. All configuration options and their defaults:
| Variable | Required | Default | Description |
|---|---|---|---|
SCALR_API_URL | Yes | - | Scalr account URL. Examples: your-account.scalr.io or https://your-account.scalr.io |
SCALR_API_TOKEN | Conditional* | - | Scalr API token (Personal Access Token or Service Account Token). Required for stdio transport, optional for HTTP transport |
SCALR_API_TIMEOUT | No | 30 | Request timeout in seconds for Scalr API calls |
MCP_TRANSPORT | No | stdio | Transport mode: stdio (for local desktop clients) or http (for network server) |
MCP_HTTP_HOST | No | 127.0.0.1 | HTTP server bind address. Use 0.0.0.0 to allow network access (required for Docker port mapping) |
MCP_HTTP_PORT | No | 8000 | HTTP server port (valid range: 1-65535) |
MCP_CORS_ORIGINS | No | * | Additional Origin allowlist and CORS configuration. Can only narrow the loopback origins accepted by /mcp; "" disables CORS headers, not Origin validation |
MCP_HTTP_ALLOWED_HOSTS | No | localhost,127.0.0.1,::1 | Comma-separated list of allowed Host header values for DNS rebinding protection. Defaults to localhost addresses only |
MCP_LOG_FILE | No | - | Path to log file. If not set, logs only to stdout. For Docker, use with volume mount (see HTTP Transport example) |
* Token Requirements:
SCALR_API_TOKEN is requiredSCALR_API_TOKEN is optional — clients can provide tokens via Authorization: Bearer <token> header per-requestThe MCP server provides 52 tools across 9 categories:
Full tool list: All endpoints marked with x-mcp-tool: true in the Scalr OpenAPI Specification are available as MCP tools.
docker ps~/Library/Logs/Claude/mcp-server-scalr.log%APPDATA%\Claude\Logs\mcp-server-scalr.log~/.config/Claude/logs/mcp-server-scalr.logcurl -H "Authorization: Bearer YOUR_TOKEN" \
https://your-account.scalr.io/api/iacp/v3/accounts
If you see "pull access denied" or network errors:
# Manually pull the image to test connectivity
docker pull scalr/mcp-server:latest
# Check if image exists
docker images | grep scalr/mcp-server
Authorization: Bearer <token> header to requestsMCP_HTTP_HOST=0.0.0.0 for network accesscurl http://localhost:8000/healthHere are some example questions you can ask Claude:
SCALR_API_TOKEN environment variableAuthorization: Bearer <token> header OR global SCALR_API_TOKEN fallbackFor HTTP transport in production, configure security settings:
MCP_CORS_ORIGINS='http://localhost:3000'; external browser origins are not supportedMCP_HTTP_ALLOWED_HOSTS='your-domain.com'Version: 0.0.10
docker pull scalr/mcp-server:latest