Skip to main content
Glama

MSAI Apify M2M Autonomous Gateway

meanusarcanus/apify_m2m_gateway MCP server

An autonomous, machine-to-machine (M2M) monetization gateway powered by the x402 protocol and Base USDC micropayments, wrapping your 17 Apify Scraper Actors into direct revenue streams for AI agents, research swarms, and Claude/Cursor tools.


⚡ Why This Unlocks Immediate Profitability

  1. Bypasses Apify Store Friction: External AI agents (Claude, Cursor, LangChain, Base agents) cannot create an Apify account, verify emails, or input credit cards. This gateway allows them to buy directly via Base USDC micropayments in milliseconds.

  2. Zero Apify 20% Marketplace Fee: 100% of the USDC paid by buyer agents settles directly into your designated crypto wallet.

  3. 80%–95% Net Margins: Running a targeted Apify actor run costs fractions of a cent; you charge $0.005–$0.02 USDC per query.

  4. Instant Distribution via MCP: Includes a Model Context Protocol (MCP) server so users and agents on Claude Desktop and Cursor can invoke all 17 tools directly.


Related MCP server: x402-farm

📋 The 17 Monetized Apify Scrapers

Tool / Actor

Endpoint

Price (USDC on Base)

Best For

Deep Markdown Crawler

POST /api/v1/crawl

$0.010

RAG pipelines, documentation scraping, LLM fine-tuning datasets

Google Search Scraper

POST /api/v1/google/search

$0.005

Real-time agent search grounding & SERP data

Reddit Sentiment Scraper

POST /api/v1/reddit/search

$0.005

Community sentiment, meme discovery, product feedback

TikTok Trends Scraper

POST /api/v1/tiktok/trending

$0.008

Viral sound/hashtag trends and video metrics

YouTube Shorts Scraper

POST /api/v1/youtube/shorts

$0.008

Video transcripts, engagement stats, audio details

Instagram Profile Scraper

POST /api/v1/instagram/profile

$0.008

Public bio, follower count, reels engagement

Autonomous Instagram Poster

POST /api/v1/instagram/publish

$0.015

Autonomous agent social publishing

B2B Lead Enricher

POST /api/v1/b2b/leads

$0.020

Executive contact details, verified domains, tech stacks

LinkedIn Company Scraper

POST /api/v1/linkedin/company

$0.020

Headcount growth, company hiring intelligence

Amazon Bestsellers Scraper

POST /api/v1/amazon/bestsellers

$0.010

E-commerce bestseller ranking & price monitoring

E-Commerce Price Tracker

POST /api/v1/ecommerce/track-price

$0.010

Multi-retailer product price alerts

Shopee Scraper

POST /api/v1/shopee/search

$0.010

Southeast Asia product reviews and listings

Phone Validator & Carrier

POST /api/v1/phone/validate

$0.002

E.164 phone verification & carrier type

GitHub Intelligence

POST /api/v1/github/analyze

$0.010

Repository velocity, PR health, developer stats

Google Maps Places Scraper

POST /api/v1/maps/places

$0.015

Local business directories, ratings, addresses

SmartScrape AI Extractor

POST /api/v1/scrape/smart

$0.010

Schema-guided AI web extraction

Review Sentiment Analyzer

POST /api/v1/reviews/analyze

$0.005

Feature extraction & sentiment breakdown


🛠️ Configuration (.env)

Copy .env.example to .env and set your credentials:

# Your live Apify API Token (found in Apify Console -> Settings -> Integrations)
APIFY_API_TOKEN=apify_api_...

# Your Base wallet address where USDC earnings will accrue
MERCHANT_WALLET_ADDRESS=0xYourMerchantBaseWalletAddress

# Server Port (default 3000)
PORT=3000

🚀 Running the Gateway

# 1. Start the x402 HTTP Gateway Server
bun run src/server.ts

# 2. View the machine-readable catalog
curl http://localhost:3000/api/v1/catalog

🤖 Model Context Protocol (MCP) Integration for Claude / Cursor

To make your 17 scrapers available to Claude Desktop, add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "msai-scrapers": {
      "command": "bun",
      "args": ["run", "/home/theo/Webpage/Projects/MSAI/apify_m2m_gateway/src/mcp-server.ts"],
      "env": {
        "APIFY_API_TOKEN": "your_apify_token_here"
      }
    }
  }
}

🧪 Testing & Verification

Run the automated test suite:

bun test

Run the autonomous agent buyer demonstration:

bun run demo

Available Tools

17 tools
amazon_bestsellersA

Amazon Bestsellers & Category Scraper: Trigger: Call this tool when an agent monitors product trends, sales rankings, or pricing across Amazon retail categories. Input: 'category' (string category name, e.g. electronics). Output: ranked bestseller items with prices, ratings, and sales ranks. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: category.

b2b_lead_enricherA

B2B Lead Intelligence & Enricher: Trigger: Call this tool when an agent needs verified executive contacts, company headcount, LinkedIn URLs, and tech stack details for a corporate domain. Input: 'domain' (required string domain, e.g. stripe.com). Output: enriched company dossier and decision-makers. (x402 M2M Cost: 0.02 USDC on Base)

Inputs: domain.

ecommerce_price_trackerA

Multi-Retailer E-Commerce Price Tracker: Trigger: Call this tool when an agent needs to monitor real-time stock and product pricing on any e-commerce URL. Input: 'url' (required product URL). Output: parsed price, currency, availability, and discount percentage. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: url.

github_intelligenceA

GitHub Repository & Developer Intelligence: Trigger: Call this tool when an agent evaluates open-source repository velocity, PR merge speeds, contributor activity, or issue volume. Input: 'repo' (string owner/repo, e.g. facebook/react). Output: developer activity metrics and repository health score. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: repo.

gmaps_scraper_aiA

Google Maps Local Business & Reviews Scraper: Trigger: Call this tool when an agent searches for local physical businesses, addresses, ratings, and phone numbers via Google Maps. Input: 'query' (search string, e.g. coffee shops in Austin), 'limit' (integer, default 10). Output: structured places with coordinates, phones, and star ratings. (x402 M2M Cost: 0.015 USDC on Base)

Inputs: limit, query.

instagram_posterA

Autonomous Instagram Poster: Trigger: Call this tool when an autonomous agent needs to publish an image, carousel, or caption directly to an Instagram account. Input: 'caption' (string post caption), 'imageUrl' (optional string URL). Output: publish status and post URL. (x402 M2M Cost: 0.015 USDC on Base)

Inputs: caption.

instagram_scraperA

Instagram Profile & Media Scraper: Trigger: Call this tool when an agent needs public Instagram account data, bios, follower statistics, and recent reel engagement. Input: 'username' (string Instagram handle), 'limit' (integer, default 10). Output: profile metadata and recent media items. (x402 M2M Cost: 0.008 USDC on Base)

Inputs: limit, username.

linkedin_scraperA

LinkedIn Company & Hiring Intelligence: Trigger: Call this tool when an agent needs company hiring trends, open job openings, and headcount growth from LinkedIn public profiles. Input: 'companyName' (string company identifier). Output: company overview and active job postings. (x402 M2M Cost: 0.02 USDC on Base)

Inputs: companyName.

markdown_crawlerA

Deep Website to Markdown Crawler: Trigger: Call this tool when an agent needs to scrape or crawl full web pages, documentation sites, or sitemaps into clean, ad-free Markdown for LLM synthesis and RAG. Input: 'url' (required string URL), 'maxPages' (optional integer, default 1). Output: clean Markdown with word and token counts. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: url, maxPages.

phone_validatorA

Global Phone Number Validator & Carrier Lookup: Trigger: Call this tool when an agent validates international phone numbers, checks validity, formats to E.164, and determines line carrier and VoIP type. Input: 'phone' (string international phone number). Output: validity status, country code, carrier name, and line type. (x402 M2M Cost: 0.002 USDC on Base)

Inputs: phone.

reddit_scraperA

Reddit Community & Sentiment Scraper: Trigger: Call this tool when an agent needs authentic community discussions, sentiment analysis, product feedback, or user complaints from Reddit. Input: 'subreddit' (string subreddit name), 'limit' (integer post count, default 20). Output: structured posts with titles, authors, upvotes, and comment counts. (x402 M2M Cost: 0.005 USDC on Base)

Inputs: limit, subreddit.

review_analyzerA

AI Product Review Sentiment & Feature Extractor: Trigger: Call this tool when an agent needs structured sentiment breakdown and feature pros/cons extracted from raw customer feedback. Input: 'reviews' (array of review text strings). Output: positive/negative sentiment percentages and categorized product attributes. (x402 M2M Cost: 0.005 USDC on Base)

Inputs: reviews.

shopee_scraperA

Shopee Southeast Asia E-Commerce Scraper: Trigger: Call this tool when an agent needs product search results and buyer reviews from Southeast Asian Shopee marketplaces. Input: 'keyword' (search string), 'limit' (integer, default 20). Output: item titles, prices, ratings, and sold counts. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: limit, keyword.

smartscrape_aiA

SmartScrape AI Universal Field Extractor: Trigger: Call this tool when an agent needs custom JSON extraction from an arbitrary webpage using AI schema parsing. Input: 'url' (target URL), 'schema' (JSON schema defining desired fields). Output: strictly typed JSON matching requested schema. (x402 M2M Cost: 0.01 USDC on Base)

Inputs: url, schema.

tiktok_scraperA

TikTok Trends & Video Scraper: Trigger: Call this tool when an agent needs viral video trends, hashtag metrics, or creator engagement stats from TikTok. Input: 'tag' (string hashtag keyword), 'limit' (integer, default 15). Output: video IDs, captions, views, likes, and creator handles. (x402 M2M Cost: 0.008 USDC on Base)

Inputs: tag, limit.

youtube_shortsA

YouTube Shorts & Transcript Scraper: Trigger: Call this tool when an agent needs video transcripts, metadata, view counts, and audio info from short-form YouTube videos. Input: 'query' (search string), 'limit' (integer, default 10). Output: structured video details and full spoken transcripts. (x402 M2M Cost: 0.008 USDC on Base)

Inputs: limit, query.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools target a clearly distinct platform or action (Reddit, TikTok, Amazon, Shopee, Google Maps, GitHub, etc.), so selection is generally clear. Minor overlap exists between generic web extractors (markdown_crawler vs. smartscrape_ai) and between LinkedIn company data and B2B lead enrichment, but descriptions distinguish them by output.

    Naming Consistency4/5

    All names use snake_case and combine a platform/source with a descriptive function noun (e.g., reddit_scraper, phone_validator, review_analyzer), so they are readable and mostly predictable. There is some suffix variation (_scraper, _intelligence, _ai) and no strict verb_noun convention, but no chaotic mixing.

    Tool Count4/5

    17 tools is slightly above the typical 3-15 range but reasonable for a multi-platform scraping gateway where each platform integration is a distinct capability. The count does not feel bloated, though generic web-extraction overlap adds a little redundancy.

    Completeness4/5

    The surface covers a broad set of scraping/enrichment domains—web, search, social, e-commerce, local, GitHub, B2B, phone validation, and review analysis—with an Instagram posting action. Obvious gaps remain for major platforms like X/Twitter or Facebook scraping and for posting beyond Instagram, but agents can partially work around these via generic scraping tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to autonomously request services from other specialized agents and compensate them via x402 micropayments. Demonstrates a Machine-to-Machine economy using A2A protocol for agent communication, MCP for context management, and blockchain-based payments on Base network.
      2
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server providing 10 pay-per-call APIs for web scraping, DNS, email validation, and French business data, with autonomous micropayments via the x402 protocol (USDC on Base).
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A small, autonomous, pay-per-call MCP server that AI agents discover and pay for per call, with revenue landing directly in a USDC wallet on Base via the x402 payment protocol.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing 11 pay-per-call web intelligence tools (page reading, PDF extraction, RSS parsing, screenshots, summarization, structured data extraction) for AI agents, paid automatically in USDC via the x402 protocol on Base mainnet with no API keys required.
      39 npm
      MIT