Environment Variables
Configure the server using environment variables:Required
Your Kubiya API key (JWT token). Get it from the Kubiya Dashboard → Settings → API Keys.
Optional
Environment profile to use:
dev, staging, or prod.- dev
- staging
- prod
Development profile
- API URL:
http://localhost:8000 - Retry attempts: 2
- Log level: debug
- Timeout: 30s
Override the API base URL for custom endpoints.
This overrides the profile’s default API URL. Useful for:
- Self-hosted Kubiya instances
- Custom domains
- Testing against local servers
Logging verbosity:
debug, info, warn, or error.- debug
- info
- warn
- error
Most verbose - Shows all requests, responses, and internal operations. Use for troubleshooting.Output includes:
- API requests and responses
- Tool execution details
- Resource fetching operations
- Error stack traces
Profile Configuration Files
Create custom profile configurations inconfig/<profile-name>.json:
Custom Profile Example
File:config/custom.json
Profile Schema
Tool Whitelisting
Control which tools are available to AI assistants using theMCP_ALLOWED_TOOLS environment variable.
Patterns
- All Tools (Default)
- Read-Only Mode
- Specific Tools
- Category-Based
- Execute-Only
Whitelist Examples
Claude Desktop Configuration
Configure the MCP server in Claude Desktop’s config file:Basic Configuration
Advanced Configuration
You can configure multiple MCP server instances with different permissions. Claude Desktop will show both in the MCP servers list.
Security Best Practices
Use separate API keys
Use separate API keys
Create different API keys for different purposes:
- Development: Full access for testing
- Production read-only: Limited to list/get operations
- CI/CD: Execute and monitor only
- Admin: Full access for infrastructure changes
Enable tool whitelisting
Enable tool whitelisting
Always use tool whitelisting in production:Start restrictive and add tools as needed.
Use environment-specific profiles
Use environment-specific profiles
Configure different profiles for different environments:
- dev: Local testing with debug logging
- staging: Pre-production testing
- prod: Production with minimal logging
Secure API keys
Secure API keys
Never:
- Commit API keys to version control
- Share keys via email or chat
- Use production keys in development
- Log API keys in debug output
- Store keys in secure secret management (Vault, AWS Secrets Manager, etc.)
- Use environment variables
- Rotate keys regularly
- Audit key usage
Monitor and audit
Monitor and audit
Enable logging and monitor usage:Review logs for:
- Unauthorized access attempts
- Unusual tool usage patterns
- Failed authentication
- Rate limiting events
Connection Settings
Retry Configuration
The MCP server automatically retries failed requests with exponential backoff:- Development: 2 retry attempts
- Staging: 3 retry attempts
- Production: 3 retry attempts
Timeout Settings
Default timeouts by profile:- Development: 30 seconds
- Staging: 60 seconds
- Production: 60 seconds
Multiple Server Instances
Configure multiple MCP server instances for different use cases:Environment-Specific Examples
- Development
- CI/CD
- Production
- Monitoring
Troubleshooting
Configuration validation failed
Configuration validation failed
Error: Verify it’s set:
Configuration validation failed: API key is requiredSolution:Tool not available
Tool not available
Error:
Tool not found: create_agentSolution: Check your tool whitelist:Connection timeout
Connection timeout
Error:
Request timeout after 60000msSolutions:- Check network connectivity
- Verify API URL is correct
- Use streaming for long operations
- Increase timeout in custom profile (not recommended)
Invalid profile
Invalid profile
Error:
Profile 'xyz' not foundSolutions:- Use existing profile:
dev,staging, orprod - Create custom profile file:
config/xyz.json - Verify profile file syntax