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
| Name | Required | Description | Default |
|---|---|---|---|
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`); }
- src/interface/controllers/GeneralToolsController.ts:28-37 (registration)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); }