API & MCP
Everything a person can do on Password & Passphrase Generator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://passwordgenerator.usefulweb.site/api/v1/calculate– run Password & Passphrase GeneratorGET https://passwordgenerator.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Password & Passphrase Generator
Generates random passwords (length, character sets, no look-alike characters, at least one of each class) or passphrases from a 2048-word list with separators and capitalisation. Shows the exact entropy in bits and how long guessing would take.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (password, passphrase) | "password" | Type |
length | integer | 20 | Password length. Random password only. 16+ characters are recommended; 20+ for important accounts. |
charsets | multiselect (lower, upper, digits, symbols) | ["lower","upper","digits","symbols"] | Character sets |
excludeAmbiguous | boolean | false | Avoid look-alike characters (I l 1 O 0 o | ` ' ") |
requireEach | boolean | true | Include at least one character from each selected set |
words | integer | 6 | Number of words. Passphrase only. Each word adds 11 bits of entropy. |
separator | select (hyphen, space, period, underscore, none) | "hyphen" | Word separator |
capitalization | select (lower, title, upper, random) | "lower" | Capitalisation |
includeNumber | boolean | false | Append a random digit to one random word |
count | integer | 5 | How many |
seed | text | — | Demo seed (optional, makes output reproducible — never for real passwords). Leave empty for real use. With a seed, anyone who knows it can regenerate the same passwords. |
Example request
5 passwords, 20 characters, all sets (demo seed)
curl -X POST https://passwordgenerator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"password","length":20,"count":5,"seed":"demo"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://passwordgenerator.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
password_generator - Local stdio connector:
node src/mcp-stdio.ts --tool=password-generator
{
"mcpServers": {
"password-generator": { "type": "http", "url": "https://passwordgenerator.usefulweb.site/mcp" }
}
}