GnistAI GnistAI
Log in

Getting Started with Password Generator

Secure password, passphrase, and PIN generator with strength estimation.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Utilities

Data source: Algorithmic (secrets module)

Overview

Password Generator performs computations on your inputs — no external data source required. This tutorial covers all 5 tools with parameter reference and code examples.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-password-generator": {
      "url": "https://context.gnist.ai/mcp/password-generator/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (5)

generate_password

Generate a cryptographically secure random password. Returns the password, its length, character sets used, and entropy in bits.

ParameterTypeRequiredDescription
lengthintegeroptionalPassword length (4-128). (default: 16)
uppercasebooleanoptionalInclude uppercase letters. (default: True)
lowercasebooleanoptionalInclude lowercase letters. (default: True)
digitsbooleanoptionalInclude digits. (default: True)
symbolsbooleanoptionalInclude symbols. (default: True)
exclude_ambiguousbooleanoptionalExclude ambiguous characters (0/O, 1/l/I, etc.). (default: False)
curl -X POST "https://context.gnist.ai/mcp/password-generator/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "generate_password", "arguments": {"length": 16}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/password-generator/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'length': 16}, 'name': 'generate_password'}},
)
print(resp.json())

generate_passphrase

Generate a passphrase from random dictionary words. Returns the passphrase, word count, separator, and entropy in bits.

ParameterTypeRequiredDescription
wordsintegeroptionalNumber of words (2-12). (default: 4)
separatorstringoptionalWord separator character. (default: -)
capitalizebooleanoptionalCapitalize each word. (default: False)
curl -X POST "https://context.gnist.ai/mcp/password-generator/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "generate_passphrase", "arguments": {"words": 4}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/password-generator/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'words': 4}, 'name': 'generate_passphrase'}},
)
print(resp.json())

generate_pin

Generate a cryptographically secure numeric PIN. Returns the PIN, its length, and entropy in bits.

ParameterTypeRequiredDescription
lengthintegeroptionalPIN length (4-12). (default: 6)
curl -X POST "https://context.gnist.ai/mcp/password-generator/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "generate_pin", "arguments": {"length": 6}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/password-generator/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'length': 6}, 'name': 'generate_pin'}},
)
print(resp.json())

check_password_strength

Estimate the strength of a given password. Returns a score (0-4), label (very_weak/weak/fair/strong/very_strong), entropy in bits, and feedback.

ParameterTypeRequiredDescription
passwordstringrequiredPassword to evaluate.
curl -X POST "https://context.gnist.ai/mcp/password-generator/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "check_password_strength", "arguments": {"password": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/password-generator/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'password': 'example'},
            'name': 'check_password_strength'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/password-generator/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/password-generator/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

FAQ

What data does Password Generator provide?

Secure password, passphrase, and PIN generator with strength estimation. It exposes 5 tools: generate_password, generate_passphrase, generate_pin, check_password_strength, report_feedback.

Does this toolkit require external data?

No. It performs computations on your inputs directly. You only need a Gnist API key.

What format does the Password Generator API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials