AllSource Prime with OpenCode
OpenCode uses its own envelope: a top-level `mcp` key, `type: "local"`, and command-as-array.
Connect OpenCode to hosted Prime over HTTPS with nothing to install, or run the local allsource-prime binary over stdio. The same store serves every MCP client you wire it into — one source of truth, everywhere your agents work.
Hosted MCP URL — nothing to install (recommended)
Mint an API key, then point OpenCode at the hosted endpoint. Memory lives in your AllSource tenant and shows up live in the dashboard.
We don't show secrets twice — paste it into the config below.
Then paste this, swapping <YOUR_API_KEY> for your key:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prime": {
"type": "remote",
"url": "https://api.all-source.xyz/api/v1/prime/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer <YOUR_API_KEY>"
}
}
}
}Prefer a local binary? The steps below run Prime on your machine instead.
1. Install the binary
From crates.io. Builds standalone — no AllSource server required, just a Rust toolchain.
cargo install allsource-prime2. Hosted memory via the local binary
Mint an API key, then run Prime with --sync-to. Your memory persists to your AllSource tenant and shows up live in the dashboard — and the same key works from any other client you connect.
One click mints a Prime-scoped key. We don't show secrets twice — paste it into the config below.
Then paste this, swapping <YOUR_API_KEY> for the key you just minted:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prime": {
"type": "local",
"command": [
"allsource-prime",
"--data-dir",
"~/.prime/memory",
"--auto-inject",
"--sync-to",
"https://api.all-source.xyz",
"--api-key",
"<YOUR_API_KEY>"
],
"enabled": true
}
}
}3. Local-only alternative (no account)
Skip the account entirely. Drop the --sync-to / --api-key flags and memory stays on disk at ~/.prime/memory. Nothing leaves your machine.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prime": {
"type": "local",
"command": [
"allsource-prime",
"--data-dir",
"~/.prime/memory",
"--auto-inject"
],
"enabled": true
}
}
}Notes
- OpenCode's envelope differs from every other client: top-level `mcp`, `type: "local"`, and the command + all args go in ONE array.
- Set `enabled: true` so OpenCode starts the server (it defaults to enabled, but being explicit avoids surprises).
After install
- Restart OpenCode so it picks up the new MCP server.
- Verify by asking it: "List the MCP tools you have available." You should see
prime_add_node,prime_recall, and friends. - On the hosted path, watch nodes appear live at /dashboard/memory.
