Aggloyer MCP服务器
这是一个用于与Aggloyer跨链结算层交互的模型上下文协议(MCP)服务器。Aggloyer是一个跨链结算层,连接任何区块链的流动性和用户,以实现快速、低成本的互操作性和增长。
特性
此MCP服务器提供以下工具:
- 获取有关支持的区块链网络的信息
- 检查跨链的代币余额
- 执行跨链传输
- 获取流动性信息
安装
# Clone the repository
git clone
cd agglayer-mcp-server
# Install dependencies
npm install
# Build the project
npm run build配置
可以使用环境变量配置服务器:
AGGLAYER_API_KEY:您的Aggreyer API密钥(开发时默认为“demo_key”)
用法
启动服务器
npm startMCP集成
要将此服务器与Claude或其他MCP兼容系统一起使用,请将其添加到MCP设置配置文件中:
{
"mcpServers": {
"agglayer": {
"command": "node",
"args": ["/path/to/agglayer-mcp-server/build/index.js"],
"env": {
"AGGLAYER_API_KEY": "your-api-key"
},
"disabled": false,
"autoApprove": []
}
}
}可用工具
get_chain_info
获取有关支持的区块链网络的信息。
{
"chain": "ethereum" // Optional, returns all chains if not specified
}get_token_balance
获取特定链上地址的令牌余额。
{
"chain": "ethereum",
"address": "0x...",
"token": "USDC" // Optional, returns all token balances if not specified
}跨海转运
执行跨链令牌转移。
{
"sourceChain": "ethereum",
"destinationChain": "polygon",
"token": "USDC",
"amount": "100.0",
"fromAddress": "0x...",
"toAddress": "0x..."
}获取查询信息
获取跨链的流动性信息。
{
"chain": "ethereum", // Optional, returns all chains if not specified
"token": "USDC" // Optional, returns all tokens if not specified
}可用资源
agglayer://chains:所有支持的区块链网络列表agglayer://tokens:所有支持的令牌列表agglayer://chains/{chainId}:关于特定区块链网络的信息agglayer://tokens/{tokenSymbol}:有关特定令牌的信息
发展
# Run in development mode with auto-reloading
npm run dev许可证
国际协调委员会

