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.
init_contract- edit source files in the generated project
build_contract- 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.
build_contract- optional external review of ABI and bytecode
deploy_contractorupgrade_contract- 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:
- send builds to
contract-tools-rest - download artifacts from the async job API
- 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.