Critical Raw Minerals & Urban Mining Oracle (x402)
Kritische Rohstoffe & Urban Mining Oracle (minerals-oracle-x402)
Hochleistungsfähiger deterministischer Mikro-Oracle-Dienst für autonome Handels-, Lieferketten- und RWA-Agenten (Real World Assets). Liefert Echtzeit-Spotpreise, COMEX/LME-Cross-Exchange-Arbitrage-Spreads und Urban-Mining-Schrott-Benchmark-Erlösbewertungen für kritische physische Rohstoffe.
⚡ Hauptfunktionen
Normalisierte Preisfeeds für kritische Rohstoffe:
Silber (
Ag): LBMA- und COMEX-Spot inUSD/troy_oz,USD/g,USD/kg.Platin (
Pt): LPPM- und NYMEX-Spot inUSD/troy_oz,USD/g.Kupfer (
Cu): LME Grade A Kathode und COMEX inUSD/mt,USD/lb,USD/kg.Lithium (
Li): Batteriequalität 99,5 % $\text{Li}_2\text{CO}_3$ / $\text{LiOH}$ inUSD/mt,USD/kg.Seltenerden (
NdDy): Permanentmagnet-Qualität Neodym-Dysprosium ($\text{PrNd}/\text{DyFe}$) Verbund inUSD/kg.
Lokale Arbitrage- und Basisspreads:
Berechnung der COMEX- vs. LME-Kupferarbitrage unter Berücksichtigung von Überseefracht und Importzöllen.
COMEX- vs. LBMA-Loco-London-Silberspread.
SMM Inland-China vs. Fastmarkets CIF Rotterdam Lithium Aufschlag/Abzug.
NYMEX- vs. LPPM-Platinspread.
Urban-Mining- und Kreislaufwirtschafts-Bewertungsmaschine:
EV_BATTERY_BLACK_MASS: Hydrometallurgische Rückgewinnung von $\text{Li}$, $\text{Ni}$, $\text{Co}$ und $\text{Mn}$ mit zahlbaren Rückgewinnungsausbeuten und Behandlungskosten (TC/RC).AUTO_CATALYST_CERAMIC: PGM-Rückgewinnung aus verbrauchten Katalysatoren ($\text{Pt}$, $\text{Pd}$, $\text{Rh}$) aus Keramikmonolith-Analysen.E_WASTE_HIGH_GRADE_PCB: Extraktion von Edel- und Basismetallen ($\text{Au}$, $\text{Ag}$, $\text{Cu}$) aus geschreddertem PCB-Ausgangsmaterial.WIND_EV_PERMANENT_MAGNETS: NdFeB-Schrottrecycling für getrennte Seltenerdoxide ($\text{Nd}$, $\text{Dy}$, $\text{Pr}$).
Web3-Monetarisierung über x402 auf Base:
Erzwingt Mikrozahlungen (0.005 USDC pro Abfrage) über HTTP-402-Challenge-Response auf Base (Chain-ID
8453).Natives Base-USDC-Token:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.Unterstützt kryptografische Signaturen nach EIP-712/EIP-191 und Facilitator-Verifizierung.
Nativ für Multi-Agent-Standards:
Google AP2 (
/.well-known/ap2): Agent-Protocol-v2-Manifest.Model Context Protocol (MCP): Tool-Schema-Definitionen (
mcp_tool_spec.json) und/mcp/invoke-Dispatcher.OpenAPI / Swagger (
/docs): Standard, maschinenlesbare und interaktive API-Dokumentation.
Related MCP server: hyperd-mcp
📁 Repository-Struktur
minerals-oracle-x402/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application, routing & MCP endpoints
│ ├── feed_engine.py # Deterministic commodity pricing, spread & scrap engine
│ ├── x402_verifier.py # HTTP 402 challenge & EIP-712 payment verifier
│ └── schemas.py # Pydantic data contracts & schemas
├── tests/
│ ├── __init__.py
│ └── test_client.py # Autonomous agent payment test suite
├── .well-known/
│ └── ap2.json # Google Agent Protocol AP2 manifest
├── mcp_tool_spec.json # FastMCP tool definition for LLM agents
├── Dockerfile # Ultra-lightweight multi-stage container
├── requirements.txt # Python dependencies
└── README.md # Documentation & quickstart🚀 Schnellstart
1. Lokale Einrichtung
# Clone and enter directory
cd minerals-oracle-x402
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadDie interaktive Dokumentation ist unter http://localhost:8000/docs verfügbar.
2. Ausführen über Docker
# Build lightweight container
docker build -t minerals-oracle-x402 .
# Run container
docker run -p 8000:8000 minerals-oracle-x402💳 x402-Zahlungsablauf-Spezifikation
sequenceDiagram
autonumber
actor Agent as Autonomous AI Agent
participant Oracle as minerals-oracle-x402
participant Base as Base Network (USDC)
Agent->>Oracle: GET /api/v1/oracle/prices
Oracle-->>Agent: HTTP 402 Payment Required<br/>(Nonce, Price: 0.005 USDC, Base Chain ID: 8453)
Note over Agent: Agent signs payment challenge<br/>using private key (EIP-712/EIP-191)
Agent->>Oracle: GET /api/v1/oracle/prices<br/>Header: Authorization: x402 <base64_payload>
Oracle->>Oracle: Verify signature / Facilitator settle
Oracle-->>Agent: HTTP 200 OK<br/>Certified Oracle Feeds & Attestation HashesFormat des Zahlungsautorisierungs-Headers
Authorization: x402 eyJub25jZSI6ICIxYTIz...IiwgInNpZ25hdHVyZSI6ICIweDk5...In0=Wobei das dekodierte JSON-Payload Folgendes enthält:
{
"nonce": "7f8b92c4a90184b2ef019a823b102938",
"signature": "0x...",
"signer": "0xYourAgentWalletAddress"
}🤖 MCP (Model Context Protocol) Integration
Zur Verwendung mit Claude Desktop, Cursor, Gemini oder Antigravity-Agenten laden Sie mcp_tool_spec.json.
Verfügbare Tools:
get_mineral_prices: Ruft alle aktuellen Spotpreise und Einheitenumrechnungen ab.get_arbitrage_spreads: Ruft COMEX/LME/SMM-Basisspreads und Margen ab.calculate_urban_mining_value: Berechnet Chargen-Rückgewinnungsausbeuten für EV-Black-Mass, Autokatalysatoren, E-Schrott oder Permanentmagnete.
Beispiel für einen Python-Agent-MCP-Toolaufruf:
import httpx
resp = httpx.post(
"http://localhost:8000/mcp/invoke",
json={
"name": "calculate_urban_mining_value",
"arguments": {
"scrap_category": "EV_BATTERY_BLACK_MASS",
"quantity_metric_tons": 5.0,
"custom_assay_overrides": {"Li": 4.1, "Co": 6.5}
}
},
headers={"X-Dev-Bypass": "true"} # Or with valid x402 signature
)
print(resp.json())🧪 Ausführen der Tests
Führen Sie die automatisierte Testsuite aus, die den 402-Challenge-Ablauf, die kryptografische EIP-712-Verifizierung, Schrottberechnungen und AP2-Endpunkte überprüft:
pytest -v tests/test_client.py📜 Lizenz
MIT-Lizenz. Entwickelt für den Handel autonomer Agenten und die Resilienz kritischer Mineralien.
This server cannot be installed
Maintenance
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceTrust infrastructure for AI agents on Base. DEX Spread Oracle (live Uniswap V3 prices), on-chain escrow, insurance pool, and collective knowledge base. 7 smart contracts. Pay-per-query via x402 micropayments in USDC.6

hyperd-mcpofficial
AlicenseAqualityBmaintenancePre-trade DeFi intelligence for AI agents. 20 paid x402 endpoints, USDC on Base.23561MIT- AlicenseAqualityBmaintenanceUSDA nutrition API optimized for AI agents. x402 + USDC on Base41MIT
- FlicenseNot gradedqualityDmaintenancePay-per-use AI security and research tools for autonomous agents on Base, enabling honeypot detection, risk assessment, wallet analysis, and yield optimization via the x402 protocol.
Related MCP Connectors
Pay-per-call web scraping for AI agents via x402 on Base USDC. Six tools, no signup.
Pay-per-call data tools for AI agents: crypto signal, web reader, SEO audit. x402 USDC on Base.
63 pay-per-call tools for agents: vision, text, data, web, blockchain. USDC on Base via x402.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nohosa001-pixel/minerals-oracle-x402'
If you have feedback or need assistance with the MCP directory API, please join our Discord server