warppay402-mcp 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: warppay402-mcp
3
+ Version: 1.1.0
4
+ Summary: LangChain and CrewAI tool wrappers for WarpPay402 x402 micropayment APIs
5
+ Description-Content-Type: text/markdown
6
+ Requires-Dist: requests>=2.28.0
7
+ Requires-Dist: langchain-core>=0.1.0
8
+ Dynamic: description
9
+ Dynamic: description-content-type
10
+ Dynamic: requires-dist
11
+ Dynamic: summary
12
+
13
+ # warppay402-mcp
14
+
15
+ LangChain and CrewAI native `BaseTool` wrappers for WarpPay402 x402 micropayment APIs.
16
+
17
+ ## Overview
18
+
19
+ This package provides a toolkit of agent-ready tools for on-chain analytics, web extraction, automation, and DeFi actions. The tools are implemented in `warppay402_mcp.tools` and use the WarpPay402 API endpoints under `https://api.warppay402.com/api/v1/tools`.
20
+
21
+ ## Accepted payment options
22
+
23
+ The WarpPay402 server accepts the following payment methods for tool usage:
24
+
25
+ - Base USDC
26
+ - Arbitrum One USDC
27
+ - Solana USDC
28
+ - Arc USDC
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install warppay402-mcp
34
+ ```
35
+
36
+ If you want to run the LangChain/OpenAI example below, install the optional integration package:
37
+
38
+ ```bash
39
+ pip install langchain-openai
40
+ ```
41
+
42
+ ## Available tools
43
+
44
+ The package currently includes these tools:
45
+
46
+ | Tool | Server capability | Typical call signature |
47
+ | --- | --- | --- |
48
+ | `ArcDexOracleTool` | Arc DEX spot price & liquidity oracle | `run(pair="ETH/USDC")` |
49
+ | `WebScraperTool` | Public webpage to Markdown extraction | `run(url)` |
50
+ | `BrowserScraperTool` | JS-rendered page scraping via browser | `run(url)` |
51
+ | `BaseAnalyticsTool` | Wallet balance / nonce / account stats on Base | `run(address)` |
52
+ | `ArcAnalyticsTool` | Arc network block / gas / latency telemetry | `run()` |
53
+ | `ArcNetworkQueryTool` | Pre-flight Arc node + gas + merchant checks | `run(includeGasTrends=True, checkMerchantAccount=True)` |
54
+ | `PdfExtractorTool` | Public PDF text extraction | `run(pdfUrl)` |
55
+ | `RenderScreenshotTool` | Full-page screenshot capture | `run(url)` |
56
+ | `ExtractJsonTool` | Schema-driven JSON extraction from HTML | `run(url, schema=None)` |
57
+ | `SmartContractVerifierTool` | Contract source / ABI / proxy verification | `run(address)` |
58
+ | `AerodromeYieldsTool` | Top yield pools and APY data | `run()` |
59
+ | `AerodromeSwapTool` | Aerodrome router token swap execution | `run(tokenIn, tokenOut, amountIn, decimalsIn, isStable)` |
60
+ | `AerodromeClammTool` | Constrained liquidity range actions | `run(action, token0=None, token1=None, tickLower=None, tickUpper=None, amount0Desired=None, amount1Desired=None, tokenId=None)` |
61
+ | `AerodromeVeaeroTool` | Lock / vote / claim AERO governance actions | `run(action, amount=None, lockDurationWeeks=None, tokenId=None, poolVoteAddresses=None)` |
62
+ | `DeployBaseContractTool` | Deploy contracts on Base | `run(contractType="escrow")` |
63
+ | `DeploySolanaContractTool` | Deploy Solana contracts / vaults | `run(contractType, params)` |
64
+ | `DeployArcContractTool` | Deploy contracts on Arc | `run(contractType="escrow")` |
65
+ | `ArcCctpBridgeTool` | Cross-chain USDC bridge via CCTP | `run(amountUsdc, destinationChain, recipientAddress)` |
66
+ | `PublicDataFeedTool` | Signed public data feed retrieval | `run(filename)` |
67
+ | `DataFeedsTool` | Market / yield feed retrieval | `run(feedId)` |
68
+
69
+ This table is meant to make it easy for developers to point agents at the right server capability and to understand the expected inputs before invoking a tool.
70
+
71
+ ## Quickstart
72
+
73
+ ### Direct tool usage
74
+
75
+ ```python
76
+ from warppay402_mcp.tools import ArcDexOracleTool, AerodromeYieldsTool, WebScraperTool
77
+
78
+ oracle = ArcDexOracleTool()
79
+ print(oracle.run("ETH/USDC"))
80
+
81
+ yields_tool = AerodromeYieldsTool()
82
+ print(yields_tool.run())
83
+
84
+ scraper = WebScraperTool()
85
+ print(scraper.run("https://example.com"))
86
+ ```
87
+
88
+ ### LangChain agent usage
89
+
90
+ ```python
91
+ from langchain.agents import AgentType, initialize_agent
92
+ from langchain_openai import ChatOpenAI
93
+
94
+ from warppay402_mcp.tools import ArcDexOracleTool
95
+
96
+ llm = ChatOpenAI(model="gpt-4o-mini")
97
+ tools = [ArcDexOracleTool()]
98
+
99
+ agent = initialize_agent(
100
+ tools=tools,
101
+ llm=llm,
102
+ agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
103
+ )
104
+
105
+ result = agent.invoke("What is the current ETH/USDC spot price?")
106
+ print(result)
107
+ ```
108
+
109
+ ## Example tool details
110
+
111
+ ### `ArcDexOracleTool`
112
+
113
+ - Name: `arc_dex_oracle`
114
+ - Description: Real-time ETH/USDC spot price resolver and DEX liquidity oracle for Arc Mainnet ($0.001 USDC).
115
+ - Default pair: `ETH/USDC`
116
+
117
+ ```python
118
+ from warppay402_mcp.tools import ArcDexOracleTool
119
+
120
+ tool = ArcDexOracleTool()
121
+ print(tool.run("ETH/USDC"))
122
+ ```
123
+
124
+ ### `AerodromeYieldsTool`
125
+
126
+ - Name: `get_aerodrome_yields`
127
+ - Description: Fetches top live Aerodrome DEX yield pools, APYs, and TVL on Base Mainnet ($0.003 USDC).
128
+
129
+ ```python
130
+ from warppay402_mcp.tools import AerodromeYieldsTool
131
+
132
+ tool = AerodromeYieldsTool()
133
+ print(tool.run())
134
+ ```
135
+
136
+ ## Notes
137
+
138
+ - The package exports `ArcDexOracleTool` at the package root, but the full tool set is defined in `warppay402_mcp.tools`.
139
+ - Many tools accept simple Python arguments and return raw API response text as a string.
140
+ - This project depends on `requests` and `langchain-core` as configured in the package metadata.
141
+ - `langchain-openai` is required only for the `ChatOpenAI` example.
@@ -0,0 +1,129 @@
1
+ # warppay402-mcp
2
+
3
+ LangChain and CrewAI native `BaseTool` wrappers for WarpPay402 x402 micropayment APIs.
4
+
5
+ ## Overview
6
+
7
+ This package provides a toolkit of agent-ready tools for on-chain analytics, web extraction, automation, and DeFi actions. The tools are implemented in `warppay402_mcp.tools` and use the WarpPay402 API endpoints under `https://api.warppay402.com/api/v1/tools`.
8
+
9
+ ## Accepted payment options
10
+
11
+ The WarpPay402 server accepts the following payment methods for tool usage:
12
+
13
+ - Base USDC
14
+ - Arbitrum One USDC
15
+ - Solana USDC
16
+ - Arc USDC
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install warppay402-mcp
22
+ ```
23
+
24
+ If you want to run the LangChain/OpenAI example below, install the optional integration package:
25
+
26
+ ```bash
27
+ pip install langchain-openai
28
+ ```
29
+
30
+ ## Available tools
31
+
32
+ The package currently includes these tools:
33
+
34
+ | Tool | Server capability | Typical call signature |
35
+ | --- | --- | --- |
36
+ | `ArcDexOracleTool` | Arc DEX spot price & liquidity oracle | `run(pair="ETH/USDC")` |
37
+ | `WebScraperTool` | Public webpage to Markdown extraction | `run(url)` |
38
+ | `BrowserScraperTool` | JS-rendered page scraping via browser | `run(url)` |
39
+ | `BaseAnalyticsTool` | Wallet balance / nonce / account stats on Base | `run(address)` |
40
+ | `ArcAnalyticsTool` | Arc network block / gas / latency telemetry | `run()` |
41
+ | `ArcNetworkQueryTool` | Pre-flight Arc node + gas + merchant checks | `run(includeGasTrends=True, checkMerchantAccount=True)` |
42
+ | `PdfExtractorTool` | Public PDF text extraction | `run(pdfUrl)` |
43
+ | `RenderScreenshotTool` | Full-page screenshot capture | `run(url)` |
44
+ | `ExtractJsonTool` | Schema-driven JSON extraction from HTML | `run(url, schema=None)` |
45
+ | `SmartContractVerifierTool` | Contract source / ABI / proxy verification | `run(address)` |
46
+ | `AerodromeYieldsTool` | Top yield pools and APY data | `run()` |
47
+ | `AerodromeSwapTool` | Aerodrome router token swap execution | `run(tokenIn, tokenOut, amountIn, decimalsIn, isStable)` |
48
+ | `AerodromeClammTool` | Constrained liquidity range actions | `run(action, token0=None, token1=None, tickLower=None, tickUpper=None, amount0Desired=None, amount1Desired=None, tokenId=None)` |
49
+ | `AerodromeVeaeroTool` | Lock / vote / claim AERO governance actions | `run(action, amount=None, lockDurationWeeks=None, tokenId=None, poolVoteAddresses=None)` |
50
+ | `DeployBaseContractTool` | Deploy contracts on Base | `run(contractType="escrow")` |
51
+ | `DeploySolanaContractTool` | Deploy Solana contracts / vaults | `run(contractType, params)` |
52
+ | `DeployArcContractTool` | Deploy contracts on Arc | `run(contractType="escrow")` |
53
+ | `ArcCctpBridgeTool` | Cross-chain USDC bridge via CCTP | `run(amountUsdc, destinationChain, recipientAddress)` |
54
+ | `PublicDataFeedTool` | Signed public data feed retrieval | `run(filename)` |
55
+ | `DataFeedsTool` | Market / yield feed retrieval | `run(feedId)` |
56
+
57
+ This table is meant to make it easy for developers to point agents at the right server capability and to understand the expected inputs before invoking a tool.
58
+
59
+ ## Quickstart
60
+
61
+ ### Direct tool usage
62
+
63
+ ```python
64
+ from warppay402_mcp.tools import ArcDexOracleTool, AerodromeYieldsTool, WebScraperTool
65
+
66
+ oracle = ArcDexOracleTool()
67
+ print(oracle.run("ETH/USDC"))
68
+
69
+ yields_tool = AerodromeYieldsTool()
70
+ print(yields_tool.run())
71
+
72
+ scraper = WebScraperTool()
73
+ print(scraper.run("https://example.com"))
74
+ ```
75
+
76
+ ### LangChain agent usage
77
+
78
+ ```python
79
+ from langchain.agents import AgentType, initialize_agent
80
+ from langchain_openai import ChatOpenAI
81
+
82
+ from warppay402_mcp.tools import ArcDexOracleTool
83
+
84
+ llm = ChatOpenAI(model="gpt-4o-mini")
85
+ tools = [ArcDexOracleTool()]
86
+
87
+ agent = initialize_agent(
88
+ tools=tools,
89
+ llm=llm,
90
+ agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
91
+ )
92
+
93
+ result = agent.invoke("What is the current ETH/USDC spot price?")
94
+ print(result)
95
+ ```
96
+
97
+ ## Example tool details
98
+
99
+ ### `ArcDexOracleTool`
100
+
101
+ - Name: `arc_dex_oracle`
102
+ - Description: Real-time ETH/USDC spot price resolver and DEX liquidity oracle for Arc Mainnet ($0.001 USDC).
103
+ - Default pair: `ETH/USDC`
104
+
105
+ ```python
106
+ from warppay402_mcp.tools import ArcDexOracleTool
107
+
108
+ tool = ArcDexOracleTool()
109
+ print(tool.run("ETH/USDC"))
110
+ ```
111
+
112
+ ### `AerodromeYieldsTool`
113
+
114
+ - Name: `get_aerodrome_yields`
115
+ - Description: Fetches top live Aerodrome DEX yield pools, APYs, and TVL on Base Mainnet ($0.003 USDC).
116
+
117
+ ```python
118
+ from warppay402_mcp.tools import AerodromeYieldsTool
119
+
120
+ tool = AerodromeYieldsTool()
121
+ print(tool.run())
122
+ ```
123
+
124
+ ## Notes
125
+
126
+ - The package exports `ArcDexOracleTool` at the package root, but the full tool set is defined in `warppay402_mcp.tools`.
127
+ - Many tools accept simple Python arguments and return raw API response text as a string.
128
+ - This project depends on `requests` and `langchain-core` as configured in the package metadata.
129
+ - `langchain-openai` is required only for the `ChatOpenAI` example.
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,18 @@
1
+ from setuptools import setup, find_packages
2
+ from pathlib import Path
3
+
4
+ this_directory = Path(__file__).parent
5
+ long_description = (this_directory / "README.md").read_text(encoding="utf-8")
6
+
7
+ setup(
8
+ name="warppay402-mcp",
9
+ version="1.1.0",
10
+ description="LangChain and CrewAI tool wrappers for WarpPay402 x402 micropayment APIs",
11
+ long_description=long_description,
12
+ long_description_content_type="text/markdown",
13
+ packages=find_packages(),
14
+ install_requires=[
15
+ "requests>=2.28.0",
16
+ "langchain-core>=0.1.0",
17
+ ],
18
+ )
@@ -0,0 +1,45 @@
1
+ from .tools import (
2
+ ArcDexOracleTool,
3
+ WebScraperTool,
4
+ BrowserScraperTool,
5
+ BaseAnalyticsTool,
6
+ ArcAnalyticsTool,
7
+ ArcNetworkQueryTool,
8
+ PdfExtractorTool,
9
+ RenderScreenshotTool,
10
+ ExtractJsonTool,
11
+ SmartContractVerifierTool,
12
+ AerodromeYieldsTool,
13
+ AerodromeSwapTool,
14
+ AerodromeClammTool,
15
+ AerodromeVeaeroTool,
16
+ DeployBaseContractTool,
17
+ DeploySolanaContractTool,
18
+ DeployArcContractTool,
19
+ ArcCctpBridgeTool,
20
+ PublicDataFeedTool,
21
+ DataFeedsTool,
22
+ )
23
+
24
+ __all__ = [
25
+ "ArcDexOracleTool",
26
+ "WebScraperTool",
27
+ "BrowserScraperTool",
28
+ "BaseAnalyticsTool",
29
+ "ArcAnalyticsTool",
30
+ "ArcNetworkQueryTool",
31
+ "PdfExtractorTool",
32
+ "RenderScreenshotTool",
33
+ "ExtractJsonTool",
34
+ "SmartContractVerifierTool",
35
+ "AerodromeYieldsTool",
36
+ "AerodromeSwapTool",
37
+ "AerodromeClammTool",
38
+ "AerodromeVeaeroTool",
39
+ "DeployBaseContractTool",
40
+ "DeploySolanaContractTool",
41
+ "DeployArcContractTool",
42
+ "ArcCctpBridgeTool",
43
+ "PublicDataFeedTool",
44
+ "DataFeedsTool",
45
+ ]
@@ -0,0 +1,188 @@
1
+ import requests
2
+ from typing import Optional, Dict, Any
3
+ from langchain_core.tools import BaseTool
4
+
5
+ BASE_URL = "https://api.warppay402.com/api/v1/tools"
6
+
7
+ class ArcDexOracleTool(BaseTool):
8
+ name: str = "arc_dex_oracle"
9
+ description: str = "Real-time ETH/USDC spot price resolver and DEX liquidity oracle for Arc Mainnet ($0.001 USDC)."
10
+
11
+ def _run(self, pair: str = "ETH/USDC") -> str:
12
+ res = requests.post(f"{BASE_URL}/arc-dex-oracle", json={"pair": pair})
13
+ return res.text
14
+
15
+ class WebScraperTool(BaseTool):
16
+ name: str = "web_scraper"
17
+ description: str = "Scrapes any public webpage URL into clean Markdown for AI context window ingestion ($0.001 USDC)."
18
+
19
+ def _run(self, url: str) -> str:
20
+ res = requests.post(f"{BASE_URL}/web-scraper", json={"url": url})
21
+ return res.text
22
+
23
+ class BrowserScraperTool(BaseTool):
24
+ name: str = "browser_scraper"
25
+ description: str = "Executes unblockable JavaScript Chromium rendering via proxy workers ($0.005 USDC)."
26
+
27
+ def _run(self, url: str) -> str:
28
+ res = requests.post(f"{BASE_URL}/browser-scraper", json={"url": url})
29
+ return res.text
30
+
31
+ class BaseAnalyticsTool(BaseTool):
32
+ name: str = "base_analytics"
33
+ description: str = "Fetches ETH balance, nonce, and account stats for any 0x wallet on Base Mainnet ($0.002 USDC)."
34
+
35
+ def _run(self, address: str) -> str:
36
+ res = requests.post(f"{BASE_URL}/base-analytics", json={"address": address})
37
+ return res.text
38
+
39
+ class ArcAnalyticsTool(BaseTool):
40
+ name: str = "arc_analytics"
41
+ description: str = "Fetches live block height, gas price, and RPC latency from Arc Mainnet ($0.001 USDC)."
42
+
43
+ def _run(self) -> str:
44
+ res = requests.post(f"{BASE_URL}/arc-analytics")
45
+ return res.text
46
+
47
+ class ArcNetworkQueryTool(BaseTool):
48
+ name: str = "arc_network_oracle_query"
49
+ description: str = "Pre-flight Arc Mainnet telemetry: RPC latency (ms), gas prices (Gwei), native USDC balance, and account nonce ($0.10 USDC)."
50
+
51
+ def _run(self, includeGasTrends: bool = True, checkMerchantAccount: bool = True) -> str:
52
+ payload = {"includeGasTrends": includeGasTrends, "checkMerchantAccount": checkMerchantAccount}
53
+ res = requests.post(f"{BASE_URL}/arc-network-query", json=payload)
54
+ return res.text
55
+
56
+ class PdfExtractorTool(BaseTool):
57
+ name: str = "pdf_extractor"
58
+ description: str = "Downloads and extracts clean plain text preview from public PDF document URLs ($0.005 USDC)."
59
+
60
+ def _run(self, pdfUrl: str) -> str:
61
+ res = requests.post(f"{BASE_URL}/pdf-extractor", json={"pdfUrl": pdfUrl})
62
+ return res.text
63
+
64
+ class RenderScreenshotTool(BaseTool):
65
+ name: str = "render_screenshot"
66
+ description: str = "Captures full-page rendered screenshot image data from target URL ($0.01 USDC)."
67
+
68
+ def _run(self, url: str) -> str:
69
+ res = requests.post(f"{BASE_URL}/render-screenshot", json={"url": url})
70
+ return res.text
71
+
72
+ class ExtractJsonTool(BaseTool):
73
+ name: str = "extract_json"
74
+ description: str = "Extracts structured JSON schema data from web page HTML content ($0.01 USDC)."
75
+
76
+ def _run(self, url: str, schema: Optional[Dict[str, Any]] = None) -> str:
77
+ payload = {"url": url, "schema": schema or {}}
78
+ res = requests.post(f"{BASE_URL}/extract-json", json=payload)
79
+ return res.text
80
+
81
+ class SmartContractVerifierTool(BaseTool):
82
+ name: str = "smart_contract_verifier"
83
+ description: str = "Source code analysis, bytecode validation, ABI fetching, and proxy detection on Basescan ($0.02 USDC)."
84
+
85
+ def _run(self, address: str) -> str:
86
+ res = requests.post(f"{BASE_URL}/smart-contract-verifier", json={"address": address})
87
+ return res.text
88
+
89
+ class AerodromeYieldsTool(BaseTool):
90
+ name: str = "get_aerodrome_yields"
91
+ description: str = "Fetches top live Aerodrome DEX yield pools, APYs, and TVL on Base Mainnet ($0.003 USDC)."
92
+
93
+ def _run(self) -> str:
94
+ res = requests.get(f"{BASE_URL}/aerodrome-yields")
95
+ return res.text
96
+
97
+ class AerodromeSwapTool(BaseTool):
98
+ name: str = "aerodrome_swap"
99
+ description: str = "Executes low-slippage token swaps directly via Aerodrome Finance Router on Base ($0.01 USDC)."
100
+
101
+ def _run(self, tokenIn: str, tokenOut: str, amountIn: str, decimalsIn: int, isStable: bool) -> str:
102
+ payload = {
103
+ "tokenIn": tokenIn, "tokenOut": tokenOut,
104
+ "amountIn": amountIn, "decimalsIn": decimalsIn, "isStable": isStable
105
+ }
106
+ res = requests.post(f"{BASE_URL}/aerodrome-swap", json=payload)
107
+ return res.text
108
+
109
+ class AerodromeClammTool(BaseTool):
110
+ name: str = "aerodrome_clamm"
111
+ description: str = "Open, adjust, and rebalance concentrated liquidity ranges on Aerodrome Slipstream ($0.01 USDC)."
112
+
113
+ def _run(self, action: str, token0: Optional[str] = None, token1: Optional[str] = None,
114
+ tickLower: Optional[int] = None, tickUpper: Optional[int] = None,
115
+ amount0Desired: Optional[str] = None, amount1Desired: Optional[str] = None,
116
+ tokenId: Optional[str] = None) -> str:
117
+ payload = {
118
+ "action": action, "token0": token0, "token1": token1,
119
+ "tickLower": tickLower, "tickUpper": tickUpper,
120
+ "amount0Desired": amount0Desired, "amount1Desired": amount1Desired, "tokenId": tokenId
121
+ }
122
+ res = requests.post(f"{BASE_URL}/aerodrome-clamm", json=payload)
123
+ return res.text
124
+
125
+ class AerodromeVeaeroTool(BaseTool):
126
+ name: str = "aerodrome_veaero"
127
+ description: str = "Automates $AERO locking, epoch gauge voting, and bribe reward harvesting on Aerodrome ($0.01 USDC)."
128
+
129
+ def _run(self, action: str, amount: Optional[str] = None, lockDurationWeeks: Optional[int] = None,
130
+ tokenId: Optional[str] = None, poolVoteAddresses: Optional[list] = None) -> str:
131
+ payload = {
132
+ "action": action, "amount": amount, "lockDurationWeeks": lockDurationWeeks,
133
+ "tokenId": tokenId, "poolVoteAddresses": poolVoteAddresses
134
+ }
135
+ res = requests.post(f"{BASE_URL}/aerodrome-veaero", json=payload)
136
+ return res.text
137
+
138
+ class DeployBaseContractTool(BaseTool):
139
+ name: str = "deploy_contract"
140
+ description: str = "Programmatically deploys custom Escrow, Bounty, or Subscription contracts to Base Mainnet ($5.00 USDC)."
141
+
142
+ def _run(self, contractType: str = "escrow") -> str:
143
+ res = requests.post(f"{BASE_URL}/deploy-contract", json={"contractType": contractType})
144
+ return res.text
145
+
146
+ class DeploySolanaContractTool(BaseTool):
147
+ name: str = "deploy_solana_contract"
148
+ description: str = "Initializes SPL Escrows, cNFT Badge Issuers, or Raydium Vaults on Solana Mainnet ($5.00 USDC)."
149
+
150
+ def _run(self, contractType: str, params: Dict[str, Any]) -> str:
151
+ payload = {"contractType": contractType, "params": params}
152
+ res = requests.post(f"{BASE_URL}/deploy-solana-contract", json=payload)
153
+ return res.text
154
+
155
+ class DeployArcContractTool(BaseTool):
156
+ name: str = "deploy_arc_contract"
157
+ description: str = "Programmatically deploys custom Escrow, Bounty, or Agent contracts directly to Arc Mainnet ($5.00 USDC)."
158
+
159
+ def _run(self, contractType: str = "escrow") -> str:
160
+ res = requests.post(f"{BASE_URL}/deploy-arc-contract", json={"contractType": contractType})
161
+ return res.text
162
+
163
+ class ArcCctpBridgeTool(BaseTool):
164
+ name: str = "arc_cctp_bridge"
165
+ description: str = "Bridges USDC cross-chain from Arc Mainnet via Circle CCTP V2 ($0.25 USDC)."
166
+
167
+ def _run(self, amountUsdc: str, destinationChain: str, recipientAddress: str) -> str:
168
+ payload = {
169
+ "amountUsdc": amountUsdc, "destinationChain": destinationChain, "recipientAddress": recipientAddress
170
+ }
171
+ res = requests.post(f"{BASE_URL}/arc-cctp-bridge", json=payload)
172
+ return res.text
173
+
174
+ class PublicDataFeedTool(BaseTool):
175
+ name: str = "public_data_feed"
176
+ description: str = "Retrieves signed attestation JSON payloads from the public data feed ($0.0001 USDC)."
177
+
178
+ def _run(self, filename: str) -> str:
179
+ res = requests.get(f"https://api.warppay402.com/public_data_feed/{filename}")
180
+ return res.text
181
+
182
+ class DataFeedsTool(BaseTool):
183
+ name: str = "data_feeds"
184
+ description: str = "Fetches pre-scraped market data feeds and yield reports ($0.001 USDC)."
185
+
186
+ def _run(self, feedId: str) -> str:
187
+ res = requests.get(f"https://api.warppay402.com/api/v1/feeds/{feedId}")
188
+ return res.text
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: warppay402-mcp
3
+ Version: 1.1.0
4
+ Summary: LangChain and CrewAI tool wrappers for WarpPay402 x402 micropayment APIs
5
+ Description-Content-Type: text/markdown
6
+ Requires-Dist: requests>=2.28.0
7
+ Requires-Dist: langchain-core>=0.1.0
8
+ Dynamic: description
9
+ Dynamic: description-content-type
10
+ Dynamic: requires-dist
11
+ Dynamic: summary
12
+
13
+ # warppay402-mcp
14
+
15
+ LangChain and CrewAI native `BaseTool` wrappers for WarpPay402 x402 micropayment APIs.
16
+
17
+ ## Overview
18
+
19
+ This package provides a toolkit of agent-ready tools for on-chain analytics, web extraction, automation, and DeFi actions. The tools are implemented in `warppay402_mcp.tools` and use the WarpPay402 API endpoints under `https://api.warppay402.com/api/v1/tools`.
20
+
21
+ ## Accepted payment options
22
+
23
+ The WarpPay402 server accepts the following payment methods for tool usage:
24
+
25
+ - Base USDC
26
+ - Arbitrum One USDC
27
+ - Solana USDC
28
+ - Arc USDC
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install warppay402-mcp
34
+ ```
35
+
36
+ If you want to run the LangChain/OpenAI example below, install the optional integration package:
37
+
38
+ ```bash
39
+ pip install langchain-openai
40
+ ```
41
+
42
+ ## Available tools
43
+
44
+ The package currently includes these tools:
45
+
46
+ | Tool | Server capability | Typical call signature |
47
+ | --- | --- | --- |
48
+ | `ArcDexOracleTool` | Arc DEX spot price & liquidity oracle | `run(pair="ETH/USDC")` |
49
+ | `WebScraperTool` | Public webpage to Markdown extraction | `run(url)` |
50
+ | `BrowserScraperTool` | JS-rendered page scraping via browser | `run(url)` |
51
+ | `BaseAnalyticsTool` | Wallet balance / nonce / account stats on Base | `run(address)` |
52
+ | `ArcAnalyticsTool` | Arc network block / gas / latency telemetry | `run()` |
53
+ | `ArcNetworkQueryTool` | Pre-flight Arc node + gas + merchant checks | `run(includeGasTrends=True, checkMerchantAccount=True)` |
54
+ | `PdfExtractorTool` | Public PDF text extraction | `run(pdfUrl)` |
55
+ | `RenderScreenshotTool` | Full-page screenshot capture | `run(url)` |
56
+ | `ExtractJsonTool` | Schema-driven JSON extraction from HTML | `run(url, schema=None)` |
57
+ | `SmartContractVerifierTool` | Contract source / ABI / proxy verification | `run(address)` |
58
+ | `AerodromeYieldsTool` | Top yield pools and APY data | `run()` |
59
+ | `AerodromeSwapTool` | Aerodrome router token swap execution | `run(tokenIn, tokenOut, amountIn, decimalsIn, isStable)` |
60
+ | `AerodromeClammTool` | Constrained liquidity range actions | `run(action, token0=None, token1=None, tickLower=None, tickUpper=None, amount0Desired=None, amount1Desired=None, tokenId=None)` |
61
+ | `AerodromeVeaeroTool` | Lock / vote / claim AERO governance actions | `run(action, amount=None, lockDurationWeeks=None, tokenId=None, poolVoteAddresses=None)` |
62
+ | `DeployBaseContractTool` | Deploy contracts on Base | `run(contractType="escrow")` |
63
+ | `DeploySolanaContractTool` | Deploy Solana contracts / vaults | `run(contractType, params)` |
64
+ | `DeployArcContractTool` | Deploy contracts on Arc | `run(contractType="escrow")` |
65
+ | `ArcCctpBridgeTool` | Cross-chain USDC bridge via CCTP | `run(amountUsdc, destinationChain, recipientAddress)` |
66
+ | `PublicDataFeedTool` | Signed public data feed retrieval | `run(filename)` |
67
+ | `DataFeedsTool` | Market / yield feed retrieval | `run(feedId)` |
68
+
69
+ This table is meant to make it easy for developers to point agents at the right server capability and to understand the expected inputs before invoking a tool.
70
+
71
+ ## Quickstart
72
+
73
+ ### Direct tool usage
74
+
75
+ ```python
76
+ from warppay402_mcp.tools import ArcDexOracleTool, AerodromeYieldsTool, WebScraperTool
77
+
78
+ oracle = ArcDexOracleTool()
79
+ print(oracle.run("ETH/USDC"))
80
+
81
+ yields_tool = AerodromeYieldsTool()
82
+ print(yields_tool.run())
83
+
84
+ scraper = WebScraperTool()
85
+ print(scraper.run("https://example.com"))
86
+ ```
87
+
88
+ ### LangChain agent usage
89
+
90
+ ```python
91
+ from langchain.agents import AgentType, initialize_agent
92
+ from langchain_openai import ChatOpenAI
93
+
94
+ from warppay402_mcp.tools import ArcDexOracleTool
95
+
96
+ llm = ChatOpenAI(model="gpt-4o-mini")
97
+ tools = [ArcDexOracleTool()]
98
+
99
+ agent = initialize_agent(
100
+ tools=tools,
101
+ llm=llm,
102
+ agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
103
+ )
104
+
105
+ result = agent.invoke("What is the current ETH/USDC spot price?")
106
+ print(result)
107
+ ```
108
+
109
+ ## Example tool details
110
+
111
+ ### `ArcDexOracleTool`
112
+
113
+ - Name: `arc_dex_oracle`
114
+ - Description: Real-time ETH/USDC spot price resolver and DEX liquidity oracle for Arc Mainnet ($0.001 USDC).
115
+ - Default pair: `ETH/USDC`
116
+
117
+ ```python
118
+ from warppay402_mcp.tools import ArcDexOracleTool
119
+
120
+ tool = ArcDexOracleTool()
121
+ print(tool.run("ETH/USDC"))
122
+ ```
123
+
124
+ ### `AerodromeYieldsTool`
125
+
126
+ - Name: `get_aerodrome_yields`
127
+ - Description: Fetches top live Aerodrome DEX yield pools, APYs, and TVL on Base Mainnet ($0.003 USDC).
128
+
129
+ ```python
130
+ from warppay402_mcp.tools import AerodromeYieldsTool
131
+
132
+ tool = AerodromeYieldsTool()
133
+ print(tool.run())
134
+ ```
135
+
136
+ ## Notes
137
+
138
+ - The package exports `ArcDexOracleTool` at the package root, but the full tool set is defined in `warppay402_mcp.tools`.
139
+ - Many tools accept simple Python arguments and return raw API response text as a string.
140
+ - This project depends on `requests` and `langchain-core` as configured in the package metadata.
141
+ - `langchain-openai` is required only for the `ChatOpenAI` example.
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ warppay402_mcp/__init__.py
5
+ warppay402_mcp/tools.py
6
+ warppay402_mcp.egg-info/PKG-INFO
7
+ warppay402_mcp.egg-info/SOURCES.txt
8
+ warppay402_mcp.egg-info/dependency_links.txt
9
+ warppay402_mcp.egg-info/requires.txt
10
+ warppay402_mcp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ requests>=2.28.0
2
+ langchain-core>=0.1.0
@@ -0,0 +1 @@
1
+ warppay402_mcp