Skip to content

Add Braiins Pool MCP server#30

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-installation-instructions
Draft

Add Braiins Pool MCP server#30
Copilot wants to merge 2 commits intomainfrom
copilot/add-installation-instructions

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Implements a TypeScript MCP server for the Braiins Pool mining API, exposing 12 tools for worker monitoring, earnings tracking, pool stats, and account configuration — deployable via npm, Docker, or Docker Compose.

Structure

  • src/api/ — Typed HTTP client (axios) wrapping the Braiins REST API with in-memory/Redis response caching, token-bucket rate limiting, and duck-typed error translation for 401/404/429 responses
  • src/server/ — MCP stdio server (@modelcontextprotocol/sdk) with auth.ts for env-based API key validation and tools.ts registering all 12 tools via Zod-validated schemas
  • src/utils/ — Winston structured logger (pretty/JSON formats), CacheService (falls back to in-memory when Redis is unavailable), RateLimiter (10 rps default)
  • Docker — Multi-stage Dockerfile; docker-compose.yml (basic) and docker-compose.redis.yml (adds Redis + Redis Commander on :8081)

Tools

Group Tools
Workers list_workers, get_worker_details, get_worker_hashrate, restart_worker
Earnings get_earnings_summary, get_payout_history, estimate_next_payout
Pool stats get_pool_stats, get_block_history, get_network_difficulty
Config update_payout_threshold, set_notification_preferences

Client config (Claude Desktop)

{
  "mcpServers": {
    "braiins-pool": {
      "command": "node",
      "args": ["/path/to/mcp/braiins-pool/dist/index.js"],
      "env": { "BRAIINS_API_KEY": "your_api_key" }
    }
  }
}

The BraiinsApiClient accepts an optional injected AxiosInstance to keep the test layer free of real HTTP calls; axios-mock-adapter is applied to the injected instance directly rather than the module default.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add installation instructions for braiins pool mcp server Add Braiins Pool MCP server Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants