Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-block-status

Retrieve the status of a Bitcoin block by providing its hash, ensuring accurate and real-time blockchain data access via the Mempool MCP Server.

Instructions

Returns status for a block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe block hash to get status for

Implementation Reference

  • Registers the MCP tool 'get-block-status' with the server, defines the input schema using Zod for the block hash parameter, and implements the tool handler as an async function that fetches the status via BlocksService and returns formatted text content.
    private registerGetBlockStatusHandler(): void { this.server.tool( "get-block-status", "Returns status for a block", { hash: z.string().length(64).describe("The block hash to get status for"), }, async ({ hash }) => { const text = await this.blocksService.getBlockStatus({ hash }); return { content: [{ type: "text", text }] }; } ); }
  • Application service handler for getBlockStatus that retrieves raw data from the request service and formats it using formatResponse helper.
    async getBlockStatus({ hash }: IHashParameter): Promise<string> { const data = await this.requestService.getBlockStatus({ hash }); return formatResponse<IBlockStatusResponse>("Block Status", data); }
  • Infrastructure helper that performs the actual API request to fetch block status for the given hash.
    async getBlockStatus({ hash }: { hash: string }): Promise<IBlockStatusResponse | null> { return this.client.makeRequest<IBlockStatusResponse>(`block/${hash}/status`); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexandresanlim/mempool-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server