Skip to main content
Glama

Futarchy MCP Server

未来 MCP

用于与 Solana 上的 Futarchy 协议交互的服务器实现。

设置说明

  1. 克隆存储库:
git clone <repository-url> cd futarchy-mcp
  1. 安装依赖项:
npm install
  1. 配置 RPC URL:
    • 打开src/server.ts
    • 更新连接初始化中的RPC URL:GXP3
    • 您可以使用:
      • 主网: https://api.mainnet-beta.solana.com
      • 开发网: https://api.devnet.solana.com
      • 或者您自己的 RPC 提供程序 URL(仅适用于此)
  2. 启动开发服务器:
npm run dev

可用路线

DAO 路线

  • GET /daos - 获取所有 DAO
  • GET /daos/:id - 通过 ID 获取特定的 DAO
  • GET /daos/:id/proposals - 获取特定 DAO 的所有提案
  • POST /daos/:id/proposals - 为 DAO 创建新提案(目前尚未测试,因为 dao 创建路线不存在)
    • 身体:
      { "descriptionUrl": "string", "baseTokensToLP": "number", "quoteTokensToLP": "number" }

提案路线

  • GET /proposals/:id - 根据 ID 获取特定提案

测试

您可以使用 Postman 或 curl 等工具测试路由。服务器默认在端口 9000 上运行。

curl 命令示例:

# Get all DAOs curl http://localhost:9000/daos # Get a specific DAO curl http://localhost:9000/daos/<dao-address> # Get proposals for a DAO curl http://localhost:9000/daos/<dao-address>/proposals # Create a new proposal curl -X POST http://localhost:9000/daos/<dao-address>/proposals \ -H "Content-Type: application/json" \ -d '{ "descriptionUrl": "https://example.com/proposal", "baseTokensToLP": 1000, "quoteTokensToLP": 1000 }'

光标的 MCP 服务器

该项目还包括一个 MCP(模型上下文协议)服务器,允许 Cursor 通过自定义工具与 Futarchy 后端进行交互。

设置 MCP 服务器

  1. 运行安装脚本来安装依赖项、构建项目并配置 Cursor:
chmod +x setup.sh ./setup.sh
  1. 或者手动配置:
    • 安装依赖项并构建项目:GXP8
    • 打开或创建~/.cursor/mcp.json
    • 添加以下配置(根据需要调整路径):GXP9

在 Cursor 中使用 MCP 服务器

您可以在 Cursor 的聊天中使用以下工具:

  1. getDaos - 从 Futarchy 系统获取所有 DAO
  2. getDao - 根据 ID 获取特定的 DAO
  3. getProposals - 获取特定 DAO 的所有提案
  4. getProposal - 根据 ID 获取特定提案
  5. createProposal - 为 DAO 创建新提案

例如,在 Cursor 的聊天中,你可以说:

Use the getDaos tool to retrieve a list of all DAOs from the futarchy-routes backend.

有关 MCP 服务器的更多详细信息,请参阅src/mcp/README.md

情绪分析功能

Futarchy MCP 服务器现已包含一个情绪分析工具,可以分析来自 Discord 和 Twitter 数据中针对特定提案的情绪。此功能有助于了解社区对提案的情绪,并可用于做出更明智的决策。

工作原理

  1. 情绪分析工具从 Discord 和 Twitter 收集有关特定提案的数据。
  2. 它使用自然语言处理技术分析情绪。
  3. 它将情绪分为不同的类别(代币经济学、协议参数等)。
  4. 它根据分析生成摘要、要点和关注点。
  5. 结果以结构化的格式呈现,前端可以轻松使用。

示例响应

{ "proposalId": "F3hsZzWinRAHbr6CUxdkUFBCH8qNk6Mi9Zfu3PMX49BC", "sentimentScore": -0.8, "primaryCategory": "Tokenomics", "categories": [ { "name": "Tokenomics", "score": 0.4 }, { "name": "Protocol Upgrades", "score": 0.3 }, { "name": "Partnerships Integrations", "score": 0.2 }, { "name": "Protocol Parameters", "score": 0.1 } ], "summary": "The proposal to launch a new Horizon token for the Aave ecosystem has faced significant backlash from the community...", "keyPoints": [ "The proposed token launch is seen as unnecessary and potentially harmful to the Aave token and community.", "The revenue-sharing model is perceived as frontloaded and unfair, favoring early years when adoption and revenue may be low.", "There is a desire to maintain the Aave token as the primary governance and utility token for the ecosystem." ], "concerns": [ "Dilution of the Aave token's value and attention.", "Misalignment of incentives with the proposed revenue-sharing model.", "Creation of a separate entity that could compete with the Aave ecosystem.", "Lack of transparency and community involvement in the decision-making process." ], "sources": { "discord": true, "twitter": true } }

如何使用

您可以按如下方式在 MCP 服务器中使用情绪分析工具:

const result = await mcp_futarchy_routes_getProposalSentiment({ proposalId: "F3hsZzWinRAHbr6CUxdkUFBCH8qNk6Mi9Zfu3PMX49BC" });

这将返回指定提案的情绪分析。

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

一种服务器实现,可以与 Solana 上的 Futarchy 协议进行交互,允许用户通过 API 端点和 Cursor 的聊天界面管理 DAO 和提案。

  1. 设置说明
    1. 可用路线
      1. DAO 路线
      2. 提案路线
    2. 测试
      1. 光标的 MCP 服务器
        1. 设置 MCP 服务器
        2. 在 Cursor 中使用 MCP 服务器
      2. 情绪分析功能
        1. 工作原理
        2. 示例响应
        3. 如何使用

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A server that enables interaction with the Solana blockchain, providing access to over 40 Solana RPC methods including getting balances, transaction details, block information, and sending transactions.
        Last updated -
        Python
        MIT License
        • Apple
      • A
        security
        F
        license
        A
        quality
        A server that provides simple RPC endpoints for common Solana blockchain operations, allowing users to check balances, get account information, and transfer SOL between accounts.
        Last updated -
        5
        TypeScript
      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol server that enables Claude AI to interact with the Solana blockchain through a standardized interface, providing tools for transactions, account queries, and wallet management.
        Last updated -
        219
        79
        Apache 2.0
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        A server that enables interaction with the Solana blockchain using your own private key, supporting operations like getting wallet information, checking balances, and transferring SOL.
        Last updated -
        219
        6
        JavaScript

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/TanmayDhobale/FutarchyMCPServer'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server