Back to Browse

Langchain X402 MCP Server

Search & WebUse Caution1.2MCP RegistryLocalRemote
Free

Server data from the Official MCP Registry

Autonomous HTTP 402 Web Scraping Mesh on Base for $0.02 USDC.

About

Autonomous HTTP 402 Web Scraping Mesh on Base for $0.02 USDC.

Remote endpoints: streamable-http: https://your-domain.com/mcp.json

Security Report

1.2
Use Caution1.2Critical Risk

This MCP server implements an HTTP 402 web scraping service with autonomous blockchain-based payment handling. Critical security issues include hardcoded private key handling in production code, unsanitized shell command execution in batch processing, and unvalidated user-supplied URLs passed to external APIs. The server automatically executes blockchain transactions based on API responses without sufficient validation, creating financial and operational risks. Supply chain analysis found 11 known vulnerabilities in dependencies (1 critical, 2 high severity).

8 files analyzed · 24 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

process_spawn

Check that this permission is expected for this type of plugin.

How to Install & Connect

Available as Local & Remote

This plugin can run on your machine or connect to a hosted endpoint. during install.

Documentation

View on GitHub

From the project's GitHub README.

@ihentrel/x402-scraper-langchain

npm version License: MIT Network

Protocol-native web scraping utility tool engineered for autonomous AI agents, powered by Coinbase AgentKit, LangChain, and x402 on-chain micro-settlements.


Key Features & Strategic Positioning

  • Zero API Keys Required: Agents discover, pay, and execute scraping requests mid-task without unhandled API key exceptions or rate limits.
  • Predictable Operational Cost: Flat $0.02 USDC/request settlement on Base, offering a transparent OpEx alternative to dynamic per-gigabyte proxy services.
  • Token-Optimized Markdown: HTML, navigation boilerplate, and DOM elements are automatically stripped into clean, token-dense Markdown to reduce LLM context window costs.
  • Asynchronous Queue Resilience: Underpinned by a decoupled better-sqlite3 queue and PM2 worker mesh to prevent payload failures under high concurrency.
  • Ecosystem Ready: Native support for Model Context Protocol (MCP) manifests (/mcp.json) and ERC-8004 identity registration on Base.

Quickstart

1. Installation

npm install @ihentrel/x402-scraper-langchain @coinbase/agentkit @langchain/openai

2. Basic Agent Usage

import { AgentKit, ViemWalletProvider, walletActionProvider } from "@coinbase/agentkit";
import { getLangChainTools } from "@coinbase/agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { x402ActionProvider } from "@ihentrel/x402-scraper-langchain";

async function main() {
  const agentKit = await AgentKit.from({
    actionProviders: [walletActionProvider(), x402ActionProvider()],
  });

  const tools = await getLangChainTools(agentKit);
  const agent = createReactAgent({
    llm: new ChatOpenAI({ modelName: "gpt-4o-mini" }),
    tools,
  });

  const response = await agent.invoke({
    messages: [
      {
        role: "user",
        content: "Use the x402 scraper tool to fetch data from https://api.example.com/x402-resource",
      },
    ],
  });

  console.log(response.messages[response.messages.length - 1].content);
}

main();

Model Context Protocol (MCP) Integration

For drop-in compatibility with MCP clients (e.g., Claude Desktop, Cursor, CrewAI):

{
  "mcpServers": {
    "x402-scraper": {
      "url": "https://raw.githubusercontent.com/ihen404/langchain-x402/main/mcp.json"
    }
  }
}

On-Chain Verification

  • Network: Base Mainnet / Base Sepolia
  • Protocol Standard: ERC-8004 Agent Identity
  • Settlement Asset: USDC ($0.02 / request)

License

MIT © Ike Ambrose Hentrel II

Reviews

No reviews yet

Be the first to review this server!