feat(mcp): add Social Sentiment Trading MCP Server#350
Draft
FidelCoder wants to merge 4 commits intoEmberAGI:mainfrom
Draft
feat(mcp): add Social Sentiment Trading MCP Server#350FidelCoder wants to merge 4 commits intoEmberAGI:mainfrom
FidelCoder wants to merge 4 commits intoEmberAGI:mainfrom
Conversation
- Add initial project structure for social sentiment analysis - Implement Reddit API client using snoowrap - Add TypeScript types for sentiment analysis - Add caching utility for API response caching - Configure free-tier API strategy (Reddit, Discord, Telegram, Hugging Face) - Add comprehensive README and development guidance - Exclude .contribution folder from git (local dev docs only)
- Add Reddit API client using public JSON endpoints (free tier) - Implement sentiment analysis with Hugging Face fallback - Add token mapping system for 15+ DeFi tokens - Create analyze-social-sentiment tool with real post links - Add detect-early-signals, social-momentum-score, and list-supported-tokens tools - Implement multi-source aggregator (Reddit ready, Discord/Telegram placeholders) - Add lenient filtering to capture real social media posts - Include all posts with direct links in response - Add comprehensive logging for debugging
…xtual analysis - Add Twitter/X integration using API v2 with Bearer token - Add Farcaster integration via Neynar API with improved search - Add contextual explanations and actionable insights to sentiment scores - Add DeFi-specific sentiment categories (perpetuals, arbitrage, flashloans, lending, staking) - Enhance all tools with multi-platform support (Reddit, Twitter, Farcaster) - Add environment variable loader for Node.js < 20.6 compatibility - Improve error logging and debugging for API integrations - Update momentum score to include Twitter and Farcaster breakdowns - Add comprehensive API keys setup guide in .contribution folder
- Add multi-platform sentiment aggregation (Reddit, Twitter/X, Farcaster, Discord, Telegram) - Implement 4 MCP tools: analyze-social-sentiment, social-momentum-score, detect-early-signals, list-supported-tokens - Add contextual AI-generated explanations and DeFi-specific sentiment categories - Support for 14+ major DeFi tokens with optimized search configurations - Implement caching to respect API rate limits - Add Discord.js and Telegram bot integrations - Include comprehensive README with setup instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related Issue(s): #349
This PR adds a new Social Sentiment Trading MCP Server that aggregates social sentiment from multiple platforms (Reddit, Twitter/X, Farcaster, Discord, Telegram) and provides real-time sentiment analysis, early signal detection, and social momentum scoring for DeFi tokens.
Type of Change:
🧪 Testing
Tests Performed:
Test Results:
Steps to Run Tests:
.env(see README.md)pnpm buildpnpm startanalyze-social-sentiment:{"tokenSymbol": "ETH", "timeRange": {"hours": 24}}social-momentum-score:{"tokenSymbol": "ETH"}detect-early-signals:{"tokenSymbol": "ARB", "lookbackHours": 24}list-supported-tokens:{}Checklists
Code Quality
pnpm build)pnpm lint)anytypes introducedDocumentation
Agent/MCP Specific
Deployment Notes
New Dependencies Added:
discord.js(^14.25.1)node-telegram-bot-api(^0.66.0)node-fetch(^3.3.2)lru-cache(^10.2.0)New Environment Variables:
TWITTER_BEARER_TOKEN(optional)NEYNAR_API_KEY(optional)DISCORD_BOT_TOKEN(optional)DISCORD_CHANNEL_IDS(optional)TELEGRAM_BOT_TOKEN(optional)TELEGRAM_CHAT_IDS(optional)HUGGING_FACE_API_KEY(optional)REDDIT_USER_AGENT(optional)MCP Tools
analyze-social-sentiment
{"tokenSymbol": "ETH", "timeRange": {"hours": 24}}social-momentum-score
{"tokenSymbol": "ETH"}detect-early-signals
{"tokenSymbol": "ARB", "lookbackHours": 24}list-supported-tokens
{}