# pgalyen1987/gate402-mcp [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/pgalyen1987/gate402-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 489  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pgalyen1987-gate402-mcp

## Description
Pay-per-call agent APIs over x402 (USDC on Base): per-token LLM inference (Llama 3.1/Qwen/Mistral), per-second GPU/CPU compute, on-chain/DeFi + SEC-EDGAR + news data, and clean-Markdown/Cloudflare-stealth web scraping. Signed receipts, no signup — auto-claims a free-tier key. Install via npx -y gate402-mcp.

## Tools
Capabilities this server exposes over MCP:

- **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.
- **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).
- **gate402_minify** — Compress text to cut downstream LLM token spend (~40%): strips filler, collapses JSON, densifies prose. Pay-per-call ($0.005/10k tokens).
- **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).
- **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).
- **gate402_dex** — Live DEX price, liquidity, and 24h volume for a Base token across its trading pairs. Pay-per-call ($0.01).
- **gate402_news** — Recent news headlines + heuristic bull/bear sentiment for a ticker, company, or topic. Pay-per-call ($0.02).
- **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).
- **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).
- **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).
- **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).
- **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).
- **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.
- **gate402_compute** — Rent metered GPU/CPU compute to run a container job, paid per-second via Gate402 over x402. Scheduling prefers nodes with the model already warm; returns logs + a signed, verifiable execution receipt. Free tier on first runs.
- **gate402_token_count** — FREE. Estimate the token count of a string (cl100k/o200k tokenizer). Use to budget context windows. No payment required.
- **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.
- **gate402_json_repair** — FREE. Coerce malformed / LLM-mangled JSON (trailing commas, single quotes, unquoted keys) into valid JSON. No payment required.
- **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.
- **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.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gate402-mcp": {
    "command": "npx",
    "args": ["-y","gate402-mcp"],
    "env": {
      "GATE402_API_KEY": "",
      "GATE402_BASE_URL": "",
      "GATE402_CONFIG_DIR": ""
    }
  }
}
```

**Requires environment variables:** `GATE402_API_KEY`, `GATE402_BASE_URL`, `GATE402_CONFIG_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What pgalyen1987/gate402-mcp MCP server does

pgalyen1987/gate402-mcp MCP server connects an MCP client to Gate402, a collection of HTTP 402 payment-enabled APIs using x402 and USDC on Base. Its tools span four main areas: web content, data research, blockchain and trading analysis, and compute or inference.

Web tools can fetch public pages, render client-side JavaScript, remove navigation and advertising, and return Markdown suitable for an LLM. A stealth scraper is available for pages that resist the regular fetcher. Local utilities count tokens, convert supplied HTML to Markdown, repair malformed JSON, and reduce text size before downstream inference.

The data tools query Base wallet and token information, DEX prices and liquidity, recent news, and SEC EDGAR filings. Token-focused tools provide risk classifications, momentum and order-flow signals, launch discovery, and best-execution information across pools.

## How it works

The server runs as a standard stdio MCP process. An MCP client starts it with `npx -y gate402-mcp`, then exposes its tools to an agent. On first use, the process claims a free-credit API key and stores it under `~/.gate402-mcp/key.json` by default. Paid calls consume that credit and return a top-up link when the balance is exhausted.

Set `GATE402_API_KEY` to use a funded account instead of the free tier. Payment acts as authentication, so no separate account creation is described. Most remote tools charge per call, while the token counter, HTML converter, and JSON repair tool run locally without payment or network access. Inference is billed according to actual token usage, and compute returns a signed execution receipt. Marketplace inference is separate: it settles on-chain per call and requires an x402 payment client rather than the free-tier key.

## Setup and configuration

Install globally with `npm install -g gate402-mcp`, or run it directly with `npx -y gate402-mcp`. Configure the command and arguments in an MCP client such as Claude Desktop, Claude Code, Cursor, Cline, or Windsurf. Agent frameworks with MCP adapters can also load the stdio server.

The documented variables are `GATE402_API_KEY` for a funded account, `GATE402_BASE_URL` to override the default Gate402 gateway, and `GATE402_CONFIG_DIR` to change where the cached key is stored. The default gateway is `https://gate402.app`, and the default configuration directory is `~/.gate402-mcp`.

## Tools and capabilities

pgalyen1987/gate402-mcp MCP server provides paid tools for scraping, stealth scraping, minification, semantic deduplication, Base intelligence, DEX data, news, EDGAR filings, token risk, momentum, swap analysis, launches, model inference, and container compute.

Its free local tools are `gate402_token_count`, `gate402_html_to_md`, and `gate402_json_repair`. The marketplace tools add provider discovery, marketplace inference, and provider registration. `gate402_become_provider` returns a signable EIP-191 message and registration request for a provider listing; the material states that providers keep 85% of each call, paid in USDC on Base.

## Limitations and notes

`gate402_compute` is listed as unavailable until a compute provider is connected and returns HTTP 503 in that state. Paid tools have per-call or per-token charges, so agents should budget usage and can use the local token counter before inference. The regular scraper is intended for public URLs; the stealth scraper is the fallback for JavaScript-heavy or lightly protected pages.

The server does not eliminate payment requirements. The free tier applies to first runs and can be replaced with a funded API key, while marketplace inference needs an x402-capable payment client. The repository is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/pgalyen1987-gate402-mcp/readme_

