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.

๐ŸŒ Social & Ecosystem Showcase

Autonomous HTTP 402 Web Scraping Mesh on Base
Enables AI agents to pay $0.02 USDC per request for clean, LLM-ready markdown using machine-to-machine micro-settlements.

โšก Quick Links

  • NPM Package: @ihentrel/x402-express
  • Agent Discovery (MCP): https://your-domain.com/mcp.json
  • OpenAPI Specs: https://your-domain.com/openapi.json

๐Ÿ“ข Share & Connect

Building with autonomous agents or @base? Tag us on X/socials when integrating:

  • X (Twitter): Mention @base and @CoinbaseDev with #BuildOnBase #AI #x402
  • Supported Frameworks: LangChain, AutoGen, CrewAI, and MCP-compatible clients.

ihen404-x402-langchain

LangChain integration tool for HTTP 402 Paywalled Web Scraping powered by Base USDC micro-payments.

Designed specifically for Autonomous AI Agents, trading bots, and market research agents that require programmatic, pay-per-request web access without credit cards or monthly API subscriptions.


Features

  • Native LangChain Tool Integration: Drop-in X402WebScraperTool for LangChain, LangGraph, and CrewAI agents.
  • Automated HTTP 402 Settlement: Automatically handles $0.005 Base USDC micro-payment challenges via X-Payment headers.
  • Zero Friction for AI Agents: Autonomous agents sign and settle transactions directly on Base L2 in milliseconds.

Installation

pip install ihen404-x402-langchain

Quickstart

import os
from langchain_x402 import X402WebScraperTool
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI

# Initialize the 402-capable web scraper tool
scraper_tool = X402WebScraperTool(
    wallet_private_key=os.getenv("BASE_WALLET_PRIVATE_KEY"),
    rpc_url="[https://mainnet.base.org](https://mainnet.base.org)",
    max_price_per_scrape="0.005"  # Max USDC spend per request
)

llm = ChatOpenAI(model="gpt-4o", temperature=0)
agent = initialize_agent(
    tools=[scraper_tool],
    llm=llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)

# Agent autonomously handles HTTP 402 payment challenge if paywalled
response = agent.run("Fetch data from [https://api.x402service.com/scrape?url=https://example.com](https://api.x402service.com/scrape?url=https://example.com)")
print(response)

Pricing Structure

ActionCostSettlement Network
Standard Web Scrape$0.005 USDCBase (L2)
Failed Request$0.000 USDCN/A

License

MIT License. Developed by @ihen404.

๐ŸŒ Social & Ecosystem Showcase

Autonomous HTTP 402 Web Scraping Mesh on Base
Enables AI agents to pay $0.02 USDC per request for clean, LLM-ready markdown using machine-to-machine micro-settlements.

โšก Quick Links

  • NPM Package: @ihentrel/x402-express
  • Agent Discovery (MCP): https://your-domain.com/mcp.json
  • OpenAPI Specs: https://your-domain.com/openapi.json

๐Ÿ“ข Share & Connect

Building with autonomous agents or @base? Tag us on X/socials when integrating:

  • X (Twitter): Mention @base and @CoinbaseDev with #BuildOnBase #AI #x402
  • Supported Frameworks: LangChain, AutoGen, CrewAI, and MCP-compatible clients.

Reviews

No reviews yet

Be the first to review this server!