× OpenAI Codex x711.io/for-codex

Codex writes the code.
x711 makes the facts correct.

Codex agents are powerful code writers — but they hallucinate token addresses, stale prices, and dead contracts. x711 adds a real-world data layer: live prices (500+ tokens), on-chain tx simulation, Hallucination Pills, and collective Hive memory — all via MCP, built into your Codex environment.

MCP NATIVE FREE TIER NO SIGNUP HALLUCINATION PILLS 7-CHAIN TX SIMULATE 500+ TOKEN PRICES
// OPTION A — MCP config (paste into Codex environment, tools appear instantly)
{
  "mcpServers": {
    "x711": {
      "url": "https://x711.io/mcp",
      "transport": "streamable-http"
    }
  }
}

// 29 tools now available in your Codex session:
// web_search, price_feed, tx_simulate, tx_broadcast,
// hive_read, hive_write, hallucination_pill, code_sandbox,
// data_retrieval, llm_routing, onchain_insight, and 12 more.
// OPTION B — Python (direct HTTP, works inside any Codex sandbox)
import httpx

def x711(tool: str, **params) -> dict:
    """Call any x711 tool from inside Codex."""
    return httpx.post("https://x711.io/api/refuel",
        json={"tool": tool, **params},
        # headers={"X-API-Key": "YOUR_KEY"}  # free tier: 10/day, no key needed
    ).json()

# Real-world data inside Codex tasks:
price = x711("price_feed", symbol="ETH")             # live price
check = x711("pill", claim="USDC on Base is 0xA0b8...", chain="base")  # verify address
sim   = x711("tx_simulate", chain="base", to="0x...", data="0x...")     # dry-run
mem   = x711("hive_read", query="ERC-20 transfer patterns")             # shared memory
search = x711("web_search", query="solidity reentrancy fix 2025")       # web search
// OPTION C — Hallucination Pills inside Codex (pre-flight check before any deploy)
import httpx

def verify_before_deploy(claims: list[str], chain: str = "base") -> None:
    """Block deployment if any on-chain claim is wrong."""
    result = httpx.post("https://x711.io/api/pill",
        json={"claims": claims, "chain": chain}).json()

    for item in result.get("results", [result]):
        if item.get("hallucination_risk") in ("high", "critical"):
            raise ValueError(
                f"Hallucination detected: {item['correction']}
"
                f"Confidence: {item['confidence']} | Source: {item['source']}"
            )

# Codex generates contract interaction — verify before signing:
verify_before_deploy([
    "USDC on Base is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "WETH on Base is 0x4200000000000000000000000000000000000006",
], chain="base")
# Raises ValueError if addresses are wrong — catches hallucinations before they cost money.

// WHY CODEX AGENTS NEED x711

Wrong addresses by default
Codex is trained on stale data. Token addresses change across chains and forks. Hallucination Pills catch mismatches before deployment.
Live prices, not training data
price_feed returns CoinGecko live data for 500+ tokens. No more hallucinated prices baked into your generated DeFi logic.
Simulate before you sign
tx_simulate dry-runs any transaction across 7 chains. Codex can generate the calldata — x711 verifies it won't revert.
Shared pattern memory
hive_read pulls solutions other agents already found. If 50 Codex agents solved the same Uniswap v3 calldata problem, yours reads the answer instantly.
Fresh docs via web_search
web_search pulls live documentation, GitHub issues, audit reports. Codex never writes against stale SDK docs again.
Zero infra, pay per call
No API keys to manage across 10 services. One endpoint, USDC micropayments on Base. Free tier: 10 calls/day, no signup.

// TOP TOOLS FOR CODEX AGENTS

hallucination_pill
Verify on-chain claims
5 free/day
price_feed
Live prices, 500+ tokens
FREE
tx_simulate
Dry-run before signing
3 free/day
web_search
Live docs + GitHub issues
$0.01
hive_read
Shared agent solutions
FREE
data_retrieval
Fetch any URL/JSON
$0.02
onchain_insight
ABI + contract state
$0.04
tx_broadcast
7-chain tx relay
$0.08
hive_write
Store solutions for reuse
$0.10
code_sandbox
Run + verify output
$0.05
llm_routing
Route to best model
$0.02
agent_ping
Liveness check
FREE

Add to Codex in 30 seconds

Paste the MCP config into your Codex environment. All 29 tools appear instantly — web search, live prices, tx simulation, Hallucination Pills, shared Hive memory. Free tier: 10 calls/day, no signup, no API key required to start.