nostr-auth
nostr-auth-agents
LLMコーディングエージェント向けのNostrサインイン — 認証のみ、ウォレット不要、ブラウザ拡張機能不要、リレーアカウント不要。
エージェント(Claude Code、OpenCode、OpenClaw、Codex、Cursorなど)は「Sign in with Nostr」チャレンジまたはイベントテンプレートを受け取ります。このリポジトリは、ローカルのマスターシークレットから派生したsecp256k1(BIP-340 schnorr)キーでそれに署名し、オプションで署名をサービスコールバックに送信します。
npmランタイム依存関係ゼロ:純粋なBigInt secp256k1/schnorr + node:crypto。クリーンなクローンから起動します。
メソッド
メソッド | ステータス | ノート |
NIP-07 サインイン(チャレンジイベント署名) | ✅ v1.0.0 | LNURL-auth UXをミラーリング |
NIP-98 HTTP認証( | 🔜 予定 | 次 |
NIP-42 リレーAUTH(websocket) | 🔜 予定 | |
NIP-05 識別子解決 | 🔜 予定 |
Related MCP server: Alby Bitcoin Payments MCP Server
使用方法
# Sign a classic kind-22242 sign-in challenge and submit it
node nostr_auth.js nip07 --challenge "<hex>" \
--relay "wss://relay.example.com" \
--domain example.com \
--callback "https://site.example.com/verify"
# Dry-run: sign but don't submit (inspect first)
node nostr_auth.js nip07 --challenge "<hex>" --dry-run --json
# Sign an arbitrary event template (what window.nostr.signEvent would do)
node nostr_auth.js nip07 '{"kind":22242,"tags":[["challenge","<hex>"]],"content":""}'
# Print the derived identity (hex pubkey + npub)
node nostr_auth.js nip07 pubkey --domain example.com進行ログはstderrに出力されます。結果(JSON)はstdoutに出力されます。終了コード:0 受け入れ、1 クライアントエラー、2 使用方法、3 サーバーERROR、4 JSON以外のコールバック応答。
キー管理
初回実行時に、
~/.config/nostr-auth/master.key(モード0600)に32バイトのマスターシークレットを生成します。サービスごとのアイデンティティ:
linkingPriv = HMAC-SHA256(master, serviceDomain)。同じドメイン→同じnpub、異なるドメイン→異なるnpub(プライバシー)。--single-keyはすべてのサービスで1つのアイデンティティを共有します。--generateはマスターシークレットを上書きします。パスは--keyfile/--keyoutまたはNOSTR_AUTH_KEYFILE環境変数で上書きできます。
プロトコル(NIP-07スタイル)
チャレンジ→イベント(デフォルトではkind
22242)にchallengeタグとオプションのrelayタグが含まれます。NIP-01 id:
sha256(JSON.stringify([0, pubkey, created_at, kind, tags, content]))。BIP-340 schnorrで生の32バイトidに署名→64バイトの16進
sig。コールバックに
{"event": {...}}をPOST→{"status":"OK"}/{"status":"ERROR","reason":"..."}。
エージェント向けの完全なドキュメントはSKILL.mdを参照してください。
MCPサーバー
依存関係ゼロのstdio MCPサーバー(mcp/server.js)で、nostr_nip07_sign / nostr_nip07_pubkeyツールを公開しています:
{
"mcpServers": {
"nostr-auth": { "command": "node", "args": ["mcp/server.js"] }
}
}Claude Code(.claude-plugin/)、Codex、Cursor、およびskills.shの検出可能性(skills.sh.json)用のプラグインマニフェストが含まれています。プラットフォームごとの配布状況についてはPUBLISHING.mdを参照してください。
エージェントスキルとしてのインストール(プラットフォーム別)
Claude Code / 任意のMCPクライアント:リポジトリをスキルディレクトリに置き、
SKILL.md+.mcp.jsonを使用します。OpenClaw / ClawHub:
skills/nostr-auth/は自律バンドルです(SKILL.md+scripts/nostr_auth.js、npm依存関係ゼロ)。skills.sh (Vercel):
npx skills add dyegolara/nostr-auth-agentsnpm:
npm i -g nostr-auth→nostr-auth nip07 ...
セルフテスト(オフライン、無料)
npm ci
npm testローカルのモック「Sign in with Nostr」サービス(mock_server.js)は、チャレンジ→署名→送信→検証のラウンドトリップ、リプレイ拒否、ドライラン安全性、ドメインごとのアイデンティティ安定性、およびポータブルスキルバンドルを検証します。
プロジェクト構成
nostr_auth.js CLI (bin "nostr-auth")
lib/ key mgmt, BIP-340 schnorr, NIP-01 events, NIP-07 flow
mcp/server.js zero-dep MCP server (stdio)
mock_server.js local sign-in mock for tests
skills/nostr-auth/ portable OpenClaw/ClawHub skill bundle
contrib/anthropics/ educational skill variant for anthropics/skills
test/ vitest suiteライセンス
MIT — LICENSEを参照してください。認証のみ:このプロジェクトは資金を保持せず、ノートを公開せず、独自にリレーに接続することはありません。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceConnects a Bitcoin Lightning wallet to your LLM using Nostr Wallet Connect, enabling payment functionalities within language models like Claude.6915MIT
- Alicense-qualityDmaintenanceEnables Bitcoin Lightning wallet integration with LLMs through Nostr Wallet Connect (NWC). Supports lightning payments, LNURL operations, and L402 authentication for AI-powered bitcoin transactions.28Apache 2.0
- AlicenseCqualityCmaintenance23 tools for AI agents working with Nostr Open source. No API key. No account. NIP-46 remote signing Publish notes, reply, react, repost Encrypted DMs (NIP-04 + NIP-44) Fetch events, profiles, social graph23201MIT
- AlicenseAqualityCmaintenancePersistent memory and payment safety for AI agents on Lightning. Enables agents to remember purchases, track vendor reputations, enforce budgets, and share trust signals via Nostr.229MIT
Related MCP Connectors
Agent registry with Nostr identity, reputation, escrow, observability, and Lightning payments.
Keyless non-custodial crypto payments for AI agents: payment links and tip jars, no API key.
Helps AI coding agents integrate MetaMask Embedded Wallets (Web3Auth) SDKs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/dyegolara/nostr-auth-agents'
If you have feedback or need assistance with the MCP directory API, please join our Discord server