Tachyon API
The agent-native Solidity/EVM engine: compile, test, simulate, deploy, and call contracts; manage chains and artifacts; exposed as MCP tools.
Tachyon is the agent-native Solidity/EVM smart contract engine. Rather than a human-first terminal flow, it exposes its compile/test/simulate/deploy workflow as MCP tools callable by Matrix agents. Tachyon runs as a stdio MCP server (tools/tachyon/tachyon.mjs).
MCP tools
Tachyon exposes nine tools:
| Tool | Read/Write | Purpose |
|---|---|---|
tachyon_compile | Read | Compile Solidity with forge; return ABI + bytecode + project_id |
tachyon_test | Read | Run a Forge test suite; return structured per-case results (pass/fail/gas) |
tachyon_simulate | Read | Dry-run an eth_call against a chain without broadcasting |
tachyon_deploy | Write | Deploy a compiled contract on-chain (signs + broadcasts via embedded wallet) |
tachyon_call | Read or Write | Invoke a contract method; simulate_only=true for reads, false for writes |
tachyon_chain_list | Read | List configured chain RPC profiles (id, name, chain_id, explorer) |
tachyon_chain_register | Write | Register or update a custom chain RPC profile |
tachyon_artifact_get | Read | Fetch a cached compile artifact by contract name and project_id |
tachyon_registry_lookup | Read | Resolve a prior deployment by idempotency_key + chain_id |
Compile
POST /v1/compile (HTTP) or tachyon_compile (MCP)
sourcesobjectrequiredMap of workdir-relative path to Solidity source. Contracts under src/, tests under test/. OpenZeppelin and forge-std resolve automatically against the shared engine's baked corpus.
targetsarrayOptional contract names to return artifacts for; empty returns all.
project_idstringOverride the derived project ID (normally a deterministic sources hash).
optimizebooleanEnable the solc optimizer.
via_irbooleanCompile through the Yul IR pipeline.
Returns artifacts (ABI + bytecode per contract), a stable project_id, and any compiler diagnostics.
curl -X POST https://tachyon.example/v1/compile \
-H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{
"sources": {
"src/Counter.sol": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\ncontract Counter { uint256 public n; function inc() external { n++; } }"
}
}'Test
tachyon_test (MCP)
sourcesobjectrequiredMap of workdir-relative path to content. Tests under test/, contracts under src/.
match_pathstringforge --match-path glob (e.g. test/Token.t.sol).
match_contractstringforge --match-contract filter.
filterstringforge --match-test test-name filter.
Returns structured per-case results with pass/fail status and gas usage.
Simulate
tachyon_simulate (MCP)
chain_idstringrequiredChain profile ID or numeric EVM chain ID. Paxeer is "paxeer-mainnet" or "125".
tostringrequiredTarget contract address (0x...).
datastringPre-encoded calldata hex (0x...).
fromstringCaller address (0x...).
valuestringWei value as decimal or 0x-hex.
blockstringBlock tag/number (default latest).
Dry-run only. Returns the raw return data and revert reason if it reverts.
Deploy
tachyon_deploy (MCP)
idempotency_keystringrequiredCaller-chosen key; repeat to dedupe a redeploy. A prior deploy with the same key + chain returns the existing address.
chain_idstringrequiredTarget chain profile ID or numeric EVM chain ID.
contractstringrequiredContract name to deploy (must exist in the registry for the project_id).
project_idstringProject ID from tachyon_compile.
constructor_argsarrayConstructor arguments, in ABI order.
spend_cap_weistringOptional per-tx spend cap (wei).
Signs and broadcasts via the caller's embedded wallet. The daemon's agent identity is forwarded automatically; custody policy is enforced wallet-side.
Call
tachyon_call (MCP)
tostringrequiredTarget contract address (0x...).
methodstringFunction name to ABI-encode (with args). Omit to use pre-encoded data.
argsarrayArguments for method, in ABI order.
abiobjectInline ABI JSON to encode against (else resolved from contract + project_id).
contractstringContract name to resolve the ABI from the registry.
project_idstringProject ID owning the artifact for ABI resolution.
datastringPre-encoded calldata hex when method is omitted.
simulate_onlybooleantrue = eth_call read (no broadcast, no wallet); false = broadcast.
chain_idstringTarget chain profile ID or numeric EVM chain ID.
spend_cap_weistringOptional per-tx spend cap (wei) for the broadcast.
Chain management
tachyon_chain_list returns all configured chain RPC profiles (id, name, chain_id, explorer) and which is active.
tachyon_chain_register registers or updates a custom chain profile:
idstringrequiredShort profile ID (e.g. "my-chain"). Paxeer chain 125 is preconfigured as "paxeer-mainnet".
namestringrequiredHuman-readable name.
rpc_urlstringrequiredJSON-RPC URL.
chain_idnumberrequiredEVM chain ID (uint).
explorerstringBlock explorer base URL.
Artifact registry
tachyon_artifact_get fetches a cached compile artifact (ABI + bytecode) by contract name and project_id.
tachyon_registry_lookup resolves a prior deployment by idempotency_key + chain_id (returns address, tx hash, confirmation state, or found=false).
