MCP integration¶
Connect your AI assistant to Trilocore to inspect contracts, run a sequence on a private chain fork, and review the resulting evidence. MCP gives the assistant typed tools; you can ask for a task in plain language and inspect the tool calls and results in your assistant.
The hosted connection URL is https://mcp.trilocore.ai/mcp. You need a
Trilocore account and an assistant that supports remote MCP connections over
Streamable HTTP.
Connect your assistant¶
- Sign in to your Trilocore account.
- In your assistant's connection settings, add a custom remote MCP connection with the URL above.
- If the assistant supports MCP sign-in, complete the Trilocore sign-in and review the permissions before approving the connection.
- Ask the assistant to call
bevm_capabilities. Check the returned tools and limits before starting work.
For clients that use an API key, set Authorization: Bearer with your Trilocore
key in the client's secure connection settings. The key needs the permissions
for the work you request; fork reads and writes use bevm:read and
bevm:write. See Authentication. Keep the key out of
chat messages and shared project files.
Custom connections and sign-in options depend on your assistant and workspace settings. A connection exposing a tool does not guarantee that every network or operation is available to your account; use the returned capabilities and errors.
Inspect a contract on a fork¶
Give the assistant a network, the contract address and the block you want to inspect. For repeatable work, use a specific block number. For example, replace the bracketed values in this request:
Open a private fork of [network] at block [number] for [contract address]. Read the target's balance and call [function signature] with [arguments]. Show the returned values and any missing evidence before proposing changes.
The workflow follows these steps:
| Step | What to check |
|---|---|
Open with bevm_open_fork |
Supply network, target_address, block and offline: false. Keep the returned workflow_id. |
Confirm with bevm_fork_status |
Check the target and fork identity before continuing. |
Read with bevm_get_balance, bevm_read_storage or bevm_call_contract |
Keep the observed result, including a revert or unavailable value. |
| Review the answer | Ask the assistant to separate returned evidence from its interpretation. |
Finish with bevm_close_fork |
Choose whether to stop the fork or retain it for further inspection. |
Fork tools require the workflow_id from the open operation. One active
workflow is supported per identity. If you already have a session open in the
app, choose to attach to it with mode: "attach", or deliberately replace it
with replace_existing: true. Replacing a session discards that working fork.
Reproduce a sequence¶
Use bevm_send_transaction for one transaction or bevm_replay_steps for an
ordered sequence. These operations change the private fork; their effects
accumulate so later steps can use earlier state. They do not broadcast the
transactions to the live chain.
Specify the target, function or calldata, arguments, sender and value explicitly.
Amounts and EVM integers use decimal strings in base units, such as wei. State
changes use persist: true; use bevm_call_contract when you want a
non-persistent call.
Each state-changing request needs a request_id. Reuse that ID with the same
arguments when retrying the same action; use a new ID for a new action. If the
operation is still running when the call returns, poll bevm_get_operation
with its operation_id rather than submitting the action again.
Review the transaction outcome, gas, balances and storage evidence. A completed
operation can contain a reverted transaction: succeeded describes completion
of the operation, while execution_outcome describes the contract execution.
An uncertain outcome means the effect was not established. Inspect it before
starting another change; it is not a successful reproduction.
Read architecture evidence¶
Provide an existing architecture ID from the
Architecture Explorer to ask about its contracts,
authority relationships and findings. bevm_get_architecture reads the document;
bevm_get_attack_paths reads its reported paths.
Architecture findings describe the saved model. They are not transaction replay evidence. Ask the assistant to preserve the document's coverage and any missing evidence when explaining a result.
Compilation, deployment, funding, storage changes and architecture creation have separate tool availability. Use them only when the connection's capabilities list the relevant tools.
Finish and keep the evidence¶
Large results may be returned as an artifact reference. Use
bevm_read_artifact to read its pages and keep the evidence you need before its
reported expiry. Do not treat a shortened inline result as the complete record.
Disconnecting the assistant does not close the fork. Call bevm_close_fork
with upstream: "close" to stop it, or upstream: "retain" to end the MCP
workflow while leaving the fork available for inspection in the app. Avoid
changing the same fork simultaneously from the app and your assistant.
Next: Auditing IDE for reviewing executions in the app, or Janus AI for assistance inside Trilocore.