Sponsored by Deepsite.site

Celo MCP Server

Created By
celo-org6 months ago
MCP server that provides AI agents with access to Celo blockchain data and functionality
Content

Celo MCP Server

A Model Context Protocol (MCP) server for interacting with the Celo blockchain. This server provides comprehensive access to Celo blockchain data, token operations, NFT management, smart contract interactions, transaction handling, and governance operations.

Installation

  1. Clone the repository:
git clone https://github.com/celo-org/celo-mcp
cd celo-mcp
  1. Install dependencies:
pip install -e .
  1. Set up environment variables (optional):
export CELO_RPC_URL="https://forno.celo.org"  # Default: Celo mainnet
export CELO_TESTNET_RPC_URL="https://alfajores-forno.celo-testnet.org"  # Alfajores testnet

MCP Integration

Cursor IDE Integration

To use this MCP server with Cursor IDE, add the following configuration to your MCP settings file (~/.cursor/mcp.json):

{
  "mcpServers": {
    "celo-mcp": {
      "command": "uvx",
      "args": ["--refresh", "celo-mcp"]
    }
  }
}

The --refresh flag ensures that the latest code is always loaded when the MCP server starts.

Claude Desktop Integration

For Claude Desktop, add this configuration to your MCP settings file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "celo-mcp": {
      "command": "uvx",
      "args": ["--refresh", "celo-mcp"]
    }
  }
}

Usage

Running the Server

# Run the MCP server
python -m celo_mcp.server

# Or use the CLI entry point
celo-mcp-server

Available Tools

Blockchain Data Operations

  1. get_network_status

    • Get current network status and connection information
    • No parameters required
  2. get_block

    • Fetch block information by number, hash, or "latest"
    • Parameters: block_identifier, include_transactions (optional)
  3. get_transaction

    • Get transaction details by hash
    • Parameters: tx_hash
  4. get_account

    • Get account information including balance and nonce
    • Parameters: address
  5. get_latest_blocks

    • Get information about recent blocks
    • Parameters: count (optional, default: 10, max: 100)

Token Operations

  1. get_token_info

    • Get detailed token information (name, symbol, decimals, supply)
    • Parameters: token_address
  2. get_token_balance

    • Get token balance for a specific address
    • Parameters: token_address, address
  3. get_celo_balances

    • Get CELO and stable token balances for an address
    • Parameters: address

NFT Operations

  1. get_nft_info

    • Get NFT information including metadata and collection details
    • Parameters: contract_address, token_id
  2. get_nft_balance

    • Get NFT balance for an address (supports ERC721 and ERC1155)
    • Parameters: contract_address, address, token_id (optional for ERC1155)

Smart Contract Operations

  1. call_contract_function

    • Call a read-only contract function
    • Parameters: contract_address, function_name, abi, function_args (optional), from_address (optional)
  2. estimate_contract_gas

    • Estimate gas for a contract function call
    • Parameters: contract_address, function_name, abi, from_address, function_args (optional), value (optional)

Transaction Operations

  1. estimate_transaction

    • Estimate gas and cost for a transaction
    • Parameters: to, from_address, value (optional), data (optional)
  2. get_gas_fee_data

    • Get current gas fee data including EIP-1559 fees
    • No parameters required

Governance Operations

  1. get_governance_proposals

    • Get Celo governance proposals with pagination support
    • Parameters: include_inactive (optional), include_metadata (optional), page (optional), page_size (optional), offset (optional), limit (optional)
  2. get_proposal_details

    • Get detailed information about a specific governance proposal including content and voting history
    • Parameters: proposal_id

Key Features

Token Support

  • ERC20 Standard: Full support for ERC20 tokens
  • Celo Stable Tokens: Built-in support for cUSD, cEUR, and cREAL
  • Balance Queries: Get token balances with proper decimal formatting
  • Token Information: Retrieve name, symbol, decimals, and total supply

NFT Support

  • Multi-Standard: Support for both ERC721 and ERC1155 standards
  • Automatic Detection: Automatically detects NFT standard using ERC165
  • Metadata Fetching: Retrieves and parses NFT metadata from URIs
  • IPFS Support: Built-in IPFS gateway support for metadata
  • Collection Information: Get collection-level information

Smart Contract Interactions

  • Function Calls: Call read-only contract functions
  • Gas Estimation: Estimate gas costs for contract interactions
  • ABI Management: Parse and manage contract ABIs
  • Event Handling: Retrieve and decode contract events
  • Transaction Building: Build contract transactions

Transaction Management

  • Gas Estimation: Accurate gas estimation for transactions
  • EIP-1559 Support: Modern fee structure with base fee and priority fee
  • Transaction Simulation: Simulate transactions before execution
  • Fee Calculation: Dynamic fee calculation based on network conditions

Governance Support

  • Proposal Management: Retrieve and analyze Celo governance proposals
  • Voting Data: Access proposal voting history and results
  • Metadata Integration: Fetch proposal metadata from GitHub repositories
  • Pagination Support: Efficiently browse through large sets of proposals

Development

Running Tests

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=celo_mcp

Code Quality

# Format code
black src/
isort src/

# Lint code
flake8 src/
mypy src/

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For questions, issues, or contributions, please:

  1. Check the existing issues on GitHub
  2. Create a new issue with detailed information
  3. Join the community discussions

Acknowledgments

  • Built on the Model Context Protocol (MCP) framework
  • Uses Web3.py for Ethereum/Celo blockchain interactions
  • Supports the Celo ecosystem and its stable token infrastructure
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server