Back to MCP directory
publicPublicdnsLocal runtime

mpc-tally-api-server

一个基于TypeScript和GraphQL的Tally API交互服务器,用于获取DAO的治理数据和元数据。

article

README

🚀 MPC 计数 API 服务器

MPC 计数 API 服务器是一个基于模型上下文协议(MCP)的服务器,可与计数 API 进行交互。借助该服务器,AI 代理能够获取 DAO 的各类信息,涵盖治理数据、提案以及元数据等。

✨ 主要特性

  • 可按受欢迎程度或探索状态对 DAO 进行列表展示。
  • 能获取全面的 DAO 元数据,其中包含社交链接和治理信息。
  • 支持分页处理,便于应对大量结果集。
  • 采用 TypeScript 和 GraphQL 构建。
  • 具备完整的测试覆盖,并使用 Bun 的测试运行器。

📦 安装指南

# 克隆仓库
git clone https://github.com/yourusername/mpc-tally-api-server.git
cd mpc-tally-api-server

# 安装依赖
bun install

# 构建项目
bun run build

📚 详细文档

配置

  1. 在根目录中创建一个 .env 文件:
TALLY_API_KEY=your_api_key_here
  1. Tally 获取你的 API 密钥。

⚠️ 重要提示

保护好您的 API 密钥:

  • 永远不要提交 .env 文件。
  • 不要将 API 密钥暴露在日志或错误消息中。
  • 如果密钥被泄露,请立即更换。
  • 使用环境变量进行配置。

使用方法

运行服务器

# 启动服务器
bun run start

# 开发模式,带自动重载
bun run dev

Claude Desktop 配置

将以下内容添加到您的 Claude Desktop 配置中:

{
  "tally": {
    "command": "node",
    "args": [
      "/path/to/mpc-tally-api-server/build/index.js"
    ],
    "env": {
      "TALLY_API_KEY": "your_api_key_here"
    }
  }
}

可用脚本

  • bun run clean - 清理构建目录。
  • bun run build - 构建项目。
  • bun run start - 运行构建好的服务器。
  • bun run dev - 在开发模式下运行,带自动重载。
  • bun test - 运行测试。
  • bun test --watch - 以监视模式运行测试。
  • bun test --coverage - 带覆盖范围的测试。

API 函数

该服务器公开了以下 MCP 函数:

list_daos

按指定标准列出 DAO。

参数:

  • limit(可选):要返回的 DAO 的最大数量(默认值:20,最大值:50)。
  • afterCursor(可选):分页游标。
  • sortBy(可选):如何排序 DAO(默认值:popular)
    • 可选值:"id", "name", "explore", "popular"

📄 许可证

MIT

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