Overview
Connect CodeAlive with OpenCode — an open-source AI coding assistant that runs in your terminal. OpenCode uses its own JSON configuration format with atype: remote transport for HTTP connections.
Prerequisites
- OpenCode installed (github.com/opencode-ai/opencode)
- CodeAlive account with API key (Sign up here)
- Indexed repositories in your CodeAlive dashboard
Setup
Locate Config File
OpenCode reads configuration from
opencode.json in your project root or home directory.Add CodeAlive Server
Add this to your Replace
opencode.json:YOUR_API_KEY_HERE with your actual CodeAlive API key.OpenCode uses
type: "remote" for HTTP-based MCP servers, which is different from most other clients that use type: "http" or type: "streamable-http".Docker Alternative
If you prefer running the MCP server locally:Usage
Once connected, OpenCode can:- Search your codebase semantically across all indexed repositories
- Answer architecture questions with full project context
- Find patterns and implementations across multiple services
Troubleshooting
MCP server not detected
MCP server not detected
- Verify the config file is named
opencode.json - Check that
typeis set to"remote"(not"http") - Ensure
"enabled": trueis set - Restart OpenCode
Authentication errors
Authentication errors
- Verify your API key is correct
- Ensure the
Authorizationheader includesBearerprefix - Try regenerating your API key in the dashboard
Connection timeouts
Connection timeouts
- Check your network connection
- Try the Docker STDIO option for local access
- Verify the URL is
https://mcp.codealive.ai/api