Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-price

Retrieve current Bitcoin prices across multiple fiat currencies to monitor market values and support financial analysis.

Instructions

Returns the current BTC price in various fiat currencies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get-price' MCP tool with the server, including description and an inline asynchronous handler that calls GeneralService.getPrice() to fetch the price and returns it as formatted text 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 GeneralService that fetches raw price data from the request service and formats it into a user-friendly string using the formatResponse utility.
    async getPrice(): Promise<string> { const data = await this.requestService.getPrice(); return formatResponse<any>("Current Price", data); }
  • Core implementation helper that makes the HTTP request to the 'prices' API endpoint via IApiClient to retrieve current BTC price data in various currencies.
    async getPrice(): Promise<any | null> { return this.client.makeRequest<any>(`prices`); }

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