mcpField
D
Data Market

Data Market

Local
github.com/al157Finance0Updated 16w ago

About Data Market

Data Market sells curated structured public datasets per call through x402 to AI agents that need data. Its catalog covers weather, finance, reference data, development information, and technology abbreviations, with endpoints for dataset discovery.

Key features

  1. 01Structured public datasets across categories
  2. 02Weather, finance, and reference data
  3. 03Static downloads and dynamic queries
  4. 04x402-protected paid data
  5. 05Discovery endpoints for agents

Use cases

  1. 01Retrieve current or historical weather data
  2. 02Query exchange rates, crypto, or stock indices
  3. 03Look up country codes, units, or time zones
  4. 04Find HTTP status codes and MIME types

MCP support

The project provides an MCP Server Manifest and supports paid tools through the agents SDK's `withX402`. MCP clients can discover and purchase catalog datasets per call.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"data-market": {
"command": "npx",
"args": [
"-y",
"wrangler"
]
}
}
}
Run commandnpx -y wrangler

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmwrangler

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Data Market — AI Agent 结构化数据集市场

通过 x402 协议向 AI Agent 按次售卖结构化公开数据集。

产品定位

结构化公开数据集汇总 (Curated Public Datasets)

类别数量示例定价
天气/气候2全球天气日报、10年历史天气$0.50-$2.00
金融/市场3汇率、加密货币、股指$0.30-$0.50
参考数据3国家代码、单位换算、时区$0.05-$0.20
代码/开发2HTTP 状态码、MIME 类型$0.05-$0.10
知识库1科技缩写解释$0.20
AI Agent Reach (Agent 发现机制)

AI Agent 通过以下方式发现和购买数据:

端点类型说明
GET /llms.txt文本LLM 可读的数据目录索引
GET /.well-known/ai.jsonJSON-LDSchema.org DataCatalog 描述
GET /mcp.jsonJSONMCP Server Manifest (modelcontextprotocol)
GET /openapi.jsonJSONOpenAPI 3.1 规范
MCP paidTool协议via agents SDK withX402

部署

前置条件
  • Cloudflare 账号
  • 加密钱包 (接收 USDC)
  • 测试网 USDC (base-sepolia) — Circle Faucet
快速开始
# 1. 安装依赖
npm install

# 2. 创建 R2 存储桶
npx wrangler r2 bucket create data-market-files

# 3. 上传数据文件
npx wrangler r2 object put data-market-files/datasets/weather-daily.json --file ./data.json

# 4. 配置 secrets
npx wrangler secret put MERCHANT_ADDRESS   # 0x你的钱包地址
npx wrangler secret put FACILITATOR_URL    # https://x402.org/facilitator

# 5. 本地测试
npx wrangler dev

# 6. 部署
npm run deploy
测试支付流程
# Agent 发现目录
curl https://your-worker.workers.dev/llms.txt

# AI Manifest (JSON-LD)
curl https://your-worker.workers.dev/.well-known/ai.json

# MCP Manifest
curl https://your-worker.workers.dev/mcp.json

# 首次请求→返回 402
curl -v https://your-worker.workers.dev/datasets/weather-global-daily.json
# → 402 Payment Required + PAYMENT-REQUIRED header

项目结构

src/
├── datasets/
│   └── catalog.ts          ← 13 个数据条目定义及定价
├── routes/
│   ├── static.ts           ← R2 文件下载 (x402 保护)
│   ├── query.ts            ← 动态数据查询 (x402 保护)
│   └── discovery.ts        ← Agent Reach 端点 (公开免费)
├── config.ts               ← 网络/定价配置
├── types.ts                ← Env 类型定义
├── index.ts                ← 主入口 + x402 中间件
└── mcp-server.ts           ← MCP paidTool (agents SDK)

切换主网

  1. src/config.ts: ACTIVE_NETWORK 改为 NETWORK.mainnet
  2. src/mcp-server.ts: network: "base-sepolia" 改为 "base"
  3. 确保钱包地址在 Base 主网有 USDC
  4. 重新部署

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.