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

@aegis-fluxion/mcp-adapter

v0.7.0

Published

MCP transport adapter over aegis-fluxion encrypted WebSocket tunnels.

Readme

@aegis-fluxion/mcp-adapter

Encrypted MCP transport adapter for the aegis-fluxion ecosystem.

This package provides SecureMCPTransport, a JSON-RPC 2.0 transport that carries MCP-compatible messages over @aegis-fluxion/core encrypted WebSocket tunnels (SecureClient/SecureServer).

Version: 0.7.0


Why this package

  • Replace stdio/SSE transport with encrypted WebSocket tunnels
  • Reuse existing ECDH + AES-256-GCM channel security
  • Bind one server-side transport to one authenticated socket (clientId)
  • Keep MCP message format strict with normalization and guards

Install

npm install @aegis-fluxion/mcp-adapter @aegis-fluxion/core ws

Core API

SecureMCPTransport

new SecureMCPTransport({
  mode: "client",
  client: secureClient,
  channel?: "mcp:jsonrpc",
  connectTimeoutMs?: 10000
});

new SecureMCPTransport({
  mode: "server",
  server: secureServer,
  clientId: "socket-id",
  channel?: "mcp:jsonrpc",
  closeCode?: 1000,
  closeReason?: "Secure MCP transport closed."
});

Lifecycle and messaging methods:

  • start(): Promise<void>
  • send(message: SecureMCPMessage): Promise<void>
  • close(): Promise<void>
  • onmessage?: (message) => void | Promise<void>
  • onerror?: (error) => void | Promise<void>
  • onclose?: () => void | Promise<void>

End-to-end example (client + server transport)

import { SecureClient, SecureServer } from "@aegis-fluxion/core";
import { SecureMCPTransport, type SecureMCPMessage } from "@aegis-fluxion/mcp-adapter";

const secureServer = new SecureServer({ host: "127.0.0.1", port: 9093 });

secureServer.use(async (context, next) => {
  if (context.phase === "connection") {
    const authHeader = context.request.headers.authorization;
    const token = Array.isArray(authHeader) ? authHeader[0] : authHeader;

    if (token !== "Bearer mcp-secure-token") {
      throw new Error("Unauthorized MCP client");
    }
  }

  await next();
});

secureServer.on("connection", async (client) => {
  const serverTransport = new SecureMCPTransport({
    mode: "server",
    server: secureServer,
    clientId: client.id
  });

  serverTransport.onmessage = async (message: SecureMCPMessage) => {
    // Bridge into your MCP server runtime here.
    console.log("Incoming MCP message on server", message);
  };

  await serverTransport.start();
});

const secureClient = new SecureClient("ws://127.0.0.1:9093", {
  wsOptions: {
    headers: {
      authorization: "Bearer mcp-secure-token"
    }
  }
});

const clientTransport = new SecureMCPTransport({
  mode: "client",
  client: secureClient
});

clientTransport.onmessage = async (message: SecureMCPMessage) => {
  console.log("Incoming MCP message on client", message);
};

await clientTransport.start();

await clientTransport.send({
  jsonrpc: "2.0",
  id: 1,
  method: "tools/list",
  params: {}
});

Message helpers

The package exports guards and normalization helpers to harden integration points:

  • normalizeSecureMCPMessage(candidate)
  • isSecureMCPRequest(message)
  • isSecureMCPNotification(message)
  • isSecureMCPResponse(message)

Security notes

  • MCP message payloads are transported through the same encrypted channel as application events.
  • Handshake and key lifecycle are managed by @aegis-fluxion/core.
  • Server transport mode routes messages to a specific socket by clientId, reducing accidental cross-session fanout.

License

MIT