Skip to content

MCP Server

contract-tools includes a dedicated MCP wrapper for autonomous agents that need to work on contract development tasks without dragging this heavier toolchain into normal chain-operation agents.

Scope

The MCP server is intended for:

  • scaffolding contracts
  • compiling contracts
  • extracting ABI metadata
  • deploying and upgrading contracts
  • calling and querying contracts from agent workflows

It is intentionally separate from the lighter chain/app MCP servers in the ecosystem.

Directory

The MCP implementation lives under the repo directory mcp-server/.

Tools

The wrapper exposes tools for:

  • init_contract
  • build_contract
  • deploy_contract
  • upgrade_contract
  • call_contract
  • query_contract

Write operations can be gated by higher-level approval middleware in the agent stack.

Documentation split

This documentation is intentionally split into:

  • MCP Server / API Reference concrete tools, inputs, configuration, and runtime expectations
  • MCP Server / Use Cases complete workflows for local development, trusted deployment, and remote compilation

Local Development

cd mcp-server
npm install
npm test
node src/index.js

Design Notes

  • it shells out to dilithia-contract instead of reimplementing toolchain logic
  • it stays separate from the general chain MCP surface
  • it is appropriate for autonomous developer agents, not just end-user transaction flows