Skip to main content

Introduction

CATO is a Model Context Protocol (MCP) server that provides AI agents with comprehensive access to the Cronos blockchain ecosystem. It enables Large Language Models to autonomously interact with Cronos chains, query blockchain data, access documentation, and assist developers with DApp development.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables seamless integration between AI models and external data sources. CATO implements MCP to provide Claude and other LLMs with:
  • Tools - Executable functions the AI can call (e.g., check portfolio, find yields)
  • Resources - Data sources the AI can read (e.g., transaction history)
  • Prompts - Reusable templates for common tasks

Why CATO?

Multi-Chain Support

Query EVM, zkEVM, and POS chains simultaneously

Knowledge Integration

150+ SDK examples, contract templates, and guides

AI-Native

Designed for autonomous agent interaction

Developer Tools

Error debugging, yield comparison, bridge routing

Features

πŸͺ™ Portfolio Management

  • Unified Portfolio View - Aggregate balances across all Cronos chains
  • Multi-Format Support - Works with both EVM (0x…) and Bech32 (cro1…) addresses
  • Token Detection - Automatically fetches top ERC-20 tokens
  • IBC Support - Tracks cross-chain assets on Cronos POS

πŸ’° DeFi Analytics

  • Yield Comparison - Compare APYs across Tectonic, VVS Finance, and Fulcrom
  • Risk Assessment - Each opportunity rated by security and TVL
  • Protocol Coverage - Lending, liquidity pools, and perpetuals vaults
  • Smart Filtering - Filter by minimum APY and risk tolerance

πŸ› Developer Tools

  • Transaction Debugger - Decode revert reasons from failed transactions
  • Error Explanations - Human-readable error messages with fixes
  • Gas Analysis - Detailed gas usage and cost breakdown
  • Protocol Detection - Automatically identify interacted contracts

πŸ“– Knowledge Base

  • SDK Documentation - 150+ code examples in TypeScript, Python, and Rust
  • Smart Contracts - 15+ production-ready contract templates
  • Bridge Guides - Step-by-step instructions for cross-chain transfers
  • x402 Payments - Gasless payment integration examples
  • Official Guides - Getting started, MetaMask setup, wallet configuration

πŸŒ‰ Cross-Chain Support

  • Bridge Routing - Find optimal paths between chains
  • Fee Estimation - Accurate cost calculations
  • Multi-Protocol - Supports both Gravity Bridge and IBC
  • Asset Tracking - Monitor tokens across chains

πŸ“Š Historical Data

  • Transaction History - Query past transactions via BigQuery
  • Token Transfers - Track ERC-20 transfer events
  • Blockchain Analytics - Extract insights from on-chain data

Installation

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn
  • Claude Desktop (or any MCP-compatible client)
  • Optional: Google Cloud SDK (for BigQuery historical data)

Step 1: Clone Repository

git clone https://github.com/charlesms1246/CATO.git
cd cato

Step 2: Install Dependencies

npm install

Step 3: Build Project

npm run build

Step 4: Configure Claude Desktop

Add CATO to your Claude Desktop configuration file: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "cato": {
      "command": "node",
      "args": ["d:\\Cato\\build\\index.js"],
      "env": {
        "CRONOS_EVM_RPC": "https://evm.cronos.org",
        "CRONOS_ZKEVM_RPC": "https://mainnet.zkevm.cronos.org"
      }
    }
  }
}

Step 5: Restart Claude Desktop

Close and reopen Claude Desktop to load the CATO MCP server.

Configuration

Environment Variables

CATO supports the following environment variables:
VariableDefaultDescription
CRONOS_EVM_RPChttps://evm.cronos.orgCronos EVM RPC endpoint
CRONOS_ZKEVM_RPChttps://mainnet.zkevm.cronos.orgCronos zkEVM RPC endpoint
CRONOS_POS_RPChttps://rpc.cronos.org:26657Cronos POS RPC endpoint

BigQuery Setup (Optional)

For historical transaction data, authenticate with Google Cloud:
gcloud auth application-default login
If not configured, historical queries will return a helpful error message.

Custom RPC Endpoints

To use custom RPC endpoints (e.g., for rate limiting): In claude_desktop_config.json:
{
  "mcpServers": {
    "cato": {
      "command": "node",
      "args": ["d:\\Cato\\build\\index.js"],
      "env": {
        "CRONOS_EVM_RPC": "https://your-custom-rpc.cronos.org",
        "CRONOS_ZKEVM_RPC": "https://your-zkevm-rpc.cronos.org"
      }
    }
  }
}

Usage

Example Queries in Claude Desktop

Once configured, you can ask Claude natural language questions that will use CATO’s tools:
"What tokens does 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0 hold on Cronos?"

"Show me the portfolio for cro1wsknttrxv0q4y4jh3hj4ulg0avgraa4s..."

"Which chain has the most CRO for this address: 0x123..."
"What's the best yield for USDC on Cronos?"

"Find me safe yield opportunities above 5% APY"

"Compare staking options for CRO"
"Why did this transaction fail: 0xabc123..."

"Decode the error for transaction 0xdef456... on zkEVM"

"What went wrong with my swap transaction?"
"Show me how to send CRO using TypeScript"

"I need a smart contract template for an ERC-721 NFT"

"How do I bridge tokens from Cronos POS to EVM?"

"Give me examples of x402 payment integration"
"How do I bridge CRO from POS to EVM?"

"What's the fastest way to bridge to Osmosis?"

"Show me IBC bridge instructions"

Architecture

System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        Claude Desktop (MCP Client)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ MCP Protocol (stdio)
                β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          CATO MCP Server (index.ts)      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  6 Tools + 1 Resource              β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚         β”‚          β”‚
β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚  Tools   β”‚ β”‚Resourcesβ”‚ β”‚ Utils   β”‚
β”‚(6 files) β”‚ β”‚(1 file) β”‚ β”‚(3 files)β”‚
β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
      β”‚          β”‚           β”‚
      β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
            β”‚          β”‚
      β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
      β”‚ Adapters  β”‚ β”‚   Lib   β”‚
      β”‚(3 files)  β”‚ β”‚(9 files)β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”
    β”‚      β”‚      β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”‚  β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚BigQueryβ”‚ β”‚  β”‚Knowledgeβ”‚
β”‚(Historyβ”‚ β”‚  β”‚  Base   β”‚
β”‚  Data) β”‚ β”‚  β”‚(Docs)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
    β”‚viem/ethers  β”‚
    β”‚(Blockchain) β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Directory Structure

src/
β”œβ”€β”€ index.ts                 # MCP server entry point
β”‚
β”œβ”€β”€ tools/                   # MCP Tool Handlers
β”‚   β”œβ”€β”€ portfolio.ts         # Multi-chain portfolio aggregation
β”‚   β”œβ”€β”€ yield.ts             # DeFi yield comparison
β”‚   β”œβ”€β”€ debugger.ts          # Transaction error decoder
β”‚   β”œβ”€β”€ sdk-lookup.ts        # Documentation search
β”‚   β”œβ”€β”€ contract-helper.ts   # Contract template retrieval
β”‚   └── bridge-helper.ts     # Bridge guide lookup
β”‚
β”œβ”€β”€ resources/               # MCP Resource Handlers
β”‚   └── history.ts           # BigQuery transaction history
β”‚
β”œβ”€β”€ adapters/                # Blockchain Adapters
β”‚   β”œβ”€β”€ evm.ts               # Cronos EVM + zkEVM (viem)
β”‚   β”œβ”€β”€ pos.ts               # Cronos POS (Cosmos SDK)
β”‚   └── bigquery.ts          # Historical data queries
β”‚
β”œβ”€β”€ lib/                     # Knowledge Bases
β”‚   β”œβ”€β”€ ts-sdk.ts            # TypeScript SDK examples
β”‚   β”œβ”€β”€ py-sdk.ts            # Python SDK examples
β”‚   β”œβ”€β”€ rs-sdk.ts            # Rust SDK examples
β”‚   β”œβ”€β”€ cronos-guides.ts     # Official guides
β”‚   β”œβ”€β”€ contract-templates.ts # Smart contract templates
β”‚   β”œβ”€β”€ bridge-guides.ts     # Cross-chain bridges
β”‚   β”œβ”€β”€ x402-tech.ts         # x402 payment examples
β”‚   β”œβ”€β”€ network-configs.ts   # RPC endpoints, chain IDs
β”‚   β”œβ”€β”€ contract-addresses.ts # Protocol contracts
β”‚   └── hardhat-configs.ts   # Deployment configs
β”‚
β”œβ”€β”€ utils/                   # Shared Utilities
β”‚   β”œβ”€β”€ config.ts            # Configuration constants
β”‚   β”œβ”€β”€ errors.ts            # Error signatures & handling
β”‚   └── format.ts            # Address conversion, formatting
β”‚
└── schemas/                 # Type Definitions
    └── types.ts             # Shared TypeScript interfaces

Key Design Patterns

1. Three-Layer Architecture

// Layer 1: MCP Interface (index.ts)
server.tool("get_unified_portfolio", ..., async ({ address }) => {
  const portfolio = await handlePortfolio({ address });
  return { content: [{ type: "text", text: JSON.stringify(portfolio) }] };
});

// Layer 2: Business Logic (tools/portfolio.ts)
export async function handlePortfolio(args) {
  const evmBalance = await getBalance(address, 'evm');
  const posBalance = await getPOSBalance(address);
  return aggregateResults(evmBalance, posBalance);
}

// Layer 3: Infrastructure (adapters/evm.ts)
export async function getBalance(address, chain) {
  const client = createPublicClient({ chain, transport: http() });
  return await client.getBalance({ address });
}

2. Adapter Pattern

All blockchain interactions go through adapters, making it easy to:
  • Swap RPC providers
  • Add new chains
  • Mock for testing
  • Handle rate limiting

3. Knowledge Base Modularity

Each knowledge domain is isolated in lib/:
  • SDK examples - Language-specific code snippets
  • Guides - Tutorials and walkthroughs
  • Templates - Reusable contract code
  • Configurations - Network and protocol data
This separation enables:
  • Independent updates to each knowledge base
  • Easy addition of new documentation
  • Clear ownership of content

Development

Project Setup

# Install dependencies
npm install

# Start in development mode with auto-rebuild
npm run dev

# Build production bundle
npm run build

# Type checking
npm run typecheck

# Linting
npm run lint

Adding a New Tool

1

Create handler in tools/

// tools/my-new-tool.ts
export async function handleMyTool(args: { param: string }) {
  // Implementation
  return { result: "success" };
}
2

Register in index.ts

import { handleMyTool } from "./tools/my-new-tool.js";

server.tool(
  "my_new_tool",
  "Description of what this tool does",
  {
    param: z.string().describe("Parameter description")
  },
  async ({ param }) => {
    const result = await handleMyTool({ param });
    return {
      content: [{ type: "text", text: JSON.stringify(result) }]
    };
  }
);
3

Update documentation

  • Add entry to API Reference
  • Update feature list in README

Adding Knowledge Base Content

To add new SDK examples, contract templates, or guides:
// lib/my-knowledge-base.ts
export const MY_EXAMPLES = [
  {
    title: "Example Title",
    description: "What this example demonstrates",
    category: "category-name",
    code: `// Your code here`,
    notes: ["Important note"]
  }
];

export function searchMyExamples(query: string) {
  // Search logic
}
Then import in tools/sdk-lookup.ts to make searchable.

Testing Strategy

# Run all tests
npm test

# Run specific test file
npm test -- portfolio.test.ts

# Watch mode for development
npm test -- --watch
Test coverage targets:
  • Tools: 80%+ coverage
  • Adapters: 90%+ coverage
  • Utils: 95%+ coverage

Testing

Manual Testing with Claude Desktop

1

Start Claude Desktop

Launch Claude Desktop with CATO configured
2

Test each tool

Portfolio: "Check portfolio for 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"
Yield: "Find best yield for USDC"
Debugger: "Debug transaction 0x..."
SDK Docs: "Show me TypeScript examples for sending CRO"
Contracts: "Get ERC-20 token template"
Bridge: "How do I bridge CRO to EVM?"
3

Verify responses

  • Check responses are formatted correctly
  • Review MCP logs in Claude Desktop developer tools

Automated Testing

Create test files in tests/:
// tests/portfolio.test.ts
import { handlePortfolio } from '../src/tools/portfolio';

describe('Portfolio Tool', () => {
  it('should aggregate balances across chains', async () => {
    const result = await handlePortfolio({
      address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0'
    });
    
    expect(result.chains).toHaveLength(3);
    expect(result.total_value_cro).toBeDefined();
  });
});

Integration Testing

Test against live Cronos networks:
# Set test address with known balance
export TEST_ADDRESS="0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"

# Run integration tests
npm run test:integration

Troubleshooting

Solution:
# Verify build
npm run build

# Check paths in config
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Test server manually
node build/index.js
Cause: Slow or rate-limited RPC endpointSolution:
{
  "env": {
    "CRONOS_EVM_RPC": "https://faster-rpc-endpoint.cronos.org"
  }
}
Solution:
# Authenticate with Google Cloud
gcloud auth application-default login

# Verify credentials
gcloud auth list
Solution:
# Clean and rebuild
rm -rf build node_modules
npm install
npm run build
Check:
  • Address format is correct (0x… or cro1…)
  • Address has transactions on Cronos
  • RPC endpoints are reachable
# Test RPC manually
curl https://evm.cronos.org \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Debugging Tips

  1. Enable verbose logging:
    • Add console.error() statements in tools
    • Logs appear in Claude Desktop developer console
  2. Test tools independently:
    // Create test script: test-tool.ts
    import { handlePortfolio } from './build/tools/portfolio.js';
    
    handlePortfolio({ address: '0x...' })
      .then(console.log)
      .catch(console.error);
    
  3. Check MCP connection:
    • Open Claude Desktop
    • Press Cmd/Ctrl + Shift + I (developer tools)
    • Check Console tab for MCP server logs

Contributing

We welcome contributions! Here’s how to get involved:

Contribution Guidelines

1

Fork the repository

Create your own fork of the CATO repository
2

Create a feature branch

git checkout -b feature/my-feature
3

Make changes

Write clear commit messages and add tests
4

Update documentation

Add documentation in docs/ for new features
5

Submit a pull request

Open a PR with a clear description of changes

Areas for Contribution

New Tools

Additional MCP tools for Cronos

Knowledge Base

More SDK examples, guides, templates

Chain Support

Support for additional Cronos chains

Bug Fixes

Improve reliability and error handling

Documentation

Tutorials, examples, translations

Testing

Increase test coverage

Code Style

  • TypeScript - Use strict typing
  • ESLint - Follow configured rules
  • Prettier - Auto-format code
  • Comments - Document complex logic
# Format code
npm run format

# Check style
npm run lint

Support

Documentation

Official Cronos documentation

Discord

Join the community

GitHub Issues

Report bugs and request features

Email

Contact support

Acknowledgments

Built by: Powered by:
Last Updated: January 23, 2026
Version: 1.0.0
License: MIT