Agents · OpenCode
OpenCode + Hydrant.
Add Hydrant as a remote MCP server in OpenCode's JSON config so terminal-native agent sessions can operate against the same project graph.
Point the harness at Hydrant
Hydrant is a hosted MCP server. Use the harness-native configuration path and replace the example token with a personal access token from your workspace settings.
- Endpoint
- https://hydrant.dev/mcp
- Config
- ~/.config/opencode/opencode.json globally, or opencode.json in a project
- Scope
- OpenCode merges config sources; project opencode.json overrides global defaults.
Edit opencode.json and add a remote mcp.hydrant server.{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"hydrant": {
"type": "remote",
"url": "https://hydrant.dev/mcp",
"enabled": true,
"oauth": false,
"headers": {
"Authorization": "Bearer hyd_sk_your-token-here"
}
}
}
}- 1
Create a Hydrant personal access token
Mint a token for the workspace OpenCode should read and update.
- 2
Add a remote MCP server
OpenCode stores MCP servers under the mcp object. Hydrant uses a remote URL with a bearer token header.
{ "$schema": "https://opencode.ai/config.json", "mcp": { "hydrant": { "type": "remote", "url": "https://hydrant.dev/mcp", "enabled": true, "oauth": false, "headers": { "Authorization": "Bearer hyd_sk_your-token-here" } } } } - 3
Pick global or project config
Use ~/.config/opencode/opencode.json for your whole machine. Use project opencode.json when this repository should carry the server definition.
Check the connection
Reload the harness, confirm the MCP server is present, then ask the agent to call a small read-only Hydrant tool.
Reload
Restart OpenCode, then run opencode mcp list.
One-line tool call
Ask OpenCode: Use Hydrant to list_spaces.OpenCode should load the remote hydrant server and make Hydrant tools available alongside its built-in tools.
Use your team's loop
These skills ship in .agents/skills/ and are harness-agnostic. Use them as a repeatable lifecycle, not as commands tied to one agent vendor.
shape
Shape the workPlan the UX and UI before implementation starts.
refine
Clarify the briefTurn rough requests into implementable Hydrant issues.
nail
Remove ambiguityTighten issue wording until the scope is unambiguous.
prep
Check readinessCheck readiness, dependencies, likely files, and branch state.
go
Do the workImplement a ready issue end to end from Hydrant context.
preflight
VerifyRun the final quality gate before shipping.
yeet
ShipShip, merge, and clean up the branch once the work is ready.
Fix the common misses
Most connection failures are token, reload, or config-precedence issues. Check these before changing the Hydrant endpoint.
OpenCode starts but tools are missing
Run opencode mcp list and confirm the hydrant server is enabled. If the config is project-local, start OpenCode from that project tree.
OpenCode prompts for OAuth
Hydrant uses a PAT header for this setup. Keep oauth set to false so OpenCode does not try OAuth discovery for the Hydrant endpoint.
A project config overrides your global server
OpenCode merges configs with later sources taking precedence. Check opencode.json in the project before changing ~/.config/opencode/opencode.json.
Finish the setup path
After the MCP server is connected, walk the quickstart once and keep the MCP surface reference nearby for tool names and common workflows.