npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kasanovaio/kasia-mcp

v0.1.5

Published

MCP server for Kasia encrypted messaging on Kaspa

Downloads

14

Readme

Kasia MCP

MCP server for Kasia encrypted peer-to-peer messaging on the Kaspa blockDAG.

About Kasia

Kasia is an encrypted messaging protocol built on Kaspa. Messages are stored on-chain as transaction payloads, encrypted with ChaCha20-Poly1305 using ECDH key exchange on secp256k1. All cryptography happens client-side — the protocol is fully trustless.

Key Properties:

  • End-to-end encrypted — ChaCha20-Poly1305 AEAD with ephemeral keys
  • On-chain — messages are Kaspa transaction payloads, immutable once confirmed
  • Trustless — no central server, no account registration
  • Pseudonymous — conversations are identified by deterministic aliases derived from shared secrets

Installation

npm install
npm run build

Configuration

Kasia MCP reuses the same wallet configuration as kaspa-mcp:

| Variable | Required | Description | |----------|----------|-------------| | KASPA_MNEMONIC | Yes* | BIP39 mnemonic phrase | | KASPA_PRIVATE_KEY | Yes* | Hex-encoded private key (alternative to mnemonic) | | KASPA_NETWORK | No | Must be mainnet (Kasia operates on mainnet only) | | KASPA_ACCOUNT_INDEX | No | BIP44 account index. Defaults to 0 | | KASIA_INDEXER_URL | No | Custom indexer URL. Defaults to https://indexer.kasia.fyi |

*Either KASPA_MNEMONIC or KASPA_PRIVATE_KEY must be set.

Usage with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "kasia": {
      "command": "node",
      "args": ["/path/to/kasia-mcp/dist/index.js"],
      "env": {
        "KASPA_MNEMONIC": "your mnemonic phrase here",
        "KASPA_NETWORK": "mainnet"
      }
    }
  }
}

Important: Both kaspa-mcp and kasia-mcp must be configured. Kasia generates encrypted payloads, but relies on kaspa-mcp's send_kaspa tool to broadcast them.

Tools

Write Tools

kasia_send_handshake

Start an encrypted conversation with a Kaspa address.

Parameters:

  • address: Recipient Kaspa address

Returns: Transaction payload to broadcast via send_kaspa.

kasia_accept_handshake

Accept an incoming handshake request.

Parameters:

  • address: Address of the person who sent the handshake

Returns: Transaction payload to broadcast via send_kaspa.

kasia_send_message

Send an encrypted message in an active conversation.

Parameters:

  • address: Contact's Kaspa address
  • message: Plaintext message to encrypt and send

Returns: Transaction payload to broadcast via send_kaspa.

kasia_write_self_stash

Store encrypted data on-chain for yourself.

Parameters:

  • data: Data to encrypt and store
  • scope: Category for the stash entry (e.g., "notes", "saved_handshake")

Returns: Transaction payload to broadcast via send_kaspa.

Read Tools

kasia_get_conversations

List all conversations with their status.

Returns: Array of conversations with status (pending_outgoing, pending_incoming, active), aliases, and last activity timestamp.

kasia_get_requests

List pending incoming handshake requests that need to be accepted.

Returns: Array of pending requests with sender address and transaction details.

kasia_get_messages

Read decrypted messages in a conversation.

Parameters:

  • address: Contact's Kaspa address

Returns: Array of decrypted messages sorted by timestamp, with from, fromMe, message, timestamp, and confirmed fields.

kasia_read_self_stash

Read your encrypted self-stash entries by scope.

Parameters:

  • scope: Category to read

Returns: Array of decrypted stash entries.

Protocol

Conversation Flow

  1. Handshake — Alice sends a handshake to Bob's address containing an ECDH key exchange payload
  2. Accept — Bob accepts by sending a response handshake back
  3. Message — Either party can now send encrypted messages

Payload Encoding

| Type | On-chain format | Encoding | |------|----------------|----------| | Handshake | ciph_msg:1:handshake:<encrypted_hex> | Fully hex-encoded | | Message | ciph_msg:1:comm:<alias>:<base64_data> | UTF-8 then hex-encoded | | Self-stash | ciph_msg:1:self_stash:<scope>:<encrypted_hex> | Fully hex-encoded |

Alias Derivation

Conversation aliases are 12-character hex strings (6 bytes) derived via ECDH + HKDF-SHA256 with asymmetric context pubkeys. Each party derives a unique alias pair — myAlias and theirAlias — ensuring both sides can identify message direction.

Architecture

┌─────────────┐    payload    ┌─────────────┐    broadcast    ┌────────────┐
│  kasia-mcp  │ ───────────→ │  kaspa-mcp  │ ─────────────→ │   Kaspa    │
│  (encrypt)  │              │  (send_kaspa)│               │  Network   │
└─────────────┘              └─────────────┘               └─────┬──────┘
       ↑                                                         │
       │ HTTP GET                                                │ indexes
       │                                                         ↓
       └──────────────────────────────── ┌──────────────────────────┐
                                         │  Kasia Indexer           │
                                         │  indexer.kasia.fyi       │
                                         └──────────────────────────┘
  • Write path: kasia-mcp generates encrypted payloads → kaspa-mcp broadcasts as transaction payloads
  • Read path: kasia-mcp queries the Kasia indexer HTTP API → decrypts locally

Security

  • All encryption/decryption happens locally — private keys never leave the process
  • Messages use ephemeral ECDH keys — forward secrecy per message
  • ChaCha20-Poly1305 AEAD provides authenticated encryption
  • Error messages are sanitized to prevent secret leakage

Testing

npm test                # Run tests
npm run test:coverage   # Run with coverage

Dependencies

License

ISC