Back to MCP directory
publicPublicdnsLocal runtime

agentek

Agentek是一个可扩展的TypeScript工具包,旨在简化EVM区块链的复杂交互,提供统一的类型安全接口,支持多链操作和AI集成。

article

README

🚀 Agentek 代理工具包

Agentek 是一个可扩展的 TypeScript 工具包,它将复杂的 EVM 区块链交互简化为强大的意图驱动工具。提供统一且类型安全的接口,支持链上操作和链下数据服务,让开发者能跨多个 EVM 网络执行任何区块链操作。

有兴趣贡献?查看我们的CONTRIBUTING.md指南!

🚀 快速开始

包结构

Agentek 工具包作为一个单代码库仓库(monorepo)构建,包含多个可发布的包:

  • @agentek/tools - 主要包,包含所有工具
  • @agentek/ai-sdk - 集成 AI SDK 的 Vercel AI SDK
  • @agentek/mcp-server - 模型上下文协议(Model Context Protocol)服务器

需求

  • Node.js >= 18.0.0
  • npm、yarn 或 pnpm

安装

要安装整个工具包:

npm install @agentek/tools

要安装 AI SDK:

npm install @agentek/ai-sdk

要安装 MCP 服务器:

npm install @agentek/mcp-server

💻 使用示例

基础用法

使用整个工具包

const { Agentek } = require('@agentek/tools');

// 创建代理实例
const agentek = new Agentek();

// 执行解析ENS操作
agentek.resolveENS('your-ens-name.eth').then(console.log);

使用 AI SDK

const { PerplexitySearch } = require('@agentek/ai-sdk');

// 初始化 perplexity 搜索
const perplexity = new PerplexitySearch();

// 执行搜索查询
perplexity.search('what is blockchain').then(console.log);

使用 MCP 服务器

const { McpServer } = require('@agentek/mcp-server');

// 创建 MCP 服务器实例
const mcpServer = new McpServer(3000);

// 启动服务器
mcpServer.start().then(() => console.log('MCP 服务器已启动'));

📚 详细文档

工具列表

  1. resolveENS - 解析 ENS 名称
  2. checkMaliciousAddress - 检查恶意地址
  3. getAaveUserData - 获取 AAVE 用户数据
  4. intentAaveDeposit - 执行 AAVE 存款操作
  5. intentAaveWithdraw - 执行 AAVE 提款操作
  6. intentAaveBorrow - 执行 AAVE 借贷操作
  7. intentAaveRepay - 执行 AAVE 还款操作
  8. scrapeWebContent - 网页内容抓取
  9. getFearAndGreedIndex - 获取市场恐慌与贪婪指数
  10. getSlowStatus - 获取 Slow 服务状态
  11. predictTransferId - 预测转移 ID
  12. canUnlockSlow - 检查是否可以解锁 Slow 转移
  13. getCanReverseSlowTransfer - 获取是否可以逆转 Slow 转移
  14. getSlowGuardianInfo - 获取 Slow 保护信息
  15. getSlowTransferApprovalRequired - 获取是否需要批准 Slow 转移
  16. intentDepositToSlow - 执行向 Slow 存款操作
  17. intentSetSlowGuardian - 设置 Slow 保护人
  18. intentWithdrawFromSlow - 执行从 Slow 提款操作
  19. intentApproveSlowTransfer - 批准 Slow 转移
  20. intentUnlockSlow - 解锁 Slow 转移
  21. intentReverseSlowTransfer - 逆转 Slow 转移
  22. getNFTMetadata - 获取 NFT 元数据
  23. getCryptoPrice - 获取加密货币价格
  24. estimateGasCost - 估算汽油费成本
  25. getTokenChart - 获取代币图表信息
  26. getYieldTool - 获取收益工具
  27. compareYieldTool - 比较收益工具
  28. getYieldHistoryTool - 获取收益历史工具
  29. compareYieldHistoryTool - 比较收益历史工具
  30. think - 执行思考操作
  31. askPerplexitySearch - 通过 Perplexity 进行搜索
  32. intent0xSwap - 执行 0x 交换操作
  33. tallyProposals - 统计提案信息
  34. tallyChains - 统计链信息
  35. tallyUserDaos - 统计用户 DAO 信息
  36. intentGovernorVote - 执行治理投票操作
  37. intentGovernorVoteWithReason - 带原因的治理投票操作
  38. getLatestCoindeskNewsTool - 获取最新的 Coindesk 新闻
  39. getMarketEvents - 获取市场事件

以上为 Agentek 工具包的所有功能列表,涵盖区块链、DeFi、NFT 和 AI 等多个领域。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client