YAPS Influence Score Server
平台与服务by degenpilot404
为 X/Twitter 账号提供注意力得分与可信度指标,支持排行、缓存和限流,帮助 LLM 引入影响者信任数据。
什么是 YAPS Influence Score Server?
为 X/Twitter 账号提供注意力得分与可信度指标,支持排行、缓存和限流,帮助 LLM 引入影响者信任数据。
README
YAPS MCP Server
An MCP (Model Context Protocol) server that wraps Kaito's YAPS API to provide tokenized attention scores for X/Twitter accounts. This server enables LLMs to query credibility and influence metrics for any X account, with built-in caching and rate limiting.
Features
- 🔍 Influencer Trust Score: Fetch YAPS scores for any X/Twitter account with caching
- 🔄 Comparison Tool: Compare the credibility of two influencers with natural language summaries
- 📊 Daily Leaderboard: Top-10 crypto influencers automatically refreshed daily
- 🚦 Rate Limiting: Graceful handling of YAPS API's 100 calls / 5 min limit
- 💾 Redis Caching: 10-minute TTL for scores, 24-hour TTL for leaderboards
Getting Started
Prerequisites
- Node.js 18 or higher
- Redis server
Installation
- Clone the repository
git clone https://github.com/yourusername/yap-mcp.git
cd yap-mcp
- Install dependencies
npm install
- Create a
.envfile based on the following template:
# YAPS API (no API key needed - using public API with rate limits)
YAPS_API_ENDPOINT=https://api.kaito.ai/api/v1/yaps
# Redis cache
REDIS_URI=redis://localhost:6379
# Server
PORT=3000
NODE_ENV=development
# YAPS cache TTL in seconds
YAPS_CACHE_TTL=600 # 10 minutes
# Leaderboard settings
LEADERBOARD_CACHE_TTL=86400 # 24 hours
- Build the project
npm run build
- Start the server
npm start
For integration with LLM providers, use the stdio transport:
npm start -- --stdio
MCP Resources and Tools
Resources
yaps-score- YAPS score for a Twitter user- Schema:
yaps-score://{username}
- Schema:
Tools
-
get_yaps_score- Get YAPS score and summary for a Twitter user- Input:
{ username: string } - Output: JSON object with score and natural language summary
- Input:
-
compare_scores- Compare YAPS scores between two Twitter users- Input:
{ username_a: string, username_b: string } - Output: JSON comparison with deltas and natural language verdict
- Input:
-
leaderboard_today- Get today's top-10 YAPS leaderboard- Input:
{} - Output: Array of top 10 accounts by 24h YAPS score
- Input:
Using with OpenAI GPT
Example of using the YAPS MCP server with OpenAI:
import OpenAI from 'openai';
import { spawn } from 'child_process';
const openai = new OpenAI({ apiKey: 'your-api-key' });
// Start the MCP server as a child process
const mcpProcess = spawn('node', ['dist/index.js', '--stdio'], {
stdio: ['pipe', 'pipe', process.stderr]
});
// Example function to call GPT with tools
async function askGptWithTools(question) {
try {
const response = await openai.chat.completions.create({
model: 'gpt-4-turbo',
messages: [{ role: 'user', content: question }],
tools: [
{
type: 'function',
function: {
name: 'get_yaps_score',
description: 'Get YAPS tokenized attention score for an X/Twitter account',
parameters: {
type: 'object',
properties: {
username: {
type: 'string',
description: 'Twitter username (with or without @)'
}
},
required: ['username']
}
}
},
// Additional tools would be defined here
],
tool_choice: 'auto'
});
console.log(response.choices[0].message);
// Process tool calls if any
if (response.choices[0].message.tool_calls) {
// Implementation for handling tool calls would go here
}
return response;
} catch (error) {
console.error('Error calling GPT:', error);
throw error;
}
}
// Example usage
askGptWithTools('What is the YAPS score for @VitalikButerin?');
Performance and Availability
- P95 tool latency < 300 ms (cache hit) / < 2 s (cache miss)
- 99% monthly availability with stateless containers
- Prometheus metrics for monitoring calls and errors
API Rate Limits
The YAPS API is available as an open source API with the following limitations:
- Default rate limit: 100 calls every 5 minutes
- This MCP server implements caching and rate limiting to respect these constraints
Technical Details
- Built with TypeScript and Node.js
- Uses MCP SDK version 1.11.3
- Express.js for HTTP handling
- Redis for caching and rate limiting
License
MIT
常见问题
YAPS Influence Score Server 是什么?
为 X/Twitter 账号提供注意力得分与可信度指标,支持排行、缓存和限流,帮助 LLM 引入影响者信任数据。
相关 Skills
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
接口测试套件
by alirezarezvani
扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。
✎ 帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。