Token导航 LogoToken导航TokenDH.com
Critical Minerals Data Tools logo
AI代理stdio官方级别未说明来源级核验

Critical Minerals Data Tools

MCP Server

一套用于访问权威来源的关键矿物和材料数据的MCP服务器和支持API,适用于AI分析、供应链研究和LLM集成。

工具数

26

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude数据访问Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Redliana

提供方

Redliana

最后核验

2026/5/17 20:23

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python test_openai.py

详细介绍

关键矿物数据工具

一套MCP服务器和支持API,用于从权威来源访问关键矿物和材料数据。专为人工智能驱动的分析、供应链研究和LLM集成而设计。

数据源

来源描述覆盖范围数据类型
克莱姆(NETL-EDX)美国关键矿产和材料200多个数据集研究数据、CSV、模式
BGS世界矿产统计全球矿产生产和贸易1970-2023,70+种矿产生产、进口、出口

项目概述

Data_Needs/
├── CLaiMM/          # CLAIMM MCP servers (standard + agnostic)
├── BGS_MCP/         # BGS MCP server + REST API
├── UNComtrade_MCP/  # UN Comtrade MCP server
├── GoogleScholar_MCP/ # Google Scholar MCP server
├── ArXiv_MCP/       # ArXiv MCP server
├── CMM_API/         # Legacy unified API (deprecated)
└── README.md        # This file

快速比较

项目接口数据源需要LLM最适合
索赔 (标准)MCPCLAIMM人工智能搜索和摘要
索赔 (不可知)MCPCLAIMM直接CLAIMM数据访问
BGS_MCPMCP+RESTBGS全球生产统计
联合国贸_MCPMCP联合国商品贸易统计数据库按HS编码的国际贸易流量
谷歌奖学金_MCPMCP谷歌学者(SerpAPI)学术文献搜索
ArXiv_MCPMCParXiv+可选LLM摘要可选预印本搜索和摘要
CMM_API(遗留)MCP+REST两者都有仅向后兼容

选择正确的工具

适用于克劳德桌面/克劳德代码用户

需要推荐命令
美国数据集+人工智能搜索CLaiMM标准claimm-mcp
美国数据集(原始数据)CLaiMM不可知claimm-mcp-agnostic
全球生产统计BGS_MCPbgs-mcp
一个工作流中的两个源使用 claimm-mcp + bgs-mcp 一起两个命令

其他LLM(OpenAI、Anthropic、谷歌、Ollama)

需要推荐端点
全球生产统计BGS_MCP RESThttp://localhost:8000
仅美国数据集CLaiMM MCP工具N/A(MCP)
旧版统一端点(已弃用)CMM_API RESThttp://localhost:8000

适用于没有LLM密钥的协作者

使用任何LLM不可知选项:

  • claimm-mcp-agnostic -通过MCP传输CLAIMM数据
  • bgs-mcp -通过MCP传输BGS数据
  • cmm-mcp -传统的统一MCP(已弃用)
  • 任何REST API-直接HTTP访问

安装

所有项目使用 紫外线 用于依赖性管理。

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone/navigate to Data_Needs directory
cd Data_Needs

# Install each project
cd CLaiMM && uv sync && cd ..
cd BGS_MCP && uv sync && cd ..
cd UNComtrade_MCP && uv sync && cd ..
cd GoogleScholar_MCP && uv sync && cd ..
cd ArXiv_MCP && uv sync && cd ..
# Optional legacy package:
cd CMM_API && uv sync && cd ..

快速开始

启动所有服务

# Terminal 1: BGS REST API
cd BGS_MCP && uv run bgs-api

# Optional legacy unified REST API (deprecated)
cd CMM_API && uv run cmm-api

测试API

# BGS API - top lithium producers
curl "http://localhost:8000/production/ranking?commodity=lithium%20minerals&top_n=5"

# BGS API - cobalt supply chain
curl "http://localhost:8000/production/ranking?commodity=cobalt,%20mine"

Claude桌面配置

增添 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "bgs": {
      "command": "uv",
      "args": ["--directory", "/path/to/BGS_MCP", "run", "bgs-mcp"]
    },
    "claimm-agnostic": {
      "command": "uv",
      "args": ["--directory", "/path/to/CLaiMM", "run", "claimm-mcp-agnostic"],
      "env": {
        "EDX_API_KEY": "your_edx_key"
      }
    }
  }
}

推荐设置:

  • 使用 bgs 加上 claimm-mcpclaimm-mcp-agnostic
  • 添加旧版 cmm-mcp 仅用于向后兼容性

项目详细信息

索赔(CLaiMM/)

用于NETL EDX CLAIMM(关键矿物和材料)数据的MCP服务器。

两种变体:

变量命令工具需要LLM
标准claimm-mcp8是(OpenAI、Anthropic等)
不可知论者claimm-mcp-agnostic10

诊断工具:

  • search_claimm_datasets -按查询/标签搜索
  • get_dataset_details -完整元数据
  • list_claimm_datasets -列出所有数据集
  • search_resources -搜索文件
  • get_resource_details -文件元数据
  • get_download_url -直接下载链接
  • detect_file_schema -CSV/Excel列检测
  • detect_dataset_schemas -所有文件的架构
  • get_claimm_statistics -格式/标签统计信息
  • get_datasets_by_category -按主题组织

数据类别:

  • 稀土元素(75个数据集)
  • 产出水(27个数据集)
  • 地质学(33个数据集)
  • 地球化学(18个数据集)
  • 煤炭和煤炭副产品(11个数据集)
  • 矿山废弃物(4个数据集)
  • 锂(1个数据集)

BGS_MCP(BGS_MCP/)

用于BGS世界矿产统计的MCP服务器和REST API。

接口:

接口命令用例
MCP服务器bgs-mcp克劳德桌面/代码
REST APIbgs-api任何LLM、HTTP客户端

MCP工具(8):

  • list_commodities -可用矿物质
  • list_countries -有数据的国家
  • search_production -按筛选器搜索
  • get_commodity_ranking -顶级生产商
  • get_time_series -历史趋势
  • compare_countries -国家比较
  • get_country_profile -国家商品
  • get_api_info -文件

REST端点:

  • GET /commodities -列出矿物
  • GET /countries -列出国家
  • GET /production/search -搜索数据
  • GET /production/ranking -顶级生产商
  • GET /production/timeseries -趋势
  • GET /production/compare -比较国家
  • GET /countries/{iso}/profile -国家概况
  • GET /openai/functions -LLM工具定义

关键矿物(28):

  • 电池:锂、钴、镍、石墨、锰
  • 稀土:矿物、氧化物
  • 战略:铂、钨、钒、铬、钽/铌
  • 工艺:镓、锗、铟、绿柱石
  • 基体:铜、锌、铅、金、银、锑、钼、铁

CMM_API公司(CMM_API/,遗留/弃用)

状态:因新用途而弃用。保留以实现向后兼容性。

结合CLAIMM和BGS数据源的统一API。

接口:

界面命令描述
MCP服务器cmm-mcp克劳德桌面/代码
REST APIcmm-api任何LLM、HTTP客户端

MCP工具(8):

  • get_data_overview -所有来源概述
  • search_all_sources -统一搜索
  • list_bgs_commodities -BGS矿物
  • search_bgs_production -BGS数据
  • get_commodity_ranking -顶级生产商
  • search_claimm_datasets -CLAIMM搜索
  • get_claimm_dataset -数据集详细信息
  • get_claimm_categories -CLAIMM类别

REST端点:

  • GET /overview -所有来源概述
  • GET /search?q= -统一搜索
  • GET /bgs/commodities -BGS矿物
  • GET /bgs/production -BGS数据
  • GET /bgs/ranking/{commodity} -顶级生产商
  • GET /claimm/datasets -CLAIMM搜索
  • GET /claimm/datasets/{id} -数据集详细信息
  • GET /claimm/categories -CLAIMM类别
  • GET /openai/functions -LLM工具定义

LLM集成

开放人工智能

import httpx
from openai import OpenAI

API_BASE = "http://localhost:8000"  # BGS_MCP REST API
client = OpenAI()

# Get function definitions
functions = httpx.get(f"{API_BASE}/openai/functions").json()["functions"]

# Use with chat completions
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Top lithium producers?"}],
    tools=[{"type": "function", "function": f} for f in functions],
)

人类克劳德(API)

import anthropic
import httpx

API_BASE = "http://localhost:8000"  # BGS_MCP REST API
client = anthropic.Anthropic()

functions = httpx.get(f"{API_BASE}/openai/functions").json()["functions"]
tools = [{"name": f["name"], "description": f["description"],
          "input_schema": f["parameters"]} for f in functions]

response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    tools=tools,
    messages=[{"role": "user", "content": "Search for rare earth datasets"}]
)

Ollama(当地法学硕士)

import httpx
import json

API_BASE = "http://localhost:8000"
OLLAMA_BASE = "http://localhost:11434"

# Fetch data first
data = httpx.get(f"{API_BASE}/bgs/ranking/cobalt,%20mine").json()

# Ask LLM to analyze
response = httpx.post(
    f"{OLLAMA_BASE}/api/chat",
    json={
        "model": "phi4",
        "messages": [
            {"role": "system", "content": "You are a minerals analyst."},
            {"role": "user", "content": f"Analyze: {json.dumps(data)}"}
        ],
        "stream": False
    },
    timeout=120.0
)
print(response.json()["message"]["content"])

纯HTTP

# Top cobalt producers
curl "http://localhost:8000/production/ranking?commodity=cobalt,%20mine&top_n=10"

# Country profile
curl "http://localhost:8000/countries/AU/profile"

# Commodity list
curl "http://localhost:8000/commodities?critical_only=true"

环境变量

变量必需描述
EDX_API_KEYCLAIMM访问NETL EDX API密钥
OPENAI_API_KEYCLaiMM标准OpenAI API密钥
ANTHROPIC_API_KEYCLaiMM标准人类学API密钥
GOOGLE_API_KEYCLaiMM标准Google AI API密钥
XAI_API_KEYCLaiMM标准xAI(Grok)API密钥

注: BGS数据不需要API密钥(开放数据)。

用例

供应链分析

# Identify concentration risk
curl "http://localhost:8000/bgs/ranking/cobalt,%20mine?top_n=10"
# Result: DRC produces 69% of global cobalt

# Compare alternative sources
curl "http://localhost:8000/bgs/production?commodity=cobalt,%20mine&country=AUS"

研究数据发现

使用 claimm-mcpclaimm-mcp-agnostic 工具:

  • search_claimm_datasets 通过查询查找数据集
  • get_dataset_details 检索完整元数据并下载URL

市场情报

# Production trends
curl "http://localhost:8000/production/search?commodity=lithium%20minerals&year_from=2018"

# Country mineral profile
curl "http://localhost:8000/countries/AU/profile"

AI驱动的分析

与Claude Desktop一起使用:

  • “稀土生产大国有哪些,供应链风险有哪些?”
  • “查找有关产出水的CLAIMM数据集并显示其模式”
  • “比较过去5年澳大利亚和智利的锂产量”

测试

可用测试脚本

项目测试文件描述
BGS_MCPtest_openai.pyOpenAI集成
BGS_MCPtest_ollama.pyOllama集成
CMM_API(遗留)test_openai.pyOpenAI集成
CMM_API(遗留)test_ollama.pyOllama集成

运行测试

# BGS with OpenAI
cd BGS_MCP
export OPENAI_API_KEY=your_key
uv run python test_openai.py

# Legacy CMM API with Ollama
cd CMM_API
uv run python test_ollama.py

建筑

┌─────────────────────────────────────────────────────────────┐
│                      Client Applications                      │
├─────────────────────────────────────────────────────────────┤
│  Claude Desktop  │  Claude Code  │  OpenAI  │  Ollama  │ ... │
└────────┬─────────┴───────┬───────┴────┬─────┴────┬─────┴─────┘
         │                 │            │          │
         │ MCP             │ MCP        │ HTTP     │ HTTP
         ▼                 ▼            ▼          ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────┐
│   CLaiMM MCP    │ │   BGS MCP       │ │   REST APIs         │
│   (standard/    │ │   Server        │ │   (BGS primary,     │
│    agnostic)    │ │                 │ │    CMM legacy)      │
└────────┬────────┘ └────────┬────────┘ └──────────┬──────────┘
         │                   │                     │
         ▼                   ▼                     ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────┐
│   EDX Client    │ │   BGS Client    │ │   Legacy Unified    │
│                 │ │                 │ │   Client (optional) │
└────────┬────────┘ └────────┬────────┘ └──────────┬──────────┘
         │                   │                     │
         ▼                   ▼                     ▼
┌─────────────────┐ ┌─────────────────┐
│  NETL EDX API   │ │  BGS OGC API    │
│  (CKAN-based)   │ │  (OGC Features) │
└─────────────────┘ └─────────────────┘

数据许可证

许可证URL
CLAIMM(NETL EDX)美国政府工作https://edx.netl.doe.gov
BGS世界矿产统计开放政府许可证https://www.bgs.ac.uk

贡献

每个项目都接受捐款。请确保:

  • 代码在适用的情况下维护LLM无关模式
  • REST API包括OpenAI函数定义
  • MCP服务器遵循FastMCP模式
  • 文档已更新

许可证

所有项目均获得麻省理工学院许可。

目录标签

目录标签

PythonClaude数据访问关键矿物本地部署AI分析供应链研究LLM集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

26

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP