x402 Data Hub
by alexchai-dev
README.md
# 🚀 x402 Data Hub — Model Context Protocol (MCP) Server
[](https://base.org)
[](https://opensource.org/licenses/MIT)
[](https://x402datahub.io)
An official Model Context Protocol (MCP) server that gives your AI agents (Claude Desktop, Cursor, Cline, etc.) native, real-time access to high-value developer datasets.
Instead of expensive monthly API subscriptions, agents pay exactly **$0.01 USDC** per query on the Base L2 network (completely bypassed during the **Free Open Beta**).
---
## 📊 Available Datasets & Tools
The server exposes three primary tools to your AI agent:
1. `list_datasets`: Displays the database index.
2. `get_free_dataset`: Accesses daily-updated developer datasets:
- `saas/ai-api-pricing`: Live price-per-1M-tokens and context windows from OpenRouter (GPT-4o, Claude 3.5 Sonnet, Gemini Pro, DeepSeek V3, etc.).
- `events/v2ex-hot-topics`: Trending developer discussions and hot topics.
3. `buy_premium_dataset`: Accesses premium feeds:
- `finance/gas-tracker`: Live EVM gas prices (in Gwei) on Base and Arbitrum.
---
## 🛠️ Setup Guide (3-Step Installation)
### Step 1: Install Dependencies
Ensure you have Python installed, then install the MCP library:
```bash
pip install mcp
```
### Step 2: Download the Server
Clone the repository to your local machine:
```bash
git clone https://github.com/alexchai-dev/cloudflare-data-hub.git
```
### Step 3: Add to your AI Client
#### A. Claude Desktop
Add the following configuration to your `claude_desktop_config.json` (usually located at `%APPDATA%\Claude\claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
```json
{
"mcpServers": {
"x402-data-hub": {
"command": "python",
"args": [
"/path/to/cloudflare-data-hub/mcp_server.py"
]
}
}
}
```
*(Replace `/path/to/cloudflare-data-hub/mcp_server.py` with the absolute path to your cloned repository).*
#### B. Cursor IDE
1. Open Cursor and go to **Settings** -> **Models** -> **MCP**.
2. Click **+ Add New MCP Server**.
3. Fill in the fields:
- **Name**: `x402-data-hub`
- **Type**: `stdio`
- **Command**: `python /path/to/cloudflare-data-hub/mcp_server.py`
4. Click **Save**.
---
## 🔵 Web3 Micro-payments & Open Beta
* **Free Open Beta**: Currently, the server is running with `BETA_MODE = True`. You can query all datasets (including premium ones) using any dummy string as the transaction hash (`tx_hash`).
* **On-Chain Mode**: When beta ends, agents unlock premium feeds by signing a transaction of **0.01 USDC** to our treasury wallet (`0xB23B0d7d25113E991D2931Ca147677A5b5Da40E4`) on Base L2 and passing the `tx_hash` to the tool.
---
## 📄 License
This project is open-source and licensed under the MIT License.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessUnresponsive