OTP生成服务器

一个基于Model Context Protocol (MCP)的服务器,提供安全的一次性密码(OTP)生成功能,支持TOTP(基于时间)和HOTP(基于HMAC)算法,并提供多种传输选项以便与AI助手和应用程序无缝集成。

  • by andreax79
  • Python
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 andreax79/otp-mcp

使用说明

OTP MCP服务器

提供OTP(一次性密码)生成的模型上下文协议(MCP)服务器

基于FastMCP构建的模型上下文协议(MCP)服务器 提供安全的OTP(一次性密码)生成。 支持TOTP(基于时间)和HOTP(基于HMAC)算法 以及多种传输选项,包括stdio、SSE和HTTP流 与人工智能助手和应用程序无缝集成。

快速开始

安装

# Use uvx for isolated execution
uvx otp-mcp-server

# Or install from PyPI
pip install otp-mcp-server

基本用法

# Run with STDIO (default, for Claude Desktop)
otp-mcp-server

# Run with HTTP Stream transport
otp-mcp-server --http-stream --host 127.0.0.1 --port 8000

# Run with SSE transport
otp-mcp-server --sse --host 127.0.0.1 --port 8000

与Claude Desktop一起使用

添加到您的Claude Desktop配置中:

{
  "mcpServers": {
    "otp": {
      "command": "uvx",
      "args": ["otp-mcp-server"]
    }
  }
}

配置

您可以使用命令行参数或环境变量配置服务器。

环境变量 描述
OTP_MCP_SERVER_DB 令牌数据库文件的路径
OTP_MCP_SERVER_HOST 将服务器绑定到的主机
OTP_MCP_SERVER_PORT 将服务器绑定到的端口
OTP_MCP_SERVER_TRANSPORT 要使用的传输协议
OTP_MCP_SERVER_PATH HTTP传输路径
OTP_MCP_SERVER_LOG_LEVEL 日志记录级别