gate402-mcp

v0.8.1
io.github.pgalyen1987/gate402-mcp Checked 2 days ago Published 2 months ago

x402 pay-per-call agent APIs: LLM inference, Base trading data, SEC filings & scraping

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gate402_scrape

Fetch any public URL, render client-side JS, strip nav/ads, and return clean LLM-ready Markdown. Pay-per-call ($0.002) via Gate402; free tier on first runs.

ParameterTypeDescription
url *stringPublic URL to fetch and convert to Markdown.

gate402_scrape_stealth

Hardened headless fetch for JS-heavy or lightly bot-protected pages. Use when gate402_scrape is blocked or returns little content. Pay-per-call ($0.05).

ParameterTypeDescription
url *stringProtected URL to scrape.

gate402_minify

Compress text to cut downstream LLM token spend (~40%): strips filler, collapses JSON, densifies prose. Pay-per-call ($0.005/10k tokens).

ParameterTypeDescription
text *stringText to compress.
aggressivebooleanCompress harder at some fidelity cost.
formatstringHint for the compressor (default auto).

gate402_dedup

Semantic vector-cache lookup: exact-match then 0.88 cosine similarity. Returns a cache hit/miss for a query, sub-10ms. Pay-per-call ($0.001 hit / $0.003 miss).

ParameterTypeDescription
query *stringText to look up in the cache.
namespacestringOptional cache namespace.
storeOnMissbooleanStore the query on a miss for future hits.
vectorarrayOptional embedding to store on a miss.

gate402_onchain

On-chain wallet & token intelligence on Base: native ETH + ERC-20 balances, EOA/contract detection, tx count, and token metadata. Pay-per-call ($0.01).

ParameterTypeDescription
address *stringBase address — a wallet or an ERC-20 token contract (0x-hex).
tokensarrayOptional extra ERC-20 contract addresses to check balances for.

gate402_dex

Live DEX price, liquidity, and 24h volume for a Base token across its trading pairs. Pay-per-call ($0.01).

ParameterTypeDescription
address *stringBase ERC-20 token contract address (0x-hex).

gate402_news

Recent news headlines + heuristic bull/bear sentiment for a ticker, company, or topic. Pay-per-call ($0.02).

ParameterTypeDescription
query *stringTicker, company, or topic (e.g. "NVDA", "ethereum ETF").
limitnumberMax headlines (1–25, default 10).

gate402_edgar

Latest SEC EDGAR filings (10-K/10-Q/8-K) for a US ticker or CIK, with direct document links. Pay-per-call ($0.02).

ParameterTypeDescription
cikstringSEC CIK number (alternative to ticker).
formstringOptional filing-type filter, e.g. "10-K", "8-K".
limitnumberMax filings (1–40, default 10).
tickerstringUS stock ticker, e.g. AAPL (ticker or cik required).

gate402_token_risk

Rug/tradeability risk VERDICT for a Base token: a 0-100 score and SAFE/CAUTION/AVOID from liquidity depth, a live honeypot/sell-tax sim, holder concentration, DEX diversity, and pool age. The pre-trade safety check. Pay-per-call ($0.03).

ParameterTypeDescription
address *stringBase ERC-20 token contract address (0x-hex).

gate402_momentum

Factual momentum + order-flow signal for a Base token: price trend (5m-24h), buy/sell pressure, volume trend, classified RISING/FALLING/FLAT + ACCUMULATION/DISTRIBUTION and honeypot-gated. The read, not a prediction. Pay-per-call ($0.02).

ParameterTypeDescription
address *stringBase ERC-20 token contract address (0x-hex).

gate402_best_swap

Best-execution intel for a Base token: which DEX pool to trade on and the estimated price impact + total cost for a given trade size, ranked across pools with a split suggestion. Pay-per-call ($0.02).

ParameterTypeDescription
address *stringBase ERC-20 token contract address (0x-hex).
sizeUsdnumberTrade size in USD (default 1000).

gate402_launches

Radar of the freshest Base token launches (newest DEX pools), lightly pre-screened by liquidity/age/flow. Top-of-funnel discovery — pair with gate402_token_risk, gate402_momentum, gate402_best_swap. Pay-per-call ($0.02).

ParameterTypeDescription
limitnumberMax launches to return (default 15, cap 30).
minLiquidityUsdnumberMinimum pool liquidity to include (default 1000).

gate402_infer

Run open-model LLM inference (Llama 3.1 8B/70B, Qwen 2.5, Mistral) and get a completion, paid per-token via Gate402 over x402. Prepay is on prompt + max_tokens; you are billed on actual token usage with the rest credited, and get a signed usage receipt. Free tier on first runs.

ParameterTypeDescription
prompt *stringThe user prompt / question.
max_tokensnumberMax completion tokens (default 512, cap 2048). Prepaid; unused is credited.
modelstringOpen model to run (default llama-3.1-8b).
systemstringOptional system instruction.

gate402_compute

Not available yet: the compute rail answers 503 (no worker connected) until a provider joins. When live: metered GPU/CPU compute for a container job, paid per-second via Gate402 over x402, with logs and a signed execution receipt. For models today, use gate402_infer.

ParameterTypeDescription
durationSec *numberMax wall-seconds to pre-pay for; unused time is refunded as credit.
gpu *stringGPU/CPU class to rent.
image *stringOCI container image to run (its entrypoint is the job).
cmdarrayOptional command override.
modelstringOptional model id; scheduling prefers nodes with it already warm.

gate402_token_count

FREE. Estimate the token count of a string (cl100k/o200k tokenizer). Use to budget context windows. No payment required.

ParameterTypeDescription
text *stringText to count tokens for.

gate402_html_to_md

FREE. Convert an HTML string you already have into clean Markdown. (To FETCH a live page instead, use gate402_scrape.) No payment required.

ParameterTypeDescription
html *stringHTML to convert to Markdown.

gate402_json_repair

FREE. Coerce malformed / LLM-mangled JSON (trailing commas, single quotes, unquoted keys) into valid JSON. No payment required.

ParameterTypeDescription
text *stringBroken JSON string to repair.

gate402_market_infer

Run LLM inference through the Gate402 GPU marketplace — routed to the cheapest healthy third-party provider, with escrow-on-success (you are only charged if the provider delivers). x402-native: it settles on-chain per call, so it needs an x402 payment client — the free-tier key does NOT pay the marketplace. Browse available supply/models/prices first with gate402_providers.

ParameterTypeDescription
model *stringA model offered by an active provider (see gate402_providers).
prompt *stringThe user prompt / question.
max_tokensnumberMax completion tokens.
systemstringOptional system instruction.

gate402_providers

FREE. Browse the Gate402 GPU marketplace: list active third-party compute/inference providers with their model, per-call price (USDC), and reliability. Use to find supply before gate402_market_infer, or to check your own listing. No payment required.

gate402_become_provider

FREE. Get the exact steps to LIST your own GPU/compute as a Gate402 provider and earn per call — you keep 85%, paid out on-chain in USDC on Base (escrow-on-success). Pass your { endpointUrl, payoutWallet, model, priceUsdc } and it returns the EIP-191 message to sign with that wallet plus the ready-to-send registration request. No payment required.

ParameterTypeDescription
endpointUrlstringYour OpenAI-compatible endpoint base URL, e.g. https://host/v1
modelstringThe model id you serve (e.g. llama-3.1-8b).
payoutWalletstringBase wallet address to receive payouts (0x…).
priceUsdcnumberYour price per call in USDC.