This guide explains how to configure and connect to the GCM MCP Server.
The GCM MCP Server supports two transport modes:
Use the provided mcp-config.json:
{
"mcpServers": {
"gcm-mcp-server": {
"url": "http://localhost:8002/sse",
"transport": "sse",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
Steps to use:
python -m src.server --transport sse --host 0.0.0.0 --port 8002
curl -X POST http://localhost:8002/admin/keys \
-H "Content-Type: application/json" \
-d '{"user": "your-username"}'
This will return a response like:
{
"key": "abc123def456...",
"user": "your-username",
"created": "2024-01-01T12:00:00Z",
"key_prefix": "abc123de"
}
Update mcp-config.json with your API key:
Replace YOUR_API_KEY_HERE with the key value from step 2.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)Add this to your MCP client configuration:
{
"mcpServers": {
"gcm-mcp-server": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/gcm-mcp-server",
"env": {
"GCM_HOST": "your-gcm-host",
"GCM_USERNAME": "your-username",
"GCM_PASSWORD": "your-password",
"GCM_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Note: Replace /path/to/gcm-mcp-server with the actual path to this project directory.
Before starting the server, ensure your .env file is configured with the required variables:
# Required
GCM_HOST=your-gcm-hostname
GCM_USERNAME=your-username
GCM_PASSWORD=your-password
GCM_CLIENT_SECRET=your-client-secret
# Optional (with defaults)
GCM_API_PORT=31443
GCM_KEYCLOAK_PORT=30443
GCM_CLIENT_ID=gcmclient
GCM_AUTH_MODE=auto
GCM_VERIFY_SSL=false
GCM_REQUEST_TIMEOUT=30
GCM_MCP_KEY_STORE_PATH=/data/keys.json
GCM_LOG_LEVEL=INFO
curl http://localhost:8002/admin/keys
curl -X DELETE http://localhost:8002/admin/keys/{key_prefix}
Note: Admin endpoints are only accessible from localhost for security.
Check if the server is running:
curl http://localhost:8002/health
Expected response:
{
"status": "ok",
"server": "GCM MCP Server",
"version": "1.0.0",
"transport": "sse",
"auth_required": true,
"active_keys": 1,
"services": ["usermanagement", "tde", "assetinventory", ...]
}
The GCM MCP Server provides three main tools:
curl http://localhost:8002/health.envcurl -k https://{GCM_HOST}:{GCM_API_PORT}/healthcurl http://localhost:8002/admin/keysBearer {your-key}.env file is git-ignored to prevent credential leakageGCM_VERIFY_SSL=true in production environments