Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-historical-price

Retrieve Bitcoin price data for specific dates to analyze historical market trends and track value changes over time.

Instructions

Returns the BTC price for a specific date (YYYY-MM-DD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesThe date in YYYY-MM-DD format

Implementation Reference

  • Registers the 'get-historical-price' MCP tool with input schema (date: YYYY-MM-DD) and thin handler that delegates to GeneralService.getHistoricalPrice.
    private registerGetHistoricalPriceHandler(): void { this.server.tool( "get-historical-price", "Returns the BTC price for a specific date (YYYY-MM-DD)", { date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).describe("The date in YYYY-MM-DD format") }, async ({ date }) => { const text = await this.generalService.getHistoricalPrice(date); return { content: [{ type: "text", text }] }; } ); }
  • Core handler implementation: performs the API request to fetch historical BTC price for the given date.
    async getHistoricalPrice(date: string): Promise<any | null> { // date format: YYYY-MM-DD return this.client.makeRequest<any>(`historical-price/${date}`); }
  • Application service helper that delegates to infrastructure request service and formats the response.
    async getHistoricalPrice(date: string): Promise<string> { const data = await this.requestService.getHistoricalPrice(date); return formatResponse<any>("Historical 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