Cadence

MCP Server

The Cadence MCP server gives AI agents access to documentation search, code checking, type inspection, and on-chain queries. Bundled with the Flow CLI.

The Cadence MCP server gives AI agents access to Cadence tooling — type checking, symbol lookup, hover info, contract source fetching, and read-only on-chain script execution. It is bundled with the Flow CLI as the flow mcp subcommand (Flow CLI ≥ v2.16.0). No separate install needed.

Prerequisites

If you use the onflow/flow-ai-tools one-line installer, the Flow CLI and the MCP server are configured for you in a single command — see Skills.

Quick start

Claude Code

claude mcp add --scope user cadence-mcp -- flow mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "cadence-mcp": {
      "command": "flow",
      "args": ["mcp"]
    }
  }
}

Cursor

Settings → MCP → Add new server:

  • Name: cadence-mcp
  • Type: command
  • Command: flow mcp

Other editors

Any MCP-aware editor (Codex, Gemini CLI, Antigravity, OpenCode, etc.) — point them at flow mcp as a stdio command. See the integrations section for editor-specific configuration files.

Available tools

ToolDescription
cadence_checkCheck Cadence code for syntax and type errors
cadence_hoverGet type information for a symbol at a position
cadence_definitionFind where a symbol is defined
cadence_symbolsList all symbols in Cadence code
cadence_completionGet completion suggestions at a position
get_contract_sourceFetch on-chain contract manifest from a Flow address
get_contract_codeFetch contract source code from a Flow address
cadence_execute_scriptExecute a read-only Cadence script on-chain

All LSP tools support mainnet, testnet, and emulator address imports (e.g. import FungibleToken from 0xf233dcee88fe0abe). Dependencies are resolved automatically via Flow CLI.

Source code

The server lives in the Flow CLI source tree at onflow/flow-cli/internal/mcp. Maintained by Flow Foundation; ships with each Flow CLI release.

Pair with Claude Code skills

For richer agent guidance — security audits, contract scaffolding, testing patterns, DeFi architecture — install the flow-dev plugin from the onflow/flow-ai-tools marketplace alongside the MCP server. The skills add agent-prompt-level expertise that complements the MCP's runtime tools.