- LOGIC
- STATE
- ENTRY
- HUMAN
Short answer
How can I debug Tezos smart contracts with my AI?
Your agent uses TzKT to pull the contract's Michelson code and current storage state. It then compares the code logic against the actual data to find bugs. You get a clear view of why a transaction failed or why state changed unexpectedly.
Where every issue lands.
Debugging outcomes
The AI processes raw blockchain data into actionable insights.
LOGIC
Code verification
The agent reads the Michelson instructions to map out how the contract should behave. You get a breakdown of the execution path.
STATE
Storage inspection
Your agent pulls the current storage values to see exactly what's sitting on-chain. This catches unexpected state changes.
ENTRY
Entrypoint analysis
The AI checks available entrypoints to ensure you're calling the right functions with the right parameters.
HUMAN
Manual fix
The AI identifies the error, but you still need to write and deploy the corrected contract code yourself.
The workflow
What your AI does when the contract address arrives.
The agent moves from raw code to a full state analysis.
Pull Michelson code
The agent fetches the raw operational logic of the contract to understand its rules.
get_contract_codeCheck current state
It pulls the live storage data to see the current variables and balances.
get_contract_storageMap entrypoints
The agent identifies all valid ways to interact with the contract.
get_contract_entrypointsIdentify mismatches
The agent compares the code logic against the storage state to find where things went wrong.
get_contract_storageget_contract_code
Try it
Copy these to start.
Use these prompts to begin your investigation.
Starting points
Swap the contract addresses for the ones you are actually debugging.
TzKT Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_dOE3JyfNcsVXKuLGFQTRo4NEbU7xFJomMmGxoKc9/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — TzKT capabilities are ready to use.
{
"mcpServers": {
"tzkt-tezos-indexer-explorer-api-mcp": {
"url": "https://edge.vinkius.com/vk_preview_dOE3JyfNcsVXKuLGFQTRo4NEbU7xFJomMmGxoKc9/mcp"
}
}
}Analyze the Michelson code for contract edx123... to find logic errors.
Compare the storage of contract edx456... with its entrypoint requirements.
Check the current storage of edx789... and tell me if the balance looks correct.
List all entrypoints for edx012... and explain how to call them.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect TzKT once, then ask.
Just link your account once. Your credentials stay encrypted, and you can immediately start debugging contracts in any MCP-compatible client.
Connect TzKT to your AIFAQ
How the debugging task behaves
- 01
Can my AI fix the contract automatically?
No. The AI can find the bug and suggest code, but you must manually deploy any fixes to the Tezos blockchain.
- 02
Can the AI execute transactions?
No. This MCP only provides read access to code, storage, and entrypoints. It cannot sign or send transactions.
- 03
Does the AI see private contract data?
No. The AI can only see data that is publicly available on the Tezos blockchain via the TzKT indexer.
- 04
Can I debug a contract that hasn't been deployed yet?
No. The tools require an existing contract address on the Tezos network to pull data.
- 05
Will the AI change my contract storage?
No. The tools are strictly for reading data. The AI has no way to modify on-chain state.
More questions about TzKT? The Connector page answers them. See everything the TzKT Connector can do
Connect TzKT to Claude, Cursor, ChatGPT & more
