@betterhunt/render-mcp-server
v1.0.9
Published
Model Context Protocol server for Render.com API integration
Downloads
96
Maintainers
Readme
Render MCP Server
A Model Context Protocol (MCP) server that enables Claude Code to interact with Render.com's API for managing deployments, services, and infrastructure.
Features
- Service Management: List, create, update, and delete Render services
- Deployment Management: Monitor deployments, view logs, and trigger new deployments
- Database Management: Handle Render PostgreSQL and Redis instances
- Environment Variables: Manage environment variables for services
- Webhook Management: Create and manage webhooks for service events
- Full TypeScript Support: Type-safe implementation with comprehensive error handling
Installation
NPX (Recommended for Claude Code)
npx @betterhunt/render-mcp-server@latest --access-token YOUR_RENDER_API_TOKENLocal Development
git clone <repository-url>
cd render-mcp-server
npm install
npm run build
npm start -- --access-token YOUR_RENDER_API_TOKENConfiguration
Claude Code Integration
Add the following to your Claude Code configuration file (e.g., claude_desktop_config.json):
{
"mcpServers": {
"render": {
"command": "npx",
"args": [
"-y",
"@betterhunt/render-mcp-server@latest",
"--access-token",
"your-render-api-token-here"
],
"env": {}
}
}
}Environment Variables (for local dev only)
RENDER_API_TOKEN(optional if using CLI arg): Your Render API tokenMCP_SERVER_PORT: Server port (default: 3000)LOG_LEVEL: Logging level (default: info)RENDER_API_BASE_URL: Render API base URL (default: https://api.render.com/v1)REQUEST_TIMEOUT: Request timeout in milliseconds (default: 30000)MAX_RETRIES: Maximum number of retries for failed requests (default: 3)
Available Tools
Service Management
list_services: List all Render services with optional filtering
{ ownerId?: string; // Filter by owner ID type?: ServiceType; // Filter by service type limit?: number; // Number of results (1-100, default: 20) cursor?: string; // Pagination cursor }get_service: Get detailed information about a specific service
{ serviceId: string; // The service ID (e.g., "srv-...") }create_service: Create a new Render service
{ type: ServiceType; // Service type name: string; // Service name ownerId: string; // Owner ID repo: string; // GitHub repository URL branch?: string; // Branch to deploy buildCommand?: string; startCommand?: string; region?: Region; plan?: string; envVars?: Array<{key: string; value: string}>; }update_service: Update an existing service
{ serviceId: string; name?: string; branch?: string; buildCommand?: string; startCommand?: string; plan?: string; }delete_service: Delete a service
{ serviceId: string; }
Deployment Management
list_deployments: List all deployments for a service
{ serviceId: string; limit?: number; cursor?: string; }get_deployment: Get deployment details
{ serviceId: string; deploymentId: string; }create_deployment: Trigger a new deployment
{ serviceId: string; clearCache?: boolean; }get_deployment_logs: Retrieve deployment logs
{ serviceId: string; deploymentId: string; }
Database Management
list_databases: List all PostgreSQL and Redis databases
{ ownerId?: string; limit?: number; cursor?: string; }get_database: Get database details
{ databaseId: string; }
Environment Variables
get_env_vars: Get environment variables for a service
{ serviceId: string; }set_env_vars: Set or update environment variables
{ serviceId: string; envVars: Array<{key: string; value: string}>; }
Webhook Management
list_webhooks: List webhooks for a service
{ serviceId: string; }create_webhook: Create a new webhook
{ serviceId: string; url: string; events: string[]; }
Usage Examples
Creating a New Service
// Using Claude Code
const result = await callTool('create_service', {
type: 'web_service',
name: 'my-api',
ownerId: 'usr-xxx',
repo: 'https://github.com/myuser/myrepo',
branch: 'main',
buildCommand: 'npm install && npm run build',
startCommand: 'npm start',
region: 'oregon',
envVars: [
{ key: 'NODE_ENV', value: 'production' },
{ key: 'PORT', value: '3000' }
]
});Triggering a Deployment
const deployment = await callTool('create_deployment', {
serviceId: 'srv-xxx',
clearCache: true
});Managing Environment Variables
// Get current env vars
const currentVars = await callTool('get_env_vars', {
serviceId: 'srv-xxx'
});
// Update env vars
const updated = await callTool('set_env_vars', {
serviceId: 'srv-xxx',
envVars: [
{ key: 'API_KEY', value: 'new-key' },
{ key: 'DEBUG', value: 'false' }
]
});Development
Running in Development Mode
npm run devRunning Tests
npm testLinting
npm run lintSecurity Considerations
- Never commit your API token to version control
- Use environment variables for sensitive configuration
- The server validates all inputs before making API calls
- API tokens are never logged or exposed in error messages
Error Handling
The server includes comprehensive error handling:
- Rate Limiting: Automatically handles Render API rate limits with retry information
- Authentication Errors: Clear messages for invalid or missing API tokens
- Validation Errors: Detailed validation error messages for invalid inputs
- Network Errors: Graceful handling of network timeouts and connection issues
Troubleshooting
Common Issues
"RENDER_API_TOKEN environment variable is required"
- Ensure you've set the
RENDER_API_TOKENin your environment or.envfile
- Ensure you've set the
"Invalid API token"
- Verify your API token is correct and has the necessary permissions
- Render API tokens should start with
rnd_
"Rate limit exceeded"
- The server will indicate when to retry
- Consider implementing request queuing for high-volume operations
Connection timeouts
- Increase the
REQUEST_TIMEOUTenvironment variable - Check your network connection to Render's API
- Increase the
Debug Mode
Enable debug logging by setting:
LOG_LEVEL=debugContributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues specific to this MCP server, please open an issue on GitHub.
For Render API documentation, visit: https://api-docs.render.com/
Version History
- 1.0.0: Initial release with core functionality
- Service management
- Deployment operations
- Database handling
- Environment variables
- Webhook management
