Morpho API MCP Server

Morpho API MCP Server

site icon
2025.01.28 0
JavaScript金融市场数据投资分析风险管理金融服务
Morpho API MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,专门用于查询 Morpho 的 GraphQL API。该服务使 Claude 能够与 Morpho 的 API 交互,获取市场数据、保险库、头寸等信息。
View on GitHub

Overview

基本能力

产品定位

Morpho API MCP Server 是一个金融服务工具,专注于提供对 Morpho 平台的金融市场数据的访问和查询能力。

核心功能

  • 通过 GraphQL 查询 Morpho 市场数据
  • 支持保险库、头寸和交易的完整查询
  • 提供历史 APY 数据和预言机信息
  • 全面的分页、排序和过滤选项
  • 使用 Zod 模式进行数据验证
  • 错误处理和类型安全
  • 符合 MCP 标准的服务器实现

适用场景

  • 金融市场数据分析
  • 投资组合管理
  • 风险管理
  • 历史数据回溯
  • 智能合约开发

工具列表

Markets

  • get_markets: 检索所有市场数据,支持分页和过滤
  • get_whitelisted_markets: 获取白名单市场
  • get_market_positions: 获取特定市场的头寸
  • get_historical_apy: 获取历史 APY 数据
  • get_oracle_details: 获取预言机信息

Vaults

  • get_vaults: 获取所有保险库及其当前状态
  • get_vault_positions: 获取特定保险库的头寸
  • get_vault_transactions: 获取保险库交易历史
  • get_vault_allocation: 获取保险库市场分配
  • get_vault_reallocates: 获取保险库重新分配历史
  • get_vault_apy_history: 获取保险库的历史 APY 数据

Assets and Accounts

  • get_asset_price: 获取当前价格和收益信息
  • get_account_overview: 获取账户头寸和交易
  • get_liquidations: 获取清算事件

常见问题解答

  • 项目使用 TypeScript 编写
  • 使用 @modelcontextprotocol/sdk 实现 MCP 服务器
  • 使用 axios 进行 API 请求
  • 使用 zod 进行模式验证

使用教程

使用依赖

  1. 确保已安装 Node.js 和 npm

安装教程

  1. 安装包:
npm install mcp-morpho-server
  1. 添加到 Claude Desktop 配置:
{
  "tools": {
    "morpho": {
      "command": "node",
      "args": [
        "/path/to/node_modules/mcp-morpho-server/build/index.js"
      ]
    }
  }
}

调试方式

  1. 克隆仓库:
git clone https://github.com/crazyrabbitLTC/mcp-morpho-server.git
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build

许可证

该项目遵循 ISC 开源许可条款。