MCP理货API
模型上下文协议(MCP)服务器,为LLM提供对Tally区块链治理API的访问,用于在多个网络上查询DAO、提案和投票数据。
🚀 快速开始
2分钟内开始在Cursor或Claude Desktop中使用MCP Tally API:
1.获取一个理直气壮的API密钥
注册地址: Tally.xyz 获取您的免费API密钥。
2.安装MCP服务器
npm install -g mcp-tally-api3.配置Cursor/Claude桌面
添加到MCP配置文件中:
光标: 编辑 .cursor/mcp.json 在您的项目中:
{
"servers": {
"tally": {
"command": "mcp-tally-api",
"env": {
"TALLY_API_KEY": "your_api_key_here"
}
}
}
}克劳德桌面: 编辑 claude_desktop_config.json:
{
"mcpServers": {
"tally": {
"command": "mcp-tally-api",
"env": {
"TALLY_API_KEY": "your_api_key_here"
}
}
}
}4.开始使用
重新启动Cursor/Claude Desktop并开始询问DAO:
“最受欢迎的有积极提案的DAO是什么?”\ “显示Uniswap治理的详细信息”\ “Arbitrum DAO的最高代表是谁?”
🎯 您现在可以使用14个工具和7个资源进行全面的DAO治理分析!
______________________________________________________________________
特性
🚀 特性
- 🔧 工具:14个用于查询组织、提案、用户和代表的综合工具
- 📚 资源:7个可浏览的资源,包括热门DAO映射和治理概述
- 🎯 提示:6个以治理为重点的结构化DAO分析提示模板
- ⚡ 实时:来自Tally的GraphQL API的实时数据,具有正确的错误处理
- 🔍 过滤:跨所有端点的高级过滤、排序和分页
- 🌐 多链:支持15个以上的区块链网络,包括以太坊、Polygon、Arbitrum
- 📊 丰富的数据:全面的治理指标、投票模式和委托信息
🏛️ 组织管理
- 列表_组织:使用分页、按链/徽标过滤和按流行度排序浏览DAO
- get_组织:获取详细的DAO信息,包括成员数量和提案统计数据
- get_organizations_with_active_proposals:查找正在进行治理活动的DAO
📊 提案操作
- 列表_职位:查看具有过滤和排序选项的特定DAO的提案
- get_proposal:获取详细的提案信息,包括投票统计和执行细节
- get_active_proposals:在所有DAO中查找活动提案或按标准筛选
👥 用户和委派
- get_user_profile:获取全面的用户资料,包括DAO参与情况
- get_dao_参与者:列出具有排序选项的特定DAO的成员
- get_delegate_statement:获取特定用户和组织的委托声明
- get_delegates:使用委派统计信息在DAO中查找委派
📚 资源
- 热门DAO:在5个网络中稳定地将20个主要DAO映射到其组织ID
- 察看连接信息:运行时信息和运行状况
- 组织概述:通过以下方式对DAO进行人类可读的降价概述
tally://org/{organizationId} - 提案概述:通过以下方式提供详细的提案信息
tally://org/{organizationId}/proposal/{proposalId} - 用户配置文件概述:治理概况
tally://user/{address} - 热门提案:通过以下方式积极开展治理活动
tally://trending/proposals
🔗 资源模板
资源模板提供了对治理数据的可浏览、人工智能友好的访问:
组织概述 (tally://org/{organizationId})
获取任何DAO的人类可读markdown概述:
URI: tally://org/2206072050458560434
Content-Type: text/markdown
# Uniswap
**Description:** Uniswap is a decentralized protocol for automated liquidity provision on Ethereum.
## 📊 Key Metrics
- **Members:** 47,543
- **Total Proposals:** 81
- **Active Proposals:** 0
- **Chain:** eip155:1
## 🏛️ Governance Status
**Current Activity:** 🔵 No active proposals
## 🔗 Links
[Website](https://uniswap.org) • [Twitter](https://twitter.com/Uniswap) •
---
*Data from Tally API • Organization ID: 2206072050458560434 • Slug: uniswap*提案概述 (tally://org/{organizationId}/proposal/{proposalId})
获取具体提案的详细降价概述:
URI: tally://org/2206072050458560434/proposal/2589356045239322076
Content-Type: text/markdown
# ❌ Scaling V4 and Supporting Unichain
**Organization:** Uniswap
## 📋 Proposal Details
- **Status:** Defeated
- **Proposal ID:** 2589356045239322076
- **Proposer:** `0x9B68c14e936104e9a7a24c712BEecdc220002984`
- **Start Time:** May 12, 2025 at 09:18 PM
- **End Time:** May 18, 2025 at 01:20 PM
## 📄 Description
# Scaling V4 and Supporting Unichain
PGOV is submitting the proposal on GFX Labs' behalf...
## 🗳️ Voting Results
- **For:** 24.7M votes
- **Against:** 3.0K votes
- **Abstain:** 5.3M votes
## ⚙️ Execution
⏳ **Status:** Not executed
---
*Data from Tally API • Organization ID: 2206072050458560434 • Proposal ID: 2589356045239322076*用户配置文件概述 (tally://user/{address})
获取任何以太坊地址的治理配置文件:
URI: tally://user/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
Content-Type: text/markdown
# 👤 Anonymous User
## 📋 Profile Details
- **Address:** `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`
## 🏛️ DAO Participation
*No DAO participation found for this address.*
---
*Data from Tally API • Address: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045*热门提案 (tally://trending/proposals)
了解所有DAO的主动治理概述:
URI: tally://trending/proposals
Content-Type: text/markdown
# 🔥 Trending Governance Activity
**0 Active Proposal(s) Across All DAOs**
*No active proposals found at this time.*
Check back later for ongoing governance activity!
---
*Data from Tally API • Updated: 5/28/2025, 12:24:27 AM*优点:
- 可浏览:AI可以像阅读文档一样探索治理数据
- 可缓存的:可以缓存热门资源以提高性能
- 可链接的:在对话中易于参考特定的治理数据
- 可读的:返回人性化的markdown格式
- 错误安全:对无效参数进行优雅的错误处理
- 实时:始终显示实时Tally API的当前数据
🎯 提示模板
以治理为重点的提示模板,指导LLM进行全面的DAO分析:
DAO分析 (analyze-dao-governance)
完成任何DAO的治理健康评估:
Parameters:
- organizationId: The DAO to analyze
- includeComparison: Whether to compare with similar DAOs (optional)
Guides LLM through:
- Organization overview and metrics
- Active governance activity analysis
- Delegate distribution and voting power
- Recent proposal patterns and success rates
- Optional peer comparison and benchmarkingDAO比较 (compare-dao-governance)
两个DAO的并行治理比较:
Parameters:
- dao1: First DAO organization ID or slug
- dao2: Second DAO organization ID or slug
- aspect: Focus area (overall, delegates, proposals, activity)
Provides structured comparison framework for:
- Quantitative metrics and participation rates
- Governance quality and community health
- Structural differences and best practices
- Actionable recommendations for improvement代表研究 (analyze-delegate-profile)
全面的代表分析:
Parameters:
- address: Ethereum address of the delegate
- organizationId: Specific DAO to focus on (optional)
Research framework covering:
- Cross-DAO governance experience and history
- Current voting power and delegation status
- Participation quality and voting consistency
- Community standing and delegate statements
- Specialization areas and expertise趋势发现 (discover-governance-trends)
全生态系统治理趋势分析:
Parameters:
- timeframe: Analysis focus (current, recent, emerging)
- category: DAO category filter (all, defi, infrastructure, social)
Trend analysis covering:
- Governance innovation and new mechanisms
- Hot topics and common proposal themes
- Participation patterns and delegate activity
- Cross-DAO movements and coordinationDAO建议 (find-dao-to-join)
个性化DAO发现和建议:
Parameters:
- interests: Focus areas (comma-separated, e.g., "DeFi,gaming")
- participationLevel: Desired engagement (observer, voter, delegate, contributor)
- experience: Governance experience (beginner, intermediate, expert)
Matching framework considering:
- Interest alignment with DAO focus areas
- Participation opportunities and entry barriers
- Experience-appropriate complexity levels
- Community health and governance quality提案分析 (analyze-proposal)
深入提案分析和投票指导:
Parameters:
- organizationId: DAO where the proposal exists
- proposalId: Specific proposal to analyze
Analysis framework covering:
- Proposal details and strategic implications
- Current voting dynamics and participation
- Key delegate positions and influence
- Risk assessment and implementation challenges
- Voting recommendations and considerations优点:
- 结构化指导:详细分析的分步说明
- 工具集成:优化使用所有Tally API工具和资源
- 灵活聚焦:可定制的分析深度和比较范围
- 可操作的见解:旨在提出切实可行的建议
⚡ 高级查询功能
对于需要访问预构建工具之外的功能的高级用户,MCP Tally API服务器提供了对底层GraphQL API的直接访问:
execute_graphql_query工具
针对Tally API执行任意GraphQL查询:
Parameters:
- query: GraphQL query string
- variables: Optional variables for the GraphQL query
Example:
Query: "query GetOrganizations { organizations(input: { page: { limit: 3 } }) { nodes { ... on Organization { id name slug chainIds } } } }"
Response: Raw GraphQL response data with full access to any Tally API functionalitytall-api架构资源
通过内省获得完整的GraphQL模式:
URI: tally://api/schema
Content-Type: application/json
Returns: Complete GraphQL schema including all types, fields, mutations, enums, and directives优点:
- 无限制访问:查询Tally GraphQL API中可用的任何数据
- 真实模式:始终通过内省直接从API获取最新架构
- 自定义查询:为独特的用例构建专门的查询
- 发展援助:用于构建自定义集成的完整架构文档
- 未来考验:在添加为专用工具之前,请访问Tally API的新功能
使用案例:
- 研究现有工具未涵盖的特定治理模式
- 根据专门的数据要求构建自定义分析工作流
- 访问实验版或试用版Tally API功能
- 跨多个数据源创建复杂的聚合
- 调试并理解底层API结构
快速开始
先决条件
安装
选项1:从npm安装(推荐)
# Install globally
npm install -g mcp-tally-api
# Or install locally in your project
npm install mcp-tally-api
# Set up environment
echo "TALLY_API_KEY=your_api_key_here" > .env选项2:从源代码构建
# Clone and install
git clone https://github.com/withtally/mcp-tally-api.git
cd mcp-tally-api
bun install
# Set up environment
echo "TALLY_API_KEY=your_api_key_here" > .env
# Build and test
bun run build
bun run test