OpenCode
Learn how to set up the Mixedbread MCP server with OpenCode.
Prerequisites
Before we configure OpenCode, make sure you have the following:
- OpenCode installed
- Node.js 22+ installed
- A Mixedbread API key from our platform
Configuration
OpenCode configures MCP servers via a configuration file named opencode.json.
-
Create the configuration file
The recommended setup is project-level: Place an
opencode.jsonfile in the root of your repository. -
Add a Mixedbread server entry
Add the following to your
opencode.json:{ "$schema": "https://opencode.ai/config.json", "mcp": { "mixedbread": { "type": "local", "command": [ "npx", "-y", "mcp-remote@latest", "https://www.mcp.mixedbread.com/api/mcp", "--header", "Authorization:${MXBAI_AUTH_HEADER}" ], "enabled": true, "environment": { "MXBAI_AUTH_HEADER": "Bearer YOUR_MIXEDBREAD_API_KEY" } } } }- type specifies that the server runs locally.
- command runs mcp-remote with the Mixedbread MCP endpoint and authentication header.
- enabled controls whether the server is active.
- environment sets your API key as an environment variable.
Replace
YOUR_MIXEDBREAD_API_KEYwith your actual key from the Mixedbread platform.
Verification
Now let's confirm the integration is working.
-
Start OpenCode and reload the configuration.
-
Confirm the
Mixedbreadserver is listed under tools and enabled. -
Test the connection with a simple command, for example:
Create a new store called "my-knowledge-base"
Now you can manage your Stores and perform Search directly from OpenCode.