Macrocosmos MCP
Enables real-time queries and large-scale data collection from X (Twitter) and Reddit via the Model Context Protocol, powered by Bittensor's Data Universe.
README
Macrocosmos MCP
<p align="center"> Official Macrocosmos <a href="https://github.com/modelcontextprotocol">Model Context Protocol (MCP)</a> server that enables interaction with X (Twitter) and Reddit, powered by Data Universe (SN13) on Bittensor. This server allows MCP clients like <a href="https://www.anthropic.com/claude">Claude Desktop</a>, <a href="https://www.cursor.so">Cursor</a>, <a href="https://codeium.com/windsurf">Windsurf</a>, <a href="https://github.com/openai/openai-agents-python">OpenAI Agents</a> and others to fetch real-time social media data. </p>
Quickstart with Claude Desktop
- Get your API key from Macrocosmos. There is a free tier with $5 of credits to start.
- Install
uv(Python package manager), install withcurl -LsSf https://astral.sh/uv/install.sh | shor see theuvrepo for additional install methods. - Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:
{
"mcpServers": {
"macrocosmos": {
"command": "uvx",
"args": ["macrocosmos-mcp"],
"env": {
"MC_API": "<insert-your-api-key-here>"
}
}
}
}
Available Tools
1. query_on_demand_data - Real-time Social Media Queries
Fetch real-time data from X (Twitter) and Reddit. Best for quick queries up to 1000 results.
Parameters:
| Parameter | Type | Description |
|---|---|---|
source |
string | REQUIRED. Platform: 'X' or 'REDDIT' (case-sensitive) |
usernames |
list | Up to 5 usernames. For X: @ is optional. Not available for Reddit |
keywords |
list | Up to 5 keywords. For Reddit: first item is subreddit (e.g., 'r/MachineLearning') |
start_date |
string | ISO format (e.g., '2024-01-01T00:00:00Z'). Defaults to 24h ago |
end_date |
string | ISO format. Defaults to now |
limit |
int | Max results 1-1000. Default: 10 |
keyword_mode |
string | 'any' (default) or 'all' |
Example prompts:
- "What has @elonmusk been posting about today?"
- "Get me the latest posts from r/bittensor about dTAO"
- "Fetch 50 tweets about #AI from the last week"
2. create_gravity_task - Large-Scale Data Collection
Create a Gravity task for collecting large datasets over 7 days. Use this when you need more than 1000 results.
Parameters:
| Parameter | Type | Description |
|---|---|---|
tasks |
list | REQUIRED. List of task objects (see below) |
name |
string | Optional name for the task |
email |
string | Email for notification when complete |
Task object structure:
{
"platform": "x", // 'x' or 'reddit'
"topic": "#Bittensor", // For X: MUST start with '#' or '$'
"keyword": "dTAO" // Optional: filter within topic
}
Important: For X (Twitter), topics MUST start with # or $ (e.g., #ai, $BTC). Plain keywords are rejected.
Example prompts:
- "Create a gravity task to collect #Bittensor tweets for the next 7 days"
- "Start collecting data from r/MachineLearning about neural networks"
3. get_gravity_task_status - Check Collection Progress
Monitor your Gravity task and see how much data has been collected.
Parameters:
| Parameter | Type | Description |
|---|---|---|
gravity_task_id |
string | REQUIRED. The task ID from create_gravity_task |
include_crawlers |
bool | Include detailed stats. Default: True |
Returns: Task status, crawler IDs, records_collected, bytes_collected
Example prompts:
- "Check the status of my Bittensor data collection task"
- "How many records have been collected so far?"
4. build_dataset - Build & Download Dataset
Build a dataset from collected data before the 7-day completion.
Warning: This will STOP the crawler and de-register it from the network.
Parameters:
| Parameter | Type | Description |
|---|---|---|
crawler_id |
string | REQUIRED. Get from get_gravity_task_status |
max_rows |
int | Max rows to include. Default: 10000 |
email |
string | Email for notification when ready |
Example prompts:
- "Build a dataset from my Bittensor crawler with 5000 rows"
- "I have enough data, build the dataset now"
5. get_dataset_status - Check Build Progress & Download
Check dataset build progress and get download links when ready.
Parameters:
| Parameter | Type | Description |
|---|---|---|
dataset_id |
string | REQUIRED. The dataset ID from build_dataset |
Returns: Build status (10 steps), and when complete: download URLs for Parquet files
Example prompts:
- "Is my dataset ready to download?"
- "Get the download link for my Bittensor dataset"
6. cancel_gravity_task - Stop Data Collection
Cancel a running Gravity task.
Parameters:
| Parameter | Type | Description |
|---|---|---|
gravity_task_id |
string | REQUIRED. The task ID to cancel |
7. cancel_dataset - Cancel Build or Purge Dataset
Cancel a dataset build or purge a completed dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
dataset_id |
string | REQUIRED. The dataset ID to cancel/purge |
Example Workflows
Quick Query (On-Demand)
User: "What's the sentiment about $TAO on Twitter today?"
→ Uses query_on_demand_data to fetch recent tweets
→ Returns up to 1000 results instantly
Large Dataset Collection (Gravity)
User: "I need to collect a week's worth of #AI tweets for analysis"
1. create_gravity_task → Returns gravity_task_id
2. get_gravity_task_status → Monitor progress, get crawler_ids
3. build_dataset → When ready, build the dataset
4. get_dataset_status → Get download URL for Parquet file
Example Prompts
On-Demand Queries
- "What has the president of the U.S. been saying over the past week on X?"
- "Fetch me information about what people are posting on r/politics today."
- "Please analyze posts from @elonmusk for the last week."
- "Get me 100 tweets about #Bittensor and analyze the sentiment"
Large-Scale Collection
- "Create a gravity task to collect data about #AI from Twitter and r/MachineLearning from Reddit"
- "Start a 7-day collection of $BTC tweets with keyword 'ETF'"
- "Check how many records my gravity task has collected"
- "Build a dataset with 10,000 rows from my crawler"
MIT License Made with love by the Macrocosmos team
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。