{
  "$schema": "https://modelcontextprotocol.io/schemas/mcp.json",
  "name": "grid402-mcp",
  "version": "1.8.2",
  "description": "Official Grid402 MCP Server - Verifiable Data and HTTP x402 Payment Layer for Autonomous AI Agents on Base Mainnet (24 tools with ECDSA secp256k1 Oracle Proof).",
  "instructions": "Use free tools first (grid402_summary, grid402_pass_balance, grid402_verify). Prefer composite bundles (grid402_domain_audit, grid402_kyb_audit, grid402_market_snapshot) to minimize cost and roundtrips. Set GRID402_SANDBOX=true (X-Payment: demo, 5 req/hour/IP) for testing, GRID402_SESSION_PASS for sub-15ms prepaid calls, or GRID402_PRIVATE_KEY with a low-balance operational Base wallet for automatic x402 settlement.",
  "homepage": "https://grid402.online",
  "repository": "https://github.com/oliveiratc/Grid402",
  "payment": {
    "protocol": "x402",
    "version": 2,
    "network": "eip155:8453",
    "chain_id": 8453,
    "token": "USDC",
    "token_contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "recipient": "0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90"
  },
  "tools": [
    {
      "name": "grid402_summary",
      "description": "Checks operational health, 30-day uptime and service status across all 22 Grid402 microservices (free, no x402 charge).",
      "cost_usdc": "0.0000",
      "endpoint": "https://grid402.online/status",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "grid402_forex",
      "description": "Queries official real-time FX rates for USD, EUR and GBP against BRL with daily change (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/forex",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "grid402_crypto",
      "description": "Queries real-time spot prices for BTC, ETH, SOL, USDC and BASE in USD and BRL (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/crypto",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "grid402_dns",
      "description": "Resolves authoritative DNS records (A, AAAA, MX, TXT, NS, CNAME) for any domain (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/dns",
      "inputSchema": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "Domain name to query (e.g., base.org)"
          }
        },
        "required": ["domain"]
      }
    },
    {
      "name": "grid402_ssl",
      "description": "Inspects port 443 TLS/SSL certificates, issuer, SANs, cipher suite and remaining days (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/ssl",
      "inputSchema": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "Hostname or IP address for TLS audit (e.g., base.org)"
          }
        },
        "required": ["host"]
      }
    },
    {
      "name": "grid402_asn",
      "description": "Resolves BGP routing intelligence, ASN number, CIDR allocation block and country for an IP (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/asn",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "IPv4 or IPv6 address (e.g., 1.1.1.1)"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_domain_audit",
      "description": "Composite single-call domain infrastructure bundle: authoritative DNS + TLS/SSL + BGP/ASN with risk score (0.0150 USDC / 3 credits).",
      "cost_usdc": "0.0150",
      "endpoint": "https://grid402.online/api/v1/domain-audit",
      "inputSchema": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "Target domain for full audit (e.g., base.org)"
          }
        },
        "required": ["domain"]
      }
    },
    {
      "name": "grid402_kyb_audit",
      "description": "Composite single-call corporate KYB dossier: CNPJ + Simples/MEI + CGU Sanctions + Compliance Score 360 (0.0200 USDC / 4 credits).",
      "cost_usdc": "0.0200",
      "endpoint": "https://grid402.online/api/v1/kyb-audit",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cnpj": {
            "type": "string",
            "description": "14-digit Brazilian CNPJ (e.g., 00000000000191)"
          }
        },
        "required": ["cnpj"]
      }
    },
    {
      "name": "grid402_market_snapshot",
      "description": "Composite single-call macro snapshot: PTAX FX + Spot Crypto + Selic/CDI/IPCA + ANBIMA calendar (0.0150 USDC / 3 credits).",
      "cost_usdc": "0.0150",
      "endpoint": "https://grid402.online/api/v1/market-snapshot",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "grid402_cep",
      "description": "Queries official Brazilian postal address and municipal IBGE code by CEP (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/cep",
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "8-digit Brazilian postal code (e.g., 01310100)"
          }
        },
        "required": ["code"]
      }
    },
    {
      "name": "grid402_cnpj",
      "description": "Queries official Brazilian corporate registry data from Receita Federal without exposing partner PII (0.0200 USDC / 4 credits).",
      "cost_usdc": "0.0200",
      "endpoint": "https://grid402.online/api/v1/cnpj",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cnpj": {
            "type": "string",
            "description": "14-digit corporate CNPJ number (e.g., 00000000000191)"
          }
        },
        "required": ["cnpj"]
      }
    },
    {
      "name": "grid402_indicators",
      "description": "Queries official Brazilian Central Bank and IBGE indicators: Selic target/daily, CDI and IPCA inflation (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/indicators",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "grid402_holidays",
      "description": "Queries the official ANBIMA and Febraban banking holiday calendar for a given year (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/holidays",
      "inputSchema": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "description": "4-digit calendar year (e.g., 2026)"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_workdays",
      "description": "Calculates ANBIMA financial business days between dates or projects D+N maturity dates (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/workdays",
      "inputSchema": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "description": "Start date in YYYY-MM-DD format"
          },
          "end_date": {
            "type": "string",
            "description": "End date in YYYY-MM-DD format"
          },
          "days": {
            "type": "integer",
            "description": "Business days offset for D+N projection"
          },
          "date": {
            "type": "string",
            "description": "Single date in YYYY-MM-DD format to check if workday"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_sanctions",
      "description": "Screens Brazilian federal administrative sanctions and debarment lists CEIS and CNEP from CGU (0.0100 USDC / 2 credits).",
      "cost_usdc": "0.0100",
      "endpoint": "https://grid402.online/api/v1/sanctions",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cnpj": {
            "type": "string",
            "description": "14-digit corporate CNPJ number"
          }
        },
        "required": ["cnpj"]
      }
    },
    {
      "name": "grid402_simples",
      "description": "Queries official Simples Nacional and MEI (SIMEI) tax regime status at Receita Federal (0.0100 USDC / 2 credits).",
      "cost_usdc": "0.0100",
      "endpoint": "https://grid402.online/api/v1/simples",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cnpj": {
            "type": "string",
            "description": "14-digit corporate CNPJ number"
          }
        },
        "required": ["cnpj"]
      }
    },
    {
      "name": "grid402_compliance",
      "description": "Computes consolidated Compliance Score 360 (0-100) cross-referencing Receita Federal and CGU registries (0.0300 USDC / 6 credits).",
      "cost_usdc": "0.0300",
      "endpoint": "https://grid402.online/api/v1/compliance",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cnpj": {
            "type": "string",
            "description": "14-digit corporate CNPJ number"
          }
        },
        "required": ["cnpj"]
      }
    },
    {
      "name": "grid402_lei",
      "description": "Queries global ISO 17442 corporate identity across 200+ jurisdictions via GLEIF CC0 open data (0.0200 USDC / 4 credits).",
      "cost_usdc": "0.0200",
      "endpoint": "https://grid402.online/api/v1/lei",
      "inputSchema": {
        "type": "object",
        "properties": {
          "lei": {
            "type": "string",
            "description": "20-character LEI code (e.g., 5493006MHB84DD0ZWV18) or legal name"
          }
        },
        "required": ["lei"]
      }
    },
    {
      "name": "grid402_ofac",
      "description": "Screens global OFAC SDN / UN sanctions and Base Mainnet Web3 AML telemetry for EVM wallets or entities (0.0200 USDC / 4 credits).",
      "cost_usdc": "0.0200",
      "endpoint": "https://grid402.online/api/v1/ofac",
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "EVM 0x wallet, LEI code or legal entity name"
          }
        },
        "required": ["target"]
      }
    },
    {
      "name": "grid402_notarize",
      "description": "Issues deterministic M2M UTC timestamp and SHA-256 existence proof signed with ECDSA secp256k1 (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/notarize",
      "inputSchema": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Text payload or 64-char SHA-256 hex digest to notarize"
          }
        },
        "required": ["content"]
      }
    },
    {
      "name": "grid402_global_markets",
      "description": "Queries global exchange settlement calendar (US NYSE/Fed, EU TARGET2, UK LSE, BR B3) and 30+ ECB FX rates (0.0050 USDC / 1 credit).",
      "cost_usdc": "0.0050",
      "endpoint": "https://grid402.online/api/v1/global-markets",
      "inputSchema": {
        "type": "object",
        "properties": {
          "market": {
            "type": "string",
            "description": "Market code: US, EU, UK or BR (default: US)"
          },
          "base": {
            "type": "string",
            "description": "Base currency for ECB FX rates (default: USD)"
          },
          "date": {
            "type": "string",
            "description": "Optional date in YYYY-MM-DD format"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_pass",
      "description": "Issues a prepaid x402 Session Pass (Starter 2 USDC = 400 cr, Pro 5 USDC = 1,000 cr, Fleet 20 USDC = 6,000 cr) for sub-15ms M2M calls.",
      "cost_usdc": "2.0000",
      "endpoint": "https://grid402.online/api/v1/pass",
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Optional pass_g402_... token to inspect balance"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_pass_balance",
      "description": "Free real-time check of Session Pass remaining credits, expiry and Spend Controls (daily_credit_limit, allowed_endpoints).",
      "cost_usdc": "0.0000",
      "endpoint": "https://grid402.online/api/v1/pass/balance",
      "inputSchema": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Session Pass token pass_g402_... (or uses GRID402_SESSION_PASS)"
          }
        },
        "required": []
      }
    },
    {
      "name": "grid402_verify",
      "description": "Stateless mathematical verification of Grid402 ECDSA secp256k1 oracle signature (_oracle_proof) on any response (free).",
      "cost_usdc": "0.0000",
      "endpoint": "https://grid402.online/api/v1/verify",
      "inputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "string",
            "description": "Serialized JSON response containing the _oracle_proof block"
          }
        },
        "required": ["payload"]
      }
    }
  ]
}
