OTP MCP服务器
  ](https://badge.fury.io/py/otp-mcp-server)   
提供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 | 日志记录级别 |
