aetheris-mcp-client
v1.0.0
Published
Automated x402 settlement client for Aetheris-MCP
Readme
⚔️ Aetheris MCP Client (Auto-Settlement SDK)
The official TypeScript SDK wrapper for the Aetheris-MCP Server. This client automatically intercepts HTTP 402 PAYMENT_REQUIRED challenges from the server, signs the ERC-20 transfer using the provided agent private key, and seamlessly re-invokes the context request.
📦 Installation
npm install aetheris-mcp-client🛠️ Usage
import { AetherisClient } from "aetheris-mcp-client";
async function run() {
const client = new AetherisClient({
endpoint: "https://your-render-url.onrender.com/sse",
agentPrivateKey: "0xYOUR_PRIVATE_KEY", // Ensure this wallet has Base USDC
rpcUrl: "https://mainnet.base.org" // Optional
});
await client.connect();
// 1. Attempts scrape
// 2. Intercepts 402 Payment Challenge
// 3. Settles USDC on Base
// 4. Retrieves payload
const markdownContext = await client.scrape("https://example.com/docs");
console.log(markdownContext);
}
run();🔐 Security
- The client strictly uses
ethers.jsto sign transactions locally. - Your private key is NEVER transmitted to the server. Only the resulting
Transaction Hashis sent as Proof of Payment.
