Skip to main content

MCP server for SatoshiAPI — Bitcoin intelligence via Lightning micropayments

Project description

SatoshiAPI MCP Server ⚡

Model Context Protocol server for SatoshiAPI — Bitcoin intelligence data powered by Lightning micropayments.

Gives any MCP-compatible AI agent (Claude, GPT, Gemini) access to real-time Bitcoin data: price, mempool fees, block height, sentiment, and DCA signals.

Install

pip install mcp pymacaroons

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "satoshiapi": {
      "command": "python3",
      "args": ["/path/to/satoshiapi_mcp.py"]
    }
  }
}

With auto-payment (connect your LND node)

{
  "mcpServers": {
    "satoshiapi": {
      "command": "python3",
      "args": ["/path/to/satoshiapi_mcp.py"],
      "env": {
        "SATOSHIAPI_LND_REST": "https://127.0.0.1:8079",
        "SATOSHIAPI_LND_MACAROON": "/path/to/invoice.macaroon",
        "SATOSHIAPI_LND_CERT": "/path/to/tls.cert"
      }
    }
  }
}

With LND configured, the agent pays invoices automatically. Without it, the agent receives the Lightning invoice and instructions for manual payment.

Available Tools

Tool Description Cost
get_btc_price BTC/USD price + 24h change 10 sats
get_mempool_fees Fee estimates (sat/vB) 10 sats
get_block_height Block height + hashrate 10 sats
get_sentiment Fear & Greed index 25 sats
get_dca_signal DCA signal with reasoning 50 sats
get_api_status Service status Free
pay_and_request Complete manual L402 payment

How It Works

  1. Agent calls a tool (e.g., get_btc_price)
  2. MCP server hits api.satoshiapi.io/price
  3. API returns HTTP 402 with Lightning invoice + macaroon
  4. If LND is configured → auto-pays and returns data
  5. If no LND → returns invoice for manual payment
  6. Agent uses the data in its response

Environment Variables

Variable Description Required
SATOSHIAPI_URL API base URL (default: https://api.satoshiapi.io) No
SATOSHIAPI_LND_REST LND REST endpoint (e.g., https://127.0.0.1:8079) For auto-pay
SATOSHIAPI_LND_MACAROON Path to LND invoice macaroon For auto-pay
SATOSHIAPI_LND_CERT Path to LND TLS certificate For auto-pay

License

MIT — SatoshiAPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satoshiapi_mcp-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

satoshiapi_mcp-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file satoshiapi_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: satoshiapi_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for satoshiapi_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9dcb3cb973d05a01f15d789b812de58401f7374e665c1d595e9affa32c13966b
MD5 118a2f400107436fd438d6d6fbc99b9d
BLAKE2b-256 45b8128cf3fc77a98d7bcd013088dcc5a47b18bdaba949d190ef56855d823478

See more details on using hashes here.

File details

Details for the file satoshiapi_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: satoshiapi_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for satoshiapi_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7133a0d35e2fd203764feb9bfa293c6051603a2c8fd06789c98457890ed77cce
MD5 998977934ffbe757dde90664d8aa1ad0
BLAKE2b-256 170f90323f0305c37ebc20352095ecf5e1e781d6667611022d109c12a5e7d673

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page