| name | description |
|---|---|
fix-render-deploy |
Diagnose and fix failing Render deployments for the current project. Fetches deployment logs, identifies the root cause of failures, and creates a PR with the fix. |
Diagnose and fix failing Render deployments for the current project by analyzing logs and creating a pull request with the fix.
IMPORTANT: Always start by configuring the Render MCP server with the correct workspace and service for this project.
-
Select the workspace using
mcp__render__select_workspacewith:ownerID:<your-workspace-id>
-
Use the service ID for this project:
serviceId:<your-webservice-id>
This project's Render service is pre-configured, so skip any service discovery steps.
- Use
mcp__render__list_deployswithserviceId:<your-service-id>to get recent deployments - Find the most recent failed deployment - look for:
status: "build_failed"- build-time failurestatus: "deploy_failed"- runtime/startup failurestatus: "update_failed"- configuration update failure
- Note the deploy ID and failure type for fetching appropriate logs
-
Use
mcp__render__list_logswith:resource:["<your-service-id>"]type: Choose based on failure type:["build"]for build failures["app"]for runtime/startup failures
limit: 100 (to get enough context)
-
Analyze the logs to identify the root cause. Common failure patterns:
Dependency Issues:
ModuleNotFoundError: No module named 'xyz'→ Add to requirements.txtImportError: cannot import name 'X' from 'Y'→ Version mismatch or missing extraERROR: Could not find a version that satisfies the requirement→ Invalid package name or version
Build Failures:
SyntaxError→ Python syntax error in codeerror: command 'gcc' failed→ Missing system dependencynpm ERR! code ERESOLVE→ Dependency resolution conflict
Runtime Failures:
bind: address already in use→ Wrong port configurationError: connect ECONNREFUSED→ Database/service not accessibleTimeoutError→ Slow startup, increase health check timeout
- Based on the log analysis, identify the file(s) that need to be modified
- Read the relevant files to understand the current state
- Make the necessary code changes to fix the issue
- Common fixes:
- Add missing packages to
requirements.txtorpackage.json - Fix import statements
- Update configuration files (render.yaml, runtime.txt)
- Fix environment variable references
- Add missing packages to
-
Create a new branch with a descriptive name:
git checkout -b fix/render-deploy-<short-description>
-
Stage and commit the changes:
git add <files> git commit -m "Fix: <description of the fix>"
-
Push the branch:
git push -u origin fix/render-deploy-<short-description>
-
Use
mcp__github-official__create_pull_requestto create a PR with:owner: Repository owner from git remoterepo: Repository name from git remotetitle: Clear title like "Fix Render deployment: "head: The branch you createdbase:main(or the default branch)body: Include:- Summary: Brief description of the deployment failure
- Root Cause: What was identified from the logs
- Fix: Description of the changes made
- Testing: Any local testing performed
## Summary
Fix failing Render deployment caused by missing dependency.
## Root Cause
Build logs showed:ModuleNotFoundError: No module named 'email_validator'
The `pydantic[email]` extra was not installed, which is required for email validation in Pydantic models.
## Fix
Added `pydantic[email]` to requirements.txt to include the email-validator dependency.
## Testing
- Verified locally with `pip install -r requirements.txt`
- Confirmed `from pydantic import EmailStr` works correctly
- Always verify the fix locally before creating the PR if possible
- If the issue is environment-specific (env vars, secrets), note this in the PR and don't commit sensitive values
- If multiple issues are found, prioritize the first failure in the build/deploy process