# OpenCode + Render: Deploy and manage your Render apps from OpenCode.

[OpenCode](https://opencode.ai/docs/) can combine repository context with Render skills and live infrastructure data from the hosted Render MCP server.

## Setup contract

- Preferred setup method: OpenCode plugin installer
- Preferred setup command: `curl -fsSL https://raw.githubusercontent.com/render-oss/render-opencode-plugin/main/install.sh | bash -s -- --enable-mcp`
- MCP provided by: Plugin installer
- Config file: `~/.config/opencode/opencode.json`
- API key fallback command: `Set RENDER_API_KEY, then rerun the plugin installer with --enable-mcp`
- API key fallback config: `{"mcp":{"render":{"type":"remote","url":"https://mcp.render.com/mcp","enabled":true,"oauth":false,"headers":{"Authorization":"Bearer {env:RENDER_API_KEY}"}}}}`
- API key environment variable: `RENDER_API_KEY`
- Skills supported: Yes
- Skills command: `curl -fsSL https://raw.githubusercontent.com/render-oss/render-opencode-plugin/main/install.sh | bash`
- Skills fallback command: `npx skills add render-oss/skills`
- Skills directory: `~/.config/opencode/skills/`
- Auth: API key
- Restart required: Yes
- Verify: `list_workspaces`
- Fallback reference: [Full setup details](https://github.com/render-oss/render-opencode-plugin#configuring-render-mcp)

## Quick start

1. *Install OpenCode.*

   ```shell
   curl -fsSL https://opencode.ai/install | bash
   ```

2. *Create a Render API key* in your [account settings](https://dashboard.render.com/u/settings#api-keys) and set it as `RENDER_API_KEY`.

3. *Install the Render plugin with MCP enabled.*

   ```shell
   curl -fsSL https://raw.githubusercontent.com/render-oss/render-opencode-plugin/main/install.sh | bash -s -- --enable-mcp
   ```

   This installs Render skills, commands, an agent, Blueprint validation, and MCP configuration without replacing unrelated OpenCode settings.

4. *Restart OpenCode and verify.* Ask it to run `list_workspaces`, choose a workspace if needed, then try *"Deploy this project to Render."*

## MCP and authentication

- MCP install command: `curl -fsSL https://raw.githubusercontent.com/render-oss/render-opencode-plugin/main/install.sh | bash -s -- --enable-mcp`
- MCP config file: `~/.config/opencode/opencode.json`
- OAuth: Not supported yet

The plugin configures `https://mcp.render.com/mcp` and reads the API key from `RENDER_API_KEY`. OpenCode's documented Render setup does not use OAuth, although the Render MCP server supports it for other clients.

See the [MCP server docs](/docs/mcp-server) for the full authentication reference and the [OpenCode plugin](https://github.com/render-oss/render-opencode-plugin) for update and removal instructions.

## Example prompts

- *Deploy:* Deploy this project to Render and explain the Blueprint before applying it.
- *Debug:* Check the latest failed deploy, fix the cause, and verify the next deploy.
- *Database:* Create a Render Postgres database and connect it to this service with DATABASE_URL.
- *Worker:* Add a background worker and a Render Key Value queue to this project.

## Common workflows

### Deploy from the terminal

- Ask OpenCode to inspect the repository and propose a `render.yaml` Blueprint.
- Review the services, databases, and environment variables.
- Apply the plan, then check the first deploy.

### Debug a failed deploy

- Ask OpenCode to fetch the latest failed deploy logs.
- Let it identify and fix the code, configuration, or environment issue.
- Verify the next deploy reaches a healthy state.

### Add async processing

- Ask OpenCode to add a background worker service.
- Create a Render Key Value instance for the queue.
- Add graceful shutdown handling and verify the worker starts cleanly.