Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-price

Retrieve the current Bitcoin price in multiple fiat currencies using the Mempool MCP Server. This tool provides real-time BTC pricing data for accurate financial analysis and transactions.

Instructions

Returns the current BTC price in various fiat currencies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the core logic for 'get-price' tool by making an API request to the 'prices' endpoint via IApiClient.
    async getPrice(): Promise<any | null> { return this.client.makeRequest<any>(`prices`); }
  • Registers the 'get-price' MCP tool, providing description and handler that delegates to GeneralService.getPrice() and formats response as MCP content.
    private registerGetPriceHandler(): void { this.server.tool( "get-price", "Returns the current BTC price in various fiat currencies", async () => { const text = await this.generalService.getPrice(); return { content: [{ type: "text", text }] }; } ); }
  • Helper method in application service layer that calls the request service and formats the price data using formatResponse.
    async getPrice(): Promise<string> { const data = await this.requestService.getPrice(); return formatResponse<any>("Current Price", data); }

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