Skip to content

MCP Server Use Cases

This section documents complete workflows for agents and operators using the contracts MCP surface.

Local contract development agent

Use this flow when an agent owns a workspace and is allowed to scaffold and compile contracts locally.

  1. init_contract
  2. edit source files in the generated project
  3. build_contract
  4. inspect the generated .wasm, *.abi.json, and build metadata

This is the right fit for coding agents working inside a repository checkout.

Trusted deployment agent

Use this flow only in controlled environments where the agent is allowed to broadcast contract changes.

  1. build_contract
  2. optional external review of ABI and bytecode
  3. deploy_contract or upgrade_contract
  4. optional query_contract

This flow is intentionally separate from the normal chain MCP because it combines filesystem access, compilation, and secret-key-based writes.

Remote compilation or multi-tenant environments

When direct local toolchain execution is not acceptable:

  1. send builds to contract-tools-rest
  2. download artifacts from the async job API
  3. optionally feed those artifacts back into deployment or review flows

This keeps the toolchain inside a dedicated service boundary instead of embedding Cargo and Rust into every MCP runtime.