Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-difficulty-adjustment

Retrieve Bitcoin difficulty adjustment data to understand network mining complexity changes and predict future adjustments.

Instructions

Returns current and next Bitcoin difficulty adjustment info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler function for 'get-difficulty-adjustment'. Fetches data from GeneralService and returns it as text content in MCP format.
    async () => { const text = await this.generalService.getDifficultyAdjustment(); return { content: [{ type: "text", text }] }; }
  • Registers the 'get-difficulty-adjustment' tool with the MCP server, including name, description, and handler function.
    this.server.tool( "get-difficulty-adjustment", "Returns current and next Bitcoin difficulty adjustment info", async () => { const text = await this.generalService.getDifficultyAdjustment(); return { content: [{ type: "text", text }] }; } );
  • Helper method in GeneralService that retrieves raw data from RequestService and formats it into a string response.
    async getDifficultyAdjustment(): Promise<string> { const data = await this.requestService.getDifficultyAdjustment(); return formatResponse<any>("Difficulty Adjustment", data); }
  • Core helper method that makes an API request to fetch the difficulty adjustment data.
    async getDifficultyAdjustment(): Promise<any | null> { return this.client.makeRequest<any>(`difficulty-adjustment`); }

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