nansen-alerts-webhook-listener
FreeNo executable scriptsNot checkedSet up a local webhook server to receive Nansen smart alerts in real-time with HMAC signature verification and public tunneling. Use when a user wants to…
About this skill
Authentication
Nansen account API calls accept a selected nansen:api browser session or conventional API key with the same permissions. NANSEN_API_KEY takes precedence; optional primaryEnv preserves configured-key injection. Run nansen auth status for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is enabled in production within the documented platform scope.
Alert Webhook Listener
Set up a local HTTP server to receive Nansen smart alert webhook payloads in real-time.
How It Works
Nansen smart alerts support a webhook channel type. When an alert fires, Nansen sends an HTTP POST with a JSON payload to your webhook URL. This skill sets up:
- A local HTTP server (Node.js, zero external dependencies) that receives and displays alert payloads
- HMAC-SHA256 signature verification so only authentic Nansen payloads are accepted
- A public tunnel so Nansen's servers can reach your local machine
This skill does NOT create or modify alerts. It sets up the listener infrastructure and then provides a summary of what the user needs to do to start receiving alerts.
OpenClaw users: If OpenClaw is running locally on the same machine, the webhook server can forward verified alert payloads to OpenClaw's Gateway (/hooks/agent), triggering an agent turn for each alert. Set the OPENCLAW_GATEWAY_URL env var to enable this. See the OpenClaw Integration section below.
Security Warning
Before proceeding, inform the user:
This skill starts an HTTP server on your machine and exposes it to the internet via a tunnel (ngrok or localtunnel). While the server only binds to localhost (
127.0.0.1) — meaning no one on your local network can access it directly — the tunnel creates a public URL that anyone on the internet can send requests to.Mitigations in place:
- HMAC-SHA256 signature verification rejects all requests not signed by Nansen
- 1 MB body size limit prevents memory abuse
- Only
POST /webhookandGET /healthare accepted; everything else returns 404You should be aware that:
- The tunnel URL is publicly discoverable (ngrok URLs can be enumerated)
- Unsigned requests still reach your machine — they're rejected, but the connection is made
- Stop the tunnel when you're done to close the public endpoint
Wait for the user to confirm they want to proceed before continuing.
Execution Plan
Follow these steps in order. Do not skip signature verification — it is mandatory.
Step 0: Choose a tunnel provider
Before starting, ask the user which tunnel provider they want to use:
| ngrok (recommended) | localtunnel | |
|---|---|---|
| Stability | Stable — persistent connections with keepalive | Flaky — free relay drops idle connections without warning, tunnels die randomly |
| Install | brew install ngrok + free account at ngrok.com |
Zero install (npx localtunnel) |
| HTTPS | Yes | Yes |
| Auth required | Yes (free authtoken from ngrok.com) | No |
Recommend ngrok. localtunnel is convenient but unreliable — in testing, tunnels silently exit after minutes, causing alerts to fail with "503 Tunnel Unavailable". ngrok maintains stable connections.
Check if ngrok is available:
which ngrok && ngrok version
If not installed, tell the user:
brew install ngrok(or download from ngrok.com)- Create a free account at ngrok.com and copy the authtoken
ngrok config add-authtoken <token>
If the user prefers localtunnel or can't install ngrok, proceed with localtunnel but warn them that the tunnel may drop and they'll need to restart it and update their alert's webhook URL.
Step 1: Generate a webhook secret
Write the secret straight to a file that only the user can read, so it never appears in the terminal, the shell history or the transcript:
(umask 077 && node -e "process.stdout.write(require('crypto').randomBytes(32).toString('hex'))" > nansen-webhook-secret.txt)
The server and the alert both read it from this file (WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" for the server, --webhook-secret-stdin < nansen-webhook-secret.txt for nansen alerts). Never log, echo or paste the secret.
Step 2: Write the webhook receiver script
Create nansen-webhook-server.mjs in the current working directory. Use only Node.js built-in modules (node:http, node:crypto). No npm install required.
Requirements — do not deviate:
| Requirement | Detail |
|---|---|
| Bind addr |
Install nansen-alerts-webhook-listener in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
Bash(nansen:*)Bash(node:*)Bash(npx:*)Bash(ngrok:*)WriteFAQ
What does the nansen-alerts-webhook-listener skill do?
Set up a local webhook server to receive Nansen smart alerts in real-time with HMAC signature verification and public tunneling. Use when a user wants to listen for alerts on their local machine.
How do I install the nansen-alerts-webhook-listener skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the nansen-alerts-webhook-listener skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic