🔳 OpenCode
OpenCode is a powerful agent that supports a broad range of agent models. It's available as a CLI TUI application, has a Desktop client, and has extensions for several editors.
We suggest adding Lens to your global OpenCode configuration to make it available in all of your projects and however you consume OpenCode, but you can also enable it in individual projects. See OpenCode's Config -> Locations documentation for details.
Prerequisites
- You have installed AgentKit.
- You have installed OpenCode.
Adding the MCP server
Amend your OpenCode configuration file (opencode.jsonc (recommended) or opencode.json) as follows, substituting the path to the lens binary from the installation step:
{
"$schema": "https://opencode.ai/config.json",
// snip
"mcp": {
// snip
"lens": {
"command": ["/path/to/agentkit-lens", "--brave-search-api-key", "YOUR_KEY", "stdio"],
"type": "local",
},
// snip
},
// snip
}
Testing
Restart OpenCode to apply the new configuration. You're now ready to make your first search or fetch.