base-l2-agent-kit 1.0.0__py3-none-any.whl

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,9 @@
1
+ """Base L2 Agent Kit - MCP server providing Base L2 DeFi tools for AI agents."""
2
+
3
+ __version__ = "1.0.0"
4
+ __author__ = "manteclaw"
5
+ __email__ = "manteclaw@proton.me"
6
+
7
+ from .server import mcp, main
8
+
9
+ __all__ = ["mcp", "main"]
@@ -0,0 +1,68 @@
1
+ from mcp.server.fastmcp import FastMCP
2
+ import httpx
3
+
4
+ mcp = FastMCP("base-l2-earning-agent")
5
+
6
+ BASE_URL = "https://manteclaw-x402.fly.dev"
7
+
8
+ @mcp.tool()
9
+ async def contract_audit(code: str) -> str:
10
+ """Scan smart contract code for vulnerabilities on Base L2. Returns risk score + findings."""
11
+ async with httpx.AsyncClient() as client:
12
+ r = await client.post(f"{BASE_URL}/contract_audit", json={"code": code}, timeout=30)
13
+ return r.text
14
+
15
+ @mcp.tool()
16
+ async def base_gas_estimate() -> str:
17
+ """Get current Base L2 gas prices in Gwei with safe/recommended/fast tiers."""
18
+ async with httpx.AsyncClient() as client:
19
+ r = await client.get(f"{BASE_URL}/base_gas_estimate", timeout=10)
20
+ return r.text
21
+
22
+ @mcp.tool()
23
+ async def yield_farm() -> str:
24
+ """Scan DeFi protocols on Base for highest yield opportunities. Returns pool name, APY, TVL, risk level."""
25
+ async with httpx.AsyncClient() as client:
26
+ r = await client.get(f"{BASE_URL}/yield_farm", timeout=10)
27
+ return r.text
28
+
29
+ @mcp.tool()
30
+ async def token_analyzer(address: str) -> str:
31
+ """Analyze a token contract for honeypot risks, mint functions, ownership patterns. Returns risk score."""
32
+ async with httpx.AsyncClient() as client:
33
+ r = await client.get(f"{BASE_URL}/token_analyzer", params={"address": address}, timeout=10)
34
+ return r.text
35
+
36
+ @mcp.tool()
37
+ async def wallet_health(address: str) -> str:
38
+ """Analyze wallet portfolio diversification, token concentration, and recent activity. Returns health score 0-100."""
39
+ async with httpx.AsyncClient() as client:
40
+ r = await client.get(f"{BASE_URL}/wallet_health", params={"address": address}, timeout=10)
41
+ return r.text
42
+
43
+ @mcp.tool()
44
+ async def generate_mnemonic() -> str:
45
+ """Generate a secure BIP39 mnemonic phrase."""
46
+ async with httpx.AsyncClient() as client:
47
+ r = await client.get(f"{BASE_URL}/generate_mnemonic", timeout=10)
48
+ return r.text
49
+
50
+ @mcp.tool()
51
+ async def base_price(token: str = "ETH") -> str:
52
+ """Get current price of a token on Base L2."""
53
+ async with httpx.AsyncClient() as client:
54
+ r = await client.get(f"{BASE_URL}/base_price", params={"token": token}, timeout=10)
55
+ return r.text
56
+
57
+ @mcp.tool()
58
+ async def dex_quote(from_token: str, to_token: str, amount: float) -> str:
59
+ """Get DEX swap quote on Base L2."""
60
+ async with httpx.AsyncClient() as client:
61
+ r = await client.get(f"{BASE_URL}/dex_quote", params={"from": from_token, "to": to_token, "amount": amount}, timeout=10)
62
+ return r.text
63
+
64
+ def main():
65
+ mcp.run()
66
+
67
+ if __name__ == "__main__":
68
+ main()
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: base-l2-agent-kit
3
+ Version: 1.0.0
4
+ Summary: MCP server providing Base L2 DeFi tools for AI agents
5
+ Author-email: manteclaw <manteclaw@proton.me>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/manteclaw/base-l2-agent-kit-mcp
8
+ Project-URL: Repository, https://github.com/manteclaw/base-l2-agent-kit-mcp
9
+ Project-URL: Documentation, https://github.com/manteclaw/base-l2-agent-kit-mcp#readme
10
+ Keywords: mcp,base,l2,defi,ai-agents,blockchain,ethereum,web3,wallet,swap,liquidity
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: fastmcp>=0.4.0
23
+ Requires-Dist: httpx>=0.25.0
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Requires-Dist: web3>=6.0.0
26
+
27
+ # Base L2 Earning Agent — MCP Server
28
+
29
+ An MCP server that exposes Base L2 earning and security tools as Model Context Protocol tools. All underlying endpoints are monetized via x402 micropayments.
30
+
31
+ ## Tools
32
+
33
+ | Tool | Description | Price |
34
+ |------|-------------|-------|
35
+ | `contract_audit` | Scan smart contract for vulnerabilities | 0.02 USDC |
36
+ | `base_gas_estimate` | Current Base L2 gas prices | 0.01 USDC |
37
+ | `yield_farm` | DeFi yield opportunities on Base | 0.05 USDC |
38
+ | `token_analyzer` | Honeypot & risk scanner | 0.03 USDC |
39
+ | `wallet_health` | Portfolio health score | 0.02 USDC |
40
+ | `generate_mnemonic` | Secure BIP39 mnemonic | 0.01 USDC |
41
+ | `base_price` | Token price on Base | 0.01 USDC |
42
+ | `dex_quote` | DEX swap quote | 0.01 USDC |
43
+
44
+ ## Usage
45
+
46
+ ```bash
47
+ # Install
48
+ pip install mcp httpx
49
+
50
+ # Run
51
+ python base_agent_kit_mcp.py
52
+ ```
53
+
54
+ ## x402 Service
55
+
56
+ The underlying HTTP service runs at `https://manteclaw-x402.loca.lt` with 9 monetized endpoints. See `.well-known/agent-catalog.json` for full API spec.
57
+
58
+ ## Registry Listings
59
+
60
+ - **Glama:** Auto-indexed via `glama.json`
61
+ - **Smithery:** Published via `.smithery/manifest.json`
62
+ - **Skills.sh:** `base-l2-earning-agent`
63
+ - **agentskill.sh:** `/@manteclaw/base-l2-earning`
64
+
65
+ ## Author
66
+
67
+ Manteclaw — Base L2 agent earning automation
@@ -0,0 +1,7 @@
1
+ base_l2_agent_kit/__init__.py,sha256=RDohPKJtzyQLCf4545uLI45FvtQu1y1F-wSjIJpa-jA,230
2
+ base_l2_agent_kit/server.py,sha256=IfYxAu96_vwsomZuNzf37aRiSCwtkQDjn8nUS0Xqw1c,2684
3
+ base_l2_agent_kit-1.0.0.dist-info/METADATA,sha256=-5b5PErUekXYMBL2aDW6CT4oc_9F12R7MzCNCqgUVzk,2437
4
+ base_l2_agent_kit-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ base_l2_agent_kit-1.0.0.dist-info/entry_points.txt,sha256=3oNZTg77HROVN8yEQPD2ZgdumxM6CCeEa26XVVLKq5Y,68
6
+ base_l2_agent_kit-1.0.0.dist-info/top_level.txt,sha256=mipdCoMJTctdOg3alHHoxtpTxB-KjIXwGNWBYQV4XAY,18
7
+ base_l2_agent_kit-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ base-l2-agent-kit = base_l2_agent_kit.server:main
@@ -0,0 +1 @@
1
+ base_l2_agent_kit