OpenCode
Configure OpenCode to work with Cadence.
Add Cadence as project context
OpenCode reads project-level context files automatically. Add a section to your AGENTS.md pointing at the /llms-full.txt endpoint:
## Cadence Development
This project uses Cadence, the smart contract language for the Flow blockchain.
Full reference: https://cadence-lang.org/llms-full.txt
Quick index: https://cadence-lang.org/llms.txt
Resources use `@` prefix and must be moved with `<-`. Use `access(all)` for public access (not `pub`). Capability-based access control with entitlements.If you also use Claude Code, install the flow-ai-tools marketplace there for richer skill coverage — it ships the full Cadence + Flow skill suite (see Skills).
Add MCP server
Add the Cadence MCP server to your OpenCode configuration — calls the Flow CLI's built-in flow mcp subcommand:
{
"mcp": {
"cadence-mcp": {
"type": "local",
"command": ["flow", "mcp"]
}
}
}This gives OpenCode access to all MCP tools — Cadence code checking, type inspection, symbol lookup, contract source fetching, and read-only on-chain script execution. Requires Flow CLI ≥ v2.16.0.