密码生成器

一个通过MCP协议提供可定制密码生成功能的工具,支持设置密码长度、字符集和大小写。

  • by jadolg
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 jadolg/password-mcp

使用说明

Password Generator MCP Example

This project is a simple example of a password generator tool implemented in Go, using the mcp-golang library. It demonstrates how to register a tool that generates passwords with customizable length, character set, and case.

DISCLAIMER

Passwords will end up in the transcript with the agent making them unsafe by default unless you are using local AI and are able to remove previous conversations! Do NOT use this to generate production passwords unless you are happy with sharing them with your AI provider.

Usage

  1. Install
go install github.com/jadolg/password-mcp@latest
  1. Get the binary path
which password-mcp

Stdio (default)

Configure your MCP client using the binary path from the previous step:

{
  "mcpServers": {
    "password-mcp": {
      "command": "/home/myuser/go/bin/password-mcp",
      "args": [],
      "env": {}
    }
  }
}

HTTP

Start the server with the --http flag:

password-mcp --http

By default it listens on :8080. Use --addr to change the address:

password-mcp --http --addr :9090

Then configure your MCP client:

{
  "mcpServers": {
    "password-mcp": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

Adjust the URL if you used a custom --addr.

Features

  • Generate passwords of any length
  • Choose from different character sets: letters, letters and numbers, or letters, numbers, and symbols
  • Select password case: uppercase, lowercase, or mixed