______________________________________________________________________
将ARC-56智能合约转换为MCP服务器,以实现AI代理集成。
免责声明:这是一个实验性的概念验证工具。它不是用于生产用途的,可能包含错误或不完整的功能。
特性
- 🔄 将ARC-56规范转换为MCP服务器
- 🛡️ 基于环境的安全配置
- 🎯 调用类型筛选(只读/只写/两者都有)
- 🧪 安全测试模拟模式
- ⚡ AlgoKit Utils集成
- 📦 基于UV的项目生成
安装
pipx install arcontextify
# or
uv tool install arcontextify用法
# Generate MCP server
arcontextify contract.arc56.json
# Readonly calls only (no private key needed)
arcontextify contract.arc56.json --call-types readonly
# Write calls only
arcontextify contract.arc56.json --call-types write-only
# Custom output directory
arcontextify contract.arc56.json --output-dir ./servers生成的服务器
每台服务器包括:
环境变量
export ALGORAND_ALGOD_TOKEN="your-token"
export ALGORAND_ALGOD_SERVER="https://testnet-api.algonode.cloud"
export ALGORAND_APP_ID="123456"
export ALGORAND_DELEGATED_PRIVATE_KEY="your-key" # Not needed for readonlyClaude桌面配置
{
"mcpServers": {
"contract_mcp": {
"command": "uv",
"args": ["run", "python", "-m", "src.contract_mcp"],
"cwd": "/path/to/contract_mcp",
"env": {
"ALGORAND_ALGOD_TOKEN": "your-token",
"ALGORAND_ALGOD_SERVER": "https://testnet-api.algonode.cloud",
"ALGORAND_APP_ID": "123456"
}
}
}
}可用工具
verify_environment_setup()-检查配置get_connection_info()-连接状态get_application_state()-全球状态get_account_local_state(address)-地方州- 具有模拟支持的合同方法
安全
- 基于环境的秘密(没有硬编码密钥)
- 只读操作的虚拟帐户
- 用于安全测试的事务模拟
- 地址验证和输入净化
需求
- Python 3.10+
- UV包管理器
- AlgoKit实用工具2.0+
许可证
麻省理工学院
