MCP Server API¶
Package: @dilithia-mcp/contracts
This MCP server exposes contract-tools for contract-development workflows. It is intentionally separate from the chain MCP surface because it brings in the full compilation toolchain.
Tools¶
Filesystem and build tools¶
init_contractInput:name, optionaldirectorybuild_contractInput: optionalpath, optionalrelease, optionaloptimize
build_contract maps to dilithia-contract build and returns build metadata rather than only a success flag.
Chain write tools¶
These tools are only safe to enable in trusted environments:
deploy_contractInput:name,wasm,rpc,secretKey, optionalchainId, optionalnonce, optionalworkdirupgrade_contractInput:name,wasm,rpc,secretKey, optionalchainId, optionalnonce, optionalworkdircall_contractInput:contract,method, optionalargs,rpc,secretKey, optionalchainId, optionalnonce, optionalwait, optionalworkdirquery_contractInput:contract,method, optionalargs,rpc, optionalworkdir
Environment variables¶
DILITHIA_CONTRACT_BINARYDILITHIA_CONTRACT_MCP_WORKDIRDILITHIA_CONTRACT_MCP_ENABLE_FILESYSTEM_TOOLSDILITHIA_CONTRACT_MCP_ENABLE_CHAIN_WRITE_TOOLS
Operational notes¶
- This server is for contract developers and autonomous build/deploy agents.
- It should not be mixed into a lightweight chain-operator MCP unless you intentionally want Cargo, WASM tooling, and local filesystem writes in that environment.
- For remote execution, prefer the REST service in
contract-tools-restrather than exposing raw toolchain execution to every MCP client.