Shutter MCP 是一个模型上下文协议(MCP)服务器,它借助 Shutter 网络提供时间锁加密功能。该服务器允许用户加密消息,这些消息只能在指定的未来时间之后才能被解密,从而实现无需信任的延时通信。
ALPHA 软件:这是使用 Shutter 网络测试网(Gnosis Chiado)部署的实验性软件。请勿将其用于生产环境或处理敏感数据。加密实现仅用于演示目的。
当前限制:
https://shutter-mcp-b76e270d48c5.herokuapp.com/mcp
。ms-vscode.vscode-mcp
。{
"mcp.servers": {
"shutter-timelock": {
"url": "https://shutter-mcp-b76e270d48c5.herokuapp.com/mcp",
"name": "Shutter Timelock Encryption"
}
}
}
如果你想在本地运行服务器进行开发:
git clone
cd shutter-mcp-server
./scripts/deploy.sh
./scripts/start.sh
服务器将在 http://localhost:5002
可用,MCP 端点为 http://localhost:5002/mcp
。
对于本地开发,将配置更新为使用:
http://localhost:5002/mcp
http://localhost:5002/mcp
# 使用 Docker Compose 构建并运行
docker-compose up -d
# 或者手动构建并运行
docker build -t shutter-mcp-server .
docker run -p 5002:5002 shutter-mcp-server
# 以 Claude Web 测试命令为例
Encrypt this message to unlock in 1 hour: Secret meeting at 3pm
Check decryption status for identity: 0x1234...
Explain how timelock encryption works
# 在 VS Code 中使用 MCP 工具进行时间锁加密测试
# 使用命令面板调用 MCP 工具
# 测试带有未来时间戳的时间锁加密
# 验证健康端点响应
使用 Shutter 网络对消息进行时间锁加密。
参数:
message
(字符串):要加密的文本消息。unlock_time
(字符串):消息可以解密的时间。
示例:
timelock_encrypt("Secret auction bid: $50,000", "2024-12-31 23:59:59")
检查时间锁加密的消息是否可以解密。
参数:
identity
(字符串):timelock_encrypt
返回的标识。如果时间锁已过期,则解密时间锁加密的消息。
参数:
identity
(字符串):timelock_encrypt
返回的标识。encrypted_data
(字符串):timelock_encrypt
返回的加密数据。将时间表达式转换为 Unix 时间戳。
参数:
time_expression
(字符串):要转换的时间(默认:“now”)。获取时间锁加密及其用法的全面解释。
时间锁加密允许你加密一条消息,该消息只能在特定时间之后才能解密。Shutter 网络使用:
PORT
:服务器端口(默认:5002)。SHUTTER_API_BASE
:Shutter API 端点(默认:Chiado 测试网)。SHUTTER_REGISTRY_ADDRESS
:注册表合约地址。编辑 src/server.py
以修改:
运行示例脚本以测试功能:
python examples/usage_example.py
健康检查端点:
curl https://shutter-mcp-b76e270d48c5.herokuapp.com/health
本地测试:
curl http://localhost:5002/health
shutter-mcp-server/
├── src/
│ └── server.py # 主服务器实现
├── scripts/
│ ├── deploy.sh # 部署脚本
│ └── start.sh # 启动脚本
├── examples/
│ └── usage_example.py # 使用示例
├── docs/
│ └── API.md # API 文档
├── requirements.txt # Python 依赖项
├── Dockerfile # Docker 配置
├── docker-compose.yml # Docker Compose 配置
├── Procfile # Heroku 进程配置
├── deploy-heroku.ps1 # PowerShell 部署脚本
└── README.md # 本文件
重要提示:这是具有重大限制的 alpha 软件:
用于生产环境时:
pip install -r requirements.txt
。lsof -i :5002
(Linux/Mac)或 netstat -an | findstr :5002
(Windows)。curl https://shutter-mcp-b76e270d48c5.herokuapp.com/mcp
。http://localhost:5002/mcp
。@mcp.tool()
装饰器定义工具函数。编辑 ShutterTimelock
类中的 parse_time_expression
方法以支持其他时间格式。
本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。
docs/
目录。examples/
目录。版本:2.1.0
最后更新:2025 年 8 月
兼容性:Claude Web、VS Code MCP、MCP 协议 2024 - 11 - 05