Skip to main content
Glama
jspassgen-mcp

jspassgen-mcp

Official

Contents

Getting started

The jspassgen ecosystem

Library reference

Operational


Related MCP server: password-mcp

Install

As a JavaScript library

jspassgen-mcp is an MCP server, not a library for applications. Programs that need passwords should depend on @sebastienrousseau/jspassgen directly.

As an MCP server

Install the jspassgen-mcp command globally, or let your MCP client start it with npx (see the Quick Start):

npm install -g @sebastienrousseau/jspassgen-mcp

Run the server from a checkout:

git clone https://github.com/sebastienrousseau/jspassgen-mcp.git
cd jspassgen-mcp
npm ci

Requirements

  • Node.js 22 or newer (engines in package.json, enforced by .npmrc).

  • Any platform Node.js supports. Randomness comes from Node.js crypto through jspassgen's NodeCryptoRandom adapter.

  • An MCP client that can start a local server over stdio.

  • No network access at run time.

Component

Minimum toolchain

Enforcement

jspassgen-mcp

Node.js 22

engines with engine-strict; CI tests Node.js 22 and 24


Quick Start

{
  "mcpServers": {
    "jspassgen": {
      "command": "npx",
      "args": ["-y", "@sebastienrousseau/jspassgen-mcp"]
    }
  }
}

Add this entry to your MCP client's server configuration. The client starts the server as a child process and talks to it over stdin and stdout; ask it for a password and it calls generate_password. From a checkout, set "command" to "node" and "args" to the absolute path of bin/jspassgen-mcp.js. To try the server without a client, run node examples/generate-password.mjs 24 in a checkout.


The jspassgen ecosystem

jspassgen is one core library and the tools, SDKs and site around it. Every member is listed in docs/ecosystem.json and, from the suite's first lockstep release, every member ships the same version (ADR 0001). The JavaScript tools depend on the core and add no generation logic of their own; each SDK is a native port that is checked against the core's conformance kit as its generators land.

Component

Purpose

Use case

jspassgen

Password and passphrase core, Node.js library, CLI, web UI and workers; source of the conformance kit

Programs that generate secrets

jspassgen-cli

Command-line generator built on the core

Passwords in a terminal or a script

jspassgen-mcp

Local stdio MCP server

AI agents that need a generated secret

jspassgen-lsp

Language server for weak literal secrets

Editors checking configuration and .env files

jspassgen-sdk-python

Native port on the secrets module

Python programs

jspassgen-sdk-rust

Native port on the OS CSPRNG

Rust programs

jspassgen-sdk-java

Native port on SecureRandom

JVM programs

jspassgen-sdk-dotnet

Native port on RandomNumberGenerator

.NET programs

jspassgen-sdk-cpp

Native C++17 port on the OS CSPRNG

C++ programs

jspassgen.github.io

Source of jspassgen.com

Evaluating the suite

Every member ships at 0.0.24, the suite's third lockstep release: the core, CLI, MCP and LSP servers on npm, the Python, Rust, Java and .NET SDKs on PyPI, crates.io, Maven Central and NuGet, and the C++ SDK and the site as GitHub releases. The table gives each member's purpose, and each README's Capabilities at a glance says what works today.


Capabilities at a glance

Area

Capability

Status

Tools

generate_password: a base64-alphabet password of 1 to 1024 characters

Available

Tools

Entropy estimate of the generated password

Available, returned with each password

Tools

Passphrase generation

Not available yet

Tools

Entropy estimate for a configuration

Not available yet

Tools

Strength analysis of an existing password

Not available yet

Transport

stdio, local

Available

Transport

HTTP or any remote transport

Not planned

ADR 0001 plans the passphrase, entropy and strength tools; only generate_password exists so far.


Ecosystem comparison

No comparison is published yet. A comparison with other MCP password servers will be added only with evidence behind each claim. Within the suite, the difference is the interface: this server returns the same strong passwords as @sebastienrousseau/jspassgen, through an MCP tool call instead of a JavaScript import.


Benchmarks

None are published yet, and the repository has no benchmark command. Generation time is jspassgen's; this server adds one MCP round trip over stdio.


Features

  • One tool, generate_password. Its only input is length, an optional integer from 1 to 1024; jspassgen's default of 16 applies when it is omitted.

  • The bounds are read from jspassgen's PASSWORD_TYPE_METADATA, so they cannot drift from the core, and are advertised in the tool's JSON Schema.

  • The output is the password as text, and structured content with password, length, entropyBits and securityLevel as jspassgen computes them.

  • Every password comes from @sebastienrousseau/jspassgen 0.0.24 (pinned exactly in package.json), type strong, drawn from Node.js crypto. The server has no generation logic of its own.

  • Invalid input is refused, not corrected: a non-integer, a string, null, zero, a negative or an over-limit length returns a tool error naming length.

  • Tool annotations tell clients the tool is read-only, non-destructive and closed-world.

  • src/index.js exports createServer, TOOL_NAME, LENGTH_LIMITS, PASSWORD_TYPE and createGeneratePasswordHandler, so the server can be connected to another MCP transport.


Configuration

There is nothing to configure yet: no environment variables, flags or files. The server reads nothing and writes nothing outside the MCP messages on stdin and stdout. The length argument of each call is the only option.


Examples

Example

What it shows

Run

examples/generate-password.mjs

An MCP client that starts the server over stdio, lists its tools and calls generate_password

node examples/generate-password.mjs [length]

make examples runs it, and CI runs it on Node.js 22 and 24.


When not to use jspassgen-mcp

  • Use a password manager if you need to store, sync or fill passwords. This server only generates them.

  • Use another server if you need a remote or shared one. This one speaks stdio only, to the one client that started it, and has no HTTP transport.

  • Wait for a later release if you need passphrases, entropy estimates for a configuration or strength analysis today. Only generate_password exists so far.

  • Generate locally with jspassgen if the password must not enter the AI conversation. The MCP client shows the result to the model and may keep it in the conversation history; that is inherent to calling a tool.


Development

mise install     # Node.js 24 (mise.toml)
make install     # npm ci
make check       # ESLint, Prettier, Halstead, tests at 100% coverage, the example, the README check
make audit       # npm audit
make pack        # list what npm would publish
make demo        # render .github/demo.gif with vhs

CI runs ESLint (cyclomatic 10, cognitive 15, 60 lines per function, 500 per file), Prettier, Halstead difficulty 30, npm audit, the tests at 100% statements, branches, functions and lines on Node.js 22 and 24, the example over stdio, the npm tarball listing, markdownlint, codespell, REUSE, link checks, CodeQL, DCO and OpenSSF Scorecard. DEVELOPMENT.md maps every CI gate to its local command; CONTRIBUTING.md sets the rules for a change.


Security

Report vulnerabilities privately according to SECURITY.md.

The server is local only: stdio transport, no listening socket, no network call and no telemetry. It writes the MCP protocol to stdout and nothing to stderr, and test/stdio.test.js fails if anything else appears on either. A generated password goes to the calling client only. Randomness comes from Node.js crypto through jspassgen; the server adds none of its own. Dependencies are locked in package-lock.json, with the runtime ones pinned exactly. npm audit, CodeQL, OpenSSF Scorecard and Dependabot run on the repository, and every workflow action is pinned by commit SHA.


Documentation

There is no rendered manual yet; this README and the files below are the reference.


Stability guarantees

  • Versions are 0.0.x and move by exactly 0.0.1, in lockstep with the jspassgen suite.

  • Before 1.0 any release may break; CHANGELOG.md calls out each breaking change.

  • A change to a tool's name, input schema or output fields is a breaking change, even when no JavaScript API moves.

  • The Node.js floor is 22, enforced by engines and tested in CI. Raising it is a breaking change, made only in a release whose changelog states the new floor and the reason.


License

Licensed under either Apache License 2.0 or MIT, at your option.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Generates secure random passwords and memorable passphrases with customizable options including length, character types, emojis, and automatic strength evaluation using zxcvbn scoring.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Generates strong passwords and evaluates password strength using zxcvbn, with uniform random sampling via Node's crypto.
      2
      8 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables to generate cryptographically-random passwords and PINs with control over character sets and length. Returns the password(s) and their entropy in bits.
      61 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to analyze a password's strength entirely offline — character-set entropy, a strength rating, estimated crack times for offline and throttled online attackers, and specific weaknesses like short length, missing character classes, sequences, repeats, or common-password matches. The password is never transmitted or stored, as the heuristic analysis runs in-process.
      62 npm
      MIT