Celo MCP Server

org.celo由 celo.org 发布v0.4.3更新于 Oct 30, 2026

Query Celo blockchain data: blocks, tokens, NFTs, contracts, governance and staking

发布方自己的服务:Celo Docs

已验证STDIO仅桌面金融开发者工具

概览

AI 生成的概览

面向 Celo 区块链的 MCP 服务器,让助手查询区块、交易、代币余额、治理提案与质押数据,并可申请测试网水龙头资金。

可以做什么
  • 查看网络状态、区块、最新区块以及按哈希查询交易详情
  • 查询 CELO、稳定币与 ERC20 代币余额,以及当前 gas 费用数据
  • 读取治理提案列表与单个提案详情,含投票历史
  • 查看质押余额、可激活质押、验证者组及全网质押统计
  • 向 Celo 水龙头申请测试网 CELO,并查询发放状态
适用场景
适合需要助手回答 Celo 链上活动、钱包余额、治理或验证者质押相关问题,或在 Celo Sepolia 测试网开发时获取测试币的场景。
运行要求
以 Python 包形式本地运行,可通过 uvx 或 pip 安装。可选环境变量:CELO_MCP_RPC_URL(默认 Forno)、CELO_MCP_USE_TESTNET,以及启用水龙头工具所需的 CELO_MCP_FAUCET_API_KEY。需要能访问 Celo RPC 端点。另提供可选 HTTP 传输,涉及主机、CORS、限流与 MCP_AUTH_TOKEN 等设置。
安装前请注意
水龙头工具会消耗与 CELO_MCP_FAUCET_API_KEY 绑定的额度(每个账号与地址每 24 小时 10 次);该密钥只应在 stdio 或已鉴权的部署中使用,因为开放的 HTTP 端点会让任何人消耗额度并导致密钥被吊销。水龙头请求会把测试网 CELO 发送到指定地址。README 中列出的 NFT、合约调用、账户信息等工具并不在实际工具列表中。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Celo MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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:
bash
git clone https://github.com/celo-org/celo-mcpcd celo-mcp
  1. Install dependencies:
bash
pip install -e .
  1. Set up environment variables (optional):
bash
export CELO_MCP_RPC_URL="https://forno.celo.org"  # Default: Celo mainnetexport CELO_MCP_USE_TESTNET=true                  # Use Celo Sepolia instead

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):

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):

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

Connect remotely (Streamable HTTP)

The server can also run as a remote MCP endpoint over Streamable HTTP, so clients connect with a single URL — no local Python install. The stdio setup above is unchanged; this is an additional transport.

Run it in HTTP mode:

bash
celo-mcp-server --transport http --port 3000# or via env:MCP_TRANSPORT=http PORT=3000 celo-mcp-server

Then point any remote-capable MCP client at the URL:

json
{  "mcpServers": {    "celo": { "url": "https://<your-host>/mcp" }  }}

Configuration (environment variables):

VarPurposeDefault
MCP_TRANSPORTstdio or httpstdio
HOST / PORTHTTP bind host / port127.0.0.1 / 3000
MCP_ALLOWED_HOSTSHostnames accepted by the SDK's DNS-rebinding check, comma-separated. Set to your public hostname(s), or * to disable the checklocalhost only
MCP_CORS_ORIGINSComma-separated allowed origins (or *)*
MCP_RATE_LIMIT / MCP_RATE_WINDOWRequests per client per window (seconds); /health is exempt60 / 60
MCP_TRUST_PROXYNumber of X-Forwarded-For hops your infrastructure appends, so the rate limiter keys on the client rather than the proxy address. 1 for a single reverse proxy, 2 behind a Google external load balancer. Counted from the right — see deploymentunset
MCP_AUTH_TOKENIf set, requires Authorization: Bearer <token> on /mcpunset (open)
CELO_MCP_RPC_URLCelo RPC endpointForno for the selected network
CELO_MCP_USE_TESTNETUse Celo Sepolia (chain ID 11142220) instead of mainnetfalse
CELO_MCP_FAUCET_API_KEYEnables the faucet tools. Create one at faucet.celo.org/keys — see Faucet accessunset (faucet tools disabled)

GET /health returns 200 for hosting health checks. See docs/DEPLOYMENT.md for container/hosting instructions.

Usage

Running the Server

bash
# Run the MCP serverpython -m celo_mcp.server
# Or use the CLI entry pointcelo-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
Staking Operations
  1. get_staking_balances

    • Get staking balances for an address, including active and pending stakes broken down by validator group
    • Parameters: address
  2. get_activatable_stakes

    • Get information about pending stakes that can be activated for earning rewards
    • Parameters: address
  3. get_validator_groups

    • Get information about all validator groups, including their members, votes, capacity, and performance metrics
    • No parameters required
  4. get_validator_group_details

    • Get detailed information about a specific validator group including its members and performance data
    • Parameters: group_address
  5. get_total_staking_info

    • Get network-wide staking information including total votes and participation metrics
    • No parameters required
Faucet Operations

Both faucet tools are testnet-only and require CELO_MCP_FAUCET_API_KEY (see Faucet access below).

  1. request_faucet_funds

    • Request testnet CELO for an address. Returns the payout transaction hash if it lands while the request is open, otherwise a request_key to poll with
    • Sends 3 CELO per request, and CELO only — no USDm or other stablecoins
    • Parameters: beneficiary, optional network (celo-sepolia), optional wait (default true)
  2. get_faucet_request_status

    • Check whether a queued faucet request has paid out
    • Parameters: request_key, optional network (celo-sepolia)

Faucet access

The faucet's browser flow is gated on reCAPTCHA v3, which scores headless callers badly, so the faucet tools use its API-key path instead. Create a key at faucet.celo.org/keys (sign in with GitHub; up to 2 keys, 90-day expiry) and set it in your MCP client's env block:

json
{  "mcpServers": {    "celo-mcp": {      "command": "uvx",      "args": ["celo-mcp"],      "env": { "CELO_MCP_FAUCET_API_KEY": "cfk_..." }    }  }}

The key is read from the environment and never passed as a tool argument, so it does not enter the model's context or the conversation transcript.

Limits are set by the faucet, not by this server: 10 requests per 24 hours, counted per GitHub account and per beneficiary address — holding two keys does not double the allowance. Global daily and 10-minute burst ceilings apply across all keys on top of that. celo-sepolia (chain ID 11142220) is the only supported network; there is no mainnet faucet.

The faucet publishes its API contract at openapi.json and llms-full.txt; treat those as the source of truth if amounts or limits change.

Deployment note: the HTTP transport is open unless MCP_AUTH_TOKEN is set. Only configure a faucet key for stdio or authenticated deployments — otherwise anyone reaching /mcp can spend your daily allowance on arbitrary addresses, and the key can be revoked for abuse.

Key Features

Token Support

  • ERC20 Standard: Full support for ERC20 tokens
  • Mento Stable Tokens: Built-in support for USDm, EURm and BRLm (formerly cUSD, cEUR and cREAL), plus XOFm, KESm, PHPm, COPm and GHSm
  • 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

Staking Support

  • Staking Balances: View active and pending stakes by validator group
  • Activation Tracking: Check which pending stakes can be activated
  • Validator Information: Comprehensive validator and validator group data
  • Performance Metrics: Validator scores, election status, and capacity
  • Network Statistics: Total voting power and staking participation

Development

Running Tests

bash
# Install development dependenciespip install -e ".[dev]"
# Run testspytest
# Run with coveragepytest --cov=celo_mcp

Code Quality

bash
# Format codeblack src/isort src/
# Lint codeflake8 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

来源:README.md,提交 f2c1bac

工具

17

get_network_status

Retrieve the current status and connection information of the Celo network, including network health and connectivity details.

无需输入参数。

get_block

Fetch detailed information about a specific block on the Celo blockchain using its number or hash. Optionally include full transaction details within the block.

输入参数block_identifier必填include_transactions

get_transaction

Obtain detailed information about a specific transaction on the Celo blockchain using its transaction hash.

输入参数tx_hash必填

get_latest_blocks

Get information about the most recent blocks on the Celo blockchain, with the ability to specify the number of blocks to retrieve and starting offset.

输入参数countoffset

get_token_balance

Get the token balance for a specific address.

输入参数address必填token_address必填

get_celo_balances

Get CELO and stable token balances for an address.

输入参数address必填

get_stable_token_balance

Get balances of all major stable tokens and CELO for an address using multicall.

输入参数address必填

get_gas_fee_data

Get current gas fee data including EIP-1559 fees.

无需输入参数。

get_governance_proposals

Get Celo governance proposals with pagination support.

输入参数pagelimitoffsetpage_sizeinclude_inactiveinclude_metadata

get_proposal_details

Get detailed information about a specific governance proposal including its content and voting history.

输入参数proposal_id必填

get_staking_balances

Get staking balances for an address, including active and pending stakes broken down by validator group.

输入参数address必填

get_activatable_stakes

Get information about pending stakes that can be activated for earning rewards.

输入参数address必填

get_validator_groups

Get information about all validator groups, including their members, votes, capacity, and performance metrics.

输入参数pagelimitoffsetpage_size

get_validator_group_details

Get detailed information about a specific validator group including its members and performance data.

输入参数group_address必填

get_total_staking_info

Get network-wide staking information including total votes and participation metrics.

无需输入参数。

request_faucet_funds

Request testnet CELO from the Celo faucet for an address. Testnet only (celo-sepolia); there is no mainnet faucet. Sends 3 CELO per request; dispenses CELO only - no USDm or other stablecoins. Requires the CELO_MCP_FAUCET_API_KEY environment variable, set to a key created at https://faucet.celo.org/keys. Limited to 10 requests per 24 hours, per account and per beneficiary address. Returns the payout transaction hash if it lands while the request is open, otherwise a request_key to check with get_faucet_request_status.

输入参数waitnetworkbeneficiary必填

get_faucet_request_status

Check whether a queued faucet request has paid out, using the request_key returned by request_faucet_funds. Returns the payout transaction hash once the status is Done.

输入参数networkrequest_key必填

版本历史

1
  1. v0.4.3最新Oct 30, 2026

评分

已满足适用检查项的 80%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Celo 集成