Skip to main content
Glama
Block MCP Server
by CollinDex

⛓️ Block MCP Server

A Model Context Protocol (MCP) server for Blockchain interactions. This server enables AI agents to interact with multiple blockchain networks, check financial data, and send real-time notifications to Telegram.

πŸ› οΈ Tools Included

  1. πŸ’° Wallet Balance Checker: Retrieves native token balances for any wallet address across Ethereum, Polygon, Arbitrum, Optimism, and Base simultaneously using public RPC nodes.

  2. πŸ“œ Frax Transactions: Fetches the 5 latest transactions on the FRAX network, including both native transfers and ERC-20 token events.

  3. β›½ Gas Price Estimator: Provides real-time gas fee estimates (in Gwei) across multiple blockchain networks to help determine transaction costs.

  4. πŸ’± Crypto Converter: Converts cryptocurrency and fiat values using real-time market rates (e.g., BTC to ETH or USDC to USD).

  5. πŸ€– Telegram Bot: Programmatically posts updates, messages, or automated notifications to a specific Telegram chat or channel.


Related MCP server: Universal Crypto MCP

βš™οΈ Setup Instructions

Prerequisites

  • Python 3.11+

  • uv

1. Environment Variables

Create a .env file in the root directory and populate it with your credentials:

# Telegram Configuration
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
TELEGRAM_CHAT_ID=your_numeric_chat_id

# Blockchain API Keys
FRAXSCAN_API_KEY=your_fraxscan_api_key

# Optional: CoinGecko API Key
COINGECKO_API_KEY=your_api_key

2. Installation

  1. Clone the repository:

    git clone <YOUR_REPO_URL_HERE>
    cd <YOUR_REPO_NAME>
  2. Install dependencies: This project uses uv for fast dependency management.

    make install

πŸš€ How to Run

The easiest way to test the tools is using the built-in Makefile command, which launches the MCP Inspector.

make dev

Alternatively: uv run fastmcp dev main.py

πŸ“– Usage & Examples

Below are example inputs for testing the tools in the MCP Inspector.

1. Wallet Balance Checker Tool (wallet_check)

Queries multiple public RPC endpoints to retrieve native balances across various chains.

  • Input:

    { "address": "0x..." }
  • Response:

    {
      "Ethereum": "1.2450 ETH",
      "Arbitrum": "0.0000 ETH",
      "Polygon": "150.3200 MATIC",
      "Optimism": "0.0500 ETH",
      "Base": "0.1200 ETH"
    }

2. Frax Transaction History (get_frax_transactions)

Merges native and token transfer history from the Fraxscan API, sorted by timestamp.

  • Input:

    { "address": "0x4200000000000000000000000000000000000015" }
  • Response:

    [
      {
        "time": "2026-01-30 18:00:00",
        "amount": "0.5000 frxETH",
        "token": "frxETH",
        "type": "Native",
        "hash": "0x..."
      }
    ]

3. Gas Price Estimator (get_gas_prices)

Monitors real-time gas prices (in Gwei) to estimate transaction costs.

  • Input:

    {}
  • Response:

    {
      "Ethereum": "πŸ”΄ 45.2 Gwei",
      "Base": "🟒 0.01 Gwei"
    }

4. Crypto Converter (convert_crypto)

Converts time between timezones.

  • Input:

    {
      "amount": 1,
      "from_coin": "bitcoin",
      "to_coin": "ripple"
    }
  • Response:

    {
      "Response": "1 BITCOIN = 1235999999.0 XRP (Rate: 95000)"
    }

5. Telegram Bot (send_telegram_message)

This tool allows the AI to send notifications to your phone via Telegram.

πŸ”„ How the Flow Works (Sending Messages)

  1. User Trigger: You give Claude a condition or a direct command (e.g., "If ETH is below $2000, alert me").

  2. Decision: Claude evaluates the condition. If true, it decides to call send_telegram_message.

  3. Execution: The MCP server receives the text payload and makes an HTTP POST request to the Telegram Bot API.

  4. Confirmation: The Telegram API confirms the delivery, and the MCP server reports back to Claude that the task is done.

πŸ“ Implementation Details

  • Input:

{
  "message": "The deployment was successful"
}
  • Response:

"Message sent successfully!"

πŸ€– Agent Mode (Auto-Pilot)

This mode enables the AI to automatically check for new messages and respond to them in a continuous loop, while also performing other operations in between.

Prompt to Initiate:

"I want you to run in Auto-Pilot Mode. Here is your loop:
1. **Check:** Run `telegram_read_messages`.
2. **Act:** If there is a NEW message (one you haven't answered yet), interpret it and use `telegram_reply` to send the answer.
3. **Wait:** If there are no new messages, carry out any pending commands then run `wait_for_seconds(4)`.
4. **Repeat:** Go back to Step 1.
Do not ask me for permission between steps. Just keep running this loop indefinitely."

How the Loop Works:

  1. Check: The AI polls the Telegram API for incoming messages.

  2. Process: It reads the content of any new user messages (e.g., a user asking "What is the price of BTC?").

  3. Action: It uses other available tools (like convert_crypto) to find the answer.

  4. Reply: It sends the answer back to the user via Telegram and waits for the next cycle.

Available Tools

9 tools
convert_cryptoA

Convert cryptocurrency using real-time rates (e.g., BTC to ETH, USDC to USD).

Args: amount: Volume to convert (e.g., 1.5) from_coin: Coin ID/Symbol (e.g., 'bitcoin', 'ethereum', 'usdc') to_coin: Target currency (e.g., 'usd', 'eur', 'eth')

Inputs: amount (required), from_coin (required), to_coin (required). Returns: result

get_gas_pricesA

Check the current gas fees (in Gwei) across multiple blockchains. Low (<10) is cheap. High (>50) is expensive.

Inputs: no named parameters. Returns: object

get_transactionsA

Fetch the 5 latest transactions for a specific address on the FRAX Network

Args: address: the wallet address to check

Inputs: address (required). Returns: result

health_checkA

Returns a status message that the server is live

Inputs: no named parameters. Returns: result

send_telegram_messageC

Send a notification to the configured Telegram Chat.

Args: message: The text to send to your phone.

Inputs: message (required). Returns: result

telegram_read_messagesB

Reads the last few messages sent to the bot by the user. Useful for checking if the user has replied or asked a question.

Inputs: limit. Returns: result

telegram_replyB

Sends a reply to a specific user/chat ID. Args: chat_id: The ID of the user to reply to. text: The message to send back.

Inputs: chat_id (required), text (required). Returns: result

wait_for_secondsB

Pauses execution for a set number of seconds. REQUIRED for running automated loops to reply messages.

Inputs: seconds (required). Returns: result

wallet_checkB

Check the native token balance of a wallet across multiple blockchains. Args: address: The wallet address (must start with 0x)

Inputs: address (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 9 tools

    Disambiguation2/5

    The tool set has unclear boundaries and overlapping purposes, particularly in the Telegram-related tools. 'send_telegram_message', 'telegram_read_messages', and 'telegram_reply' all handle Telegram messaging but with ambiguous distinctionsβ€”'send_telegram_message' and 'telegram_reply' seem to serve similar functions, and 'telegram_read_messages' overlaps with monitoring interactions. Additionally, 'get_transactions' and 'wallet_check' both involve address queries but target different data (transactions vs. balances), which could cause confusion. The descriptions help somewhat, but the overlap is significant.

    Naming Consistency3/5

    The naming conventions are mixed, with some tools using verb_noun patterns like 'convert_crypto' and 'get_gas_prices', while others use noun_verb like 'health_check' or inconsistent structures like 'telegram_read_messages' (noun_verb_noun) and 'wait_for_seconds' (verb_preposition_noun). This lack of a consistent pattern makes the set less predictable, though the names remain readable overall. The deviations are notable but not chaotic.

    Tool Count4/5

    With 9 tools, the count is reasonable and well-scoped for a server covering cryptocurrency conversion, blockchain data, and Telegram integration. It's not excessive, and each tool appears to serve a distinct functional area, though some overlap exists. The number aligns well with the apparent scope, being neither too thin nor too heavy, making it appropriate for the server's purpose.

    Completeness3/5

    The server shows notable gaps in coverage for its implied domain of blockchain and messaging operations. For cryptocurrency conversion, tools like 'convert_crypto' and 'get_gas_prices' are present, but there's no tool for executing trades or managing wallets beyond checking balances. In Telegram functionality, basic send/reply/read tools exist, but there's no tool for configuring or managing chats. The surface covers core actions but lacks full lifecycle or advanced operations, which agents might need to work around.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      C
      quality
      B
      maintenance
      Enables AI agents to interact with any EVM-compatible blockchain through natural language, supporting token swaps, cross-chain bridges, staking, lending, governance, gas optimization, and portfolio tracking across networks like Ethereum, BSC, Polygon, Arbitrum, and more.
      100
      41 npm
      44
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to perform blockchain operations like wallet management, token info, DeFi swaps, cross-chain bridging, and price checking across Ethereum, BNB Chain, and Solana.
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to fetch live multi-chain portfolio, token info, gas prices, and token prices across Ethereum, Base, Polygon, Arbitrum, and Optimism with a single call. No API key required.
      4
      MIT