Back to MCP directory
publicPublicdnsLocal runtime

lightning-enable-mcp

一个开源的MCP服务器,让AI代理能够通过闪电网络进行比特币支付、访问L402付费API、管理钱包和跟踪支出,支持多种闪电网络钱包。

article

README

🚀 闪电网络启用MCP服务器

这是一个开源的MCP(模型上下文协议)服务器,可让AI智能体进行闪电网络支付。所有工具均免费使用,无需许可证或订阅。

该项目提供 .NETPython 版本。

🚀 快速开始

快速安装

# .NET
dotnet tool install -g LightningEnable.Mcp

# Python
pip install lightning-enable-mcp

# Python(免安装)
uvx lightning-enable-mcp

# Docker
docker pull refinedelement/lightning-enable-mcp:latest

Claude桌面配置

将以下内容添加到 claude_desktop_config.json 文件中:

.NET:

{
  "mcpServers": {
    "lightning-enable": {
      "command": "dotnet",
      "args": ["tool", "run", "lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}

Python:

{
  "mcpServers": {
    "lightning-enable": {
      "command": "uvx",
      "args": ["lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}

配置文件位置:

  • Windows%APPDATA%\Claude\claude_desktop_config.json
  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux~/.config/claude/claude_desktop_config.json

✨ 主要特性

为你的AI智能体配备闪电网络钱包后,它可以实现以下功能:

  • 支付发票:通过闪电网络向任何BOLT11发票发送比特币。
  • 访问L402 API:自动支付L402挑战,实现无缝API访问。
  • 发现API:在L402 API注册表中按关键字或类别搜索付费API,或获取特定API的清单以了解完整的端点详细信息和定价。
  • 跟踪支出:设置预算限制、查看支付历史记录和余额。
  • 创建发票:生成发票以接收付款。
  • 获取比特币价格:从Strike获取实时比特币价格。
  • 货币兑换:在美元/比特币/欧元等货币之间进行兑换(Strike钱包)。
  • 链上转账:通过Strike/LND进行比特币链上转账。

📦 安装指南

快速安装

# .NET
dotnet tool install -g LightningEnable.Mcp

# Python
pip install lightning-enable-mcp

# Python(免安装)
uvx lightning-enable-mcp

# Docker
docker pull refinedelement/lightning-enable-mcp:latest

Claude桌面配置

将以下内容添加到 claude_desktop_config.json 文件中:

.NET:

{
  "mcpServers": {
    "lightning-enable": {
      "command": "dotnet",
      "args": ["tool", "run", "lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}

Python:

{
  "mcpServers": {
    "lightning-enable": {
      "command": "uvx",
      "args": ["lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}

配置文件位置:

  • Windows%APPDATA%\Claude\claude_desktop_config.json
  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux~/.config/claude/claude_desktop_config.json

📚 详细文档

📄 许可证

本项目采用MIT许可证,详情请见 LICENSE

🔗 链接

🔍 支持的钱包

| 钱包 | 设置方式 | 是否支持L402 | |------|----------|--------------| | Strike | API密钥 | 是 | | LND | REST + macaroon | 是(有保障) | | NWC (CoinOS) | 连接字符串 | 是 | | NWC (CLINK) | 连接字符串 | 是 | | NWC (Alby Hub) | 连接字符串 | 是 | | OpenNode | API密钥 | 否(无预图像) |

💡 试用:闪电网络启用商店

闪电网络启用商店 是一个由L402驱动的实时网络商店。你可以向Claude提问:

从store.lightningenable.com为我购买一件闪电网络启用T恤

📁 仓库结构

lightning-enable-mcp/
├── dotnet/
│   ├── src/LightningEnable.Mcp/         # .NET MCP服务器
│   ├── tests/LightningEnable.Mcp.Tests/  # .NET测试
│   └── LightningEnable.Mcp.sln          # 解决方案文件
├── python/
│   └── lightning-enable-mcp/             # Python MCP服务器
├── .github/workflows/publish-mcp.yml     # CI/CD
├── LICENSE                               # MIT许可证
└── README.md                             # 本文件
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client