Skip to main content
Glama

NWC MCP 服务器

使用 Nostr Wallet Connect( NWCNIP-47 )将比特币闪电钱包连接到您的 LLM。

此 MCP 服务器使用官方 MCP TypeScript SDK

快速入门

添加到 Claude 桌面

将其添加到您的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "nwc": {
      "command": "npx",
      "args": ["-y", "@getalby/nwc-mcp-server"],
      "env": {
        "NWC_CONNECTION_STRING": "YOUR NWC CONNECTION STRING HERE"
      }
    }
  }
}

添加到鹅

  1. 类型goose configure

  2. 添加扩展 -> 命令行扩展

  3. 称之为nwc

  4. 应该运行什么命令: npx -y @getalby/nwc-mcp-server

  5. 超时:30

  6. 描述:无

  7. 环境变量:是

  8. 环境变量名称: NWC_CONNECTION_STRING

  9. 环境变量值: nostr+walletconnect://... (此处为你的 NWC 连接密钥)

添加到克莱恩

复制以下内容并将其粘贴到命令行提示符中。它会提示您更新连接字符串。

Add the following to my MCP servers list:

"nwc": {
  "command": "npx",
  "args": ["-y", "@getalby/nwc-mcp-server"],
  "env": {
    "NWC_CONNECTION_STRING": "nostr+walletconnect://..."
  },
  "disabled": false,
  "autoApprove": []
}

添加到 N8N(社区节点)

目前,此 MCP 服务器仅通过命令行(STDIO)工作。

您可以安装n8n-nodes-mcp社区节点并启用工具运行 n8n,例如

N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true npx n8n

创建一个空白工作流并添加一个 AI 代理节点。配置你的 LLM 模型并添加一个新工具“MCP 客户端”(旁边会有一个立方体,显示它是一个社区节点)。

通过添加选择命令行(STDIO)的凭证来配置 MCP 客户端。

命令: npx参数: -y @getalby/nwc-mcp-server环境NWC_CONNECTION_STRING=nostr+walletconnect://your_key_here (在文本编辑器中创建整行并粘贴,因为密码字段无法切换为纯文本)

请参阅N8N 付费聊天工作流程以获取完整示例

Related MCP server: Lightning Tools MCP Server

来自源

先决条件

  • Node.js 20+

  • 支持 NWC 的闪电钱包的连接字符串

安装

yarn install

建筑

yarn build

添加您的 NWC 连接

.env.example复制到.env并更新连接字符串

检查工具(无需 LLM 即可使用/测试)

yarn inspect

支持的工具

查看工具目录

Available Tools

6 tools
get_balanceA

Get the balance of the connected lightning wallet

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves balance but does not describe any behavioral traits such as whether it requires authentication, has rate limits, returns real-time or cached data, or handles errors. This leaves significant gaps for a tool interacting with a financial system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with no unnecessary words. It is front-loaded and appropriately sized, making it easy to parse without sacrificing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a financial tool with no annotations and no output schema, the description is incomplete. It does not explain what the balance value represents (e.g., currency units, format), whether it includes pending transactions, or any error conditions. For a tool with zero structured coverage beyond input schema, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here, but it does not compensate for any gaps (none exist). Baseline is 4 for zero-parameter tools as no additional semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get') and target resource ('balance of the connected lightning wallet'), distinguishing it from sibling tools like get_info (general info) or lookup_invoice (invoice-specific). It precisely defines what the tool does without being vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (when you need the wallet balance) but does not explicitly state when to use this tool versus alternatives like get_wallet_service_info or other financial tools. No exclusions or specific scenarios are mentioned, leaving usage guidance at an implied level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_infoB

Get NWC capabilities of the connected lightning wallet, and general information about the wallet and underlying lightning node

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but lacks details on permissions, rate limits, error handling, or response format, which are critical for a tool interacting with a wallet.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key action ('Get') and specifies the information types. It avoids unnecessary words, though it could be slightly more structured by separating the different information categories.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of interacting with a lightning wallet and the absence of annotations and output schema, the description is incomplete. It doesn't explain what specific data is returned (e.g., balance, node ID, capabilities list), error conditions, or dependencies, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately focuses on the tool's purpose without redundant parameter details, aligning with the baseline expectation for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: retrieving NWC capabilities, wallet information, and lightning node details. It specifies the resource (connected lightning wallet) and the type of information returned, though it doesn't explicitly differentiate from sibling tools like 'get_wallet_service_info' or 'get_balance'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is provided on when to use this tool versus alternatives. While the description implies it's for general information retrieval, it doesn't specify use cases, prerequisites, or contrast with siblings such as 'get_wallet_service_info' for more specific data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_wallet_service_infoB

Get NWC capabilities, supported encryption and notification types of the connected lightning wallet

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get') but doesn't specify whether it requires authentication, has rate limits, or details the return format. While it hints at querying a connected wallet, it lacks comprehensive behavioral context, resulting in an average score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key action and details without any wasted words. It directly communicates the tool's function in a structured manner, making it highly concise and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavioral traits, usage context, or output format, leaving gaps that could hinder an AI agent's understanding in more complex scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter-specific information, which is appropriate here, but it doesn't compensate for any gaps since there are none. A baseline of 4 is applied as per the rules for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the specific information retrieved ('NWC capabilities, supported encryption and notification types of the connected lightning wallet'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this from sibling tools like 'get_info' or 'get_balance', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_info' or 'get_balance', nor does it mention any prerequisites or contextual cues for invocation. This lack of comparative or situational advice limits its utility for an AI agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lookup_invoiceC

Look up lightning invoice details from a BOLT-11 invoice or payment hash

ParametersJSON Schema
NameRequiredDescriptionDefault
payment_hashNoThe payment hash of the invoice to look up
invoiceNoThe BOLT 11 invoice to look up

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool is for 'look up' (implying a read operation), but doesn't clarify if it requires authentication, has rate limits, returns specific error conditions, or what 'details' include. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It front-loads the core purpose and uses precise terminology ('BOLT-11 invoice', 'payment hash'), making it easy to parse quickly. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'details' are returned (e.g., status, amount, timestamps), potential errors, or behavioral aspects like idempotency. For a tool with 2 parameters and no structured output documentation, this leaves critical gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions the two input types ('BOLT-11 invoice or payment hash'), but the input schema already has 100% coverage with clear descriptions for 'payment_hash' and 'invoice'. The description adds minimal value beyond the schema, such as implying these are alternative inputs, but doesn't explain their relationship (e.g., if both can be used together). Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Look up lightning invoice details from a BOLT-11 invoice or payment hash.' It specifies the verb ('look up'), resource ('lightning invoice details'), and input types. However, it doesn't explicitly differentiate from sibling tools like 'get_info' or 'make_invoice', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_info' (which might provide general info) or 'pay_invoice' (which might involve payment actions), nor does it specify prerequisites or exclusions. This leaves the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

make_invoiceC

Create a lightning invoice

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesamount in millisats
expiryNoexpiry in seconds
descriptionNonote, memo or description describing the invoice
description_hashNohash of a note, memo or description that is too long to fit within the invoice
metadataNoOptional metadata to include with the payment

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Create') but lacks critical details: it doesn't mention whether this is a read-only or mutating operation (though 'Create' implies mutation), what permissions are required, potential side effects (e.g., generating a payment request), rate limits, or what the output looks like (especially problematic without an output schema).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise ('Create a lightning invoice')—just three words—with zero wasted language. It's front-loaded with the core action and resource, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a financial transaction tool with 5 parameters, no annotations, and no output schema), the description is incomplete. It doesn't address behavioral aspects like mutation effects, authentication needs, or output format, nor does it provide usage context. For a tool that creates invoices in a payment system, more detail is warranted to ensure safe and correct use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain relationships between parameters like 'description' and 'description_hash'). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and the resource ('a lightning invoice'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from sibling tools like 'lookup_invoice' or 'pay_invoice', which would require mentioning that this generates new invoices rather than querying or paying existing ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a lightning wallet), contrast with sibling tools (e.g., 'lookup_invoice' for querying, 'pay_invoice' for paying), or specify appropriate contexts (e.g., for receiving payments).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pay_invoiceC

Pay a lightning invoice

ParametersJSON Schema
NameRequiredDescriptionDefault
invoiceYesThe lightning invoice to pay
amountNoOptional amount in millisats to pay a zero-amount invoice
metadataNoOptional metadata to include with the payment

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but lacks critical details like whether this is a destructive operation, what permissions are needed, potential side effects (e.g., fund transfer), or error handling, leaving significant gaps for a payment tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste, front-loading the core action. It's appropriately sized for the tool's complexity, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a payment operation with financial implications), no annotations, and no output schema, the description is incomplete. It fails to address behavioral aspects, return values, or error cases, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no additional meaning beyond the schema, such as explaining the 'amount' parameter's role with zero-amount invoices or 'metadata' usage. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('pay') and resource ('a lightning invoice'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'make_invoice' or 'lookup_invoice' beyond the verb, which keeps it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as having sufficient balance, or clarify scenarios like paying zero-amount invoices with the 'amount' parameter, leaving usage context ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation4/5

Most tools have distinct purposes, but get_info and get_wallet_service_info overlap significantly in functionality, which could cause confusion for an agent. The other tools (balance, invoice operations) are clearly differentiated.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case (e.g., get_balance, make_invoice, pay_invoice). This predictability makes the set easy to navigate and understand.

Tool Count5/5

With 6 tools, this server is well-scoped for managing a lightning wallet, covering key operations like balance, info, and invoice handling. The count is neither too sparse nor overwhelming for the domain.

Completeness4/5

The toolset covers essential lightning wallet operations, but there are minor gaps, such as no explicit tools for managing notifications or encryption settings, which are mentioned in get_wallet_service_info. Core workflows like invoice creation and payment are well-supported.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/getAlby/nwc-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server