Skip to main content
Glama

{"type": "text"}

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 인증(Authorization: Nostr <event>)

🔜 계획됨

다음

NIP-42 릴레이 AUTH(웹소켓)

🔜 계획됨

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바이트 마스터 시크릿을 생성합니다.

  • 서비스별 ID: linkingPriv = HMAC-SHA256(master, serviceDomain). 동일 도메인 → 동일 npub; 다른 도메인 → 다른 npub(프라이버시).

  • --single-key는 모든 서비스에서 하나의 ID를 공유합니다.

  • --generate는 마스터 시크릿을 덮어씁니다. --keyfile/--keyout 또는 NOSTR_AUTH_KEYFILE 환경 변수로 경로를 재정의할 수 있습니다.

프로토콜(NIP-07 스타일)

  1. 챌린지 → challenge 및 선택적 relay 태그가 있는 이벤트(기본적으로 kind 22242).

  2. NIP-01 id: sha256(JSON.stringify([0, pubkey, created_at, kind, tags, content])).

  3. 원시 32바이트 id에 BIP-340 schnorr 서명 → 64바이트 hex sig.

  4. 콜백에 POST {"event": {...}}{"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 클라이언트: 저장소를 skills 디렉터리에 넣고 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-agents

  • npm: npm i -g nostr-authnostr-auth nip07 ...

자체 테스트(오프라인, 무료)

npm ci
npm test

로컬 목업 "Sign in with Nostr" 서비스(mock_server.js)는 챌린지 → 서명 → 제출 → 검증 왕복, 재생 공격 거부, 드라이런 안전성, 도메인별 ID 안정성, 휴대용 스킬 번들을 검증합니다.

프로젝트 구조

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 참조. 인증 전용: 이 프로젝트는 자금을 보관하지 않으며, 노트를 게시하지 않으며, 자체적으로 릴레이에 연결하지 않습니다.

A
license - permissive license
-
quality - not tested
-
maintenance - not tested

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

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/dyegolara/nostr-auth-agents'

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