OpenClaw MCP Bridge provides access to your AI assistant. Proper security is critical.
| Threat | Risk | Mitigation |
|---|---|---|
| Unauthorized access | High | OAuth2 authentication, API keys |
| Token theft | High | Short-lived tokens, HTTPS only |
| Man-in-the-middle | High | TLS 1.3, certificate validation |
| Denial of service | Medium | Rate limiting, request size limits |
| Information disclosure | Medium | Audit logging, minimal error details |
- Enable OAuth authentication (
OAUTH_ENABLED=true) - Use HTTPS (deploy behind reverse proxy with TLS)
- Set strong API keys or configure OAuth provider
- Restrict network access (firewall rules)
- Keep dependencies updated
- Use short-lived OAuth tokens (15-60 minutes)
- Enable audit logging
- Set up rate limiting
- Configure CORS restrictions
- Monitor for suspicious activity
- Regular security audits
Best for enterprise deployments with existing identity providers:
OAUTH_ENABLED=true
OAUTH_INTROSPECTION_ENDPOINT=https://auth.company.com/oauth2/introspect
OAUTH_CLIENT_ID=openclaw-mcp
OAUTH_CLIENT_SECRET=your-client-secret
OAUTH_REQUIRED_SCOPES=openclaw:read,openclaw:writeSupported providers:
- Auth0
- Keycloak
- Okta
- Azure AD
- Any OAuth2-compliant provider
For personal or small team deployments:
OAUTH_ENABLED=true
API_KEYS=key-abc123,key-def456Generate secure keys:
openssl rand -hex 32server {
listen 443 ssl http2;
server_name mcp.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
ssl_protocols TLSv1.3;
# Rate limiting
limit_req_zone $binary_remote_addr zone=mcp:10m rate=10r/s;
limit_req zone=mcp burst=20 nodelay;
# Security headers
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}If you discover a security vulnerability, please:
- Do not open a public issue
- Email security details to: [security contact]
- Include steps to reproduce
- Allow 90 days for a fix before disclosure
We release security patches as soon as possible. Keep your installation updated:
npm update -g openclaw-mcpSubscribe to security advisories on GitHub.