Mcp Server For Agents And X402 Billing

Created By
A2 months ago
Демонстрационный сервер с поддержкой x402 micropayments. AI-агенты бесплатно проверяют доступ к интернету через /hello и платно проверяют работоспособность системы оплаты по x402 через /test-billing, цена 0.001 USDC в сети BASE.
Overview

🧪 X402 Protocol Test Server

Testing Coinbase X402 standard on Base Mainnet

<!-- Ссылки на файлы -->
<div class="card">
    <h3>📄 Protocol Files</h3>
    <div class="links">
        <a href="/.well-known/agent.json" target="_blank">📋 agent.json</a>
        <a href="/.well-known/x402.json" target="_blank">⚙️ x402.json</a>
        <a href="/openapi.yaml" target="_blank">📖 openapi.yaml</a>
        <a href="/hello" target="_blank">🔓 /hello (free)</a>
        <a href="/test-billing" target="_blank">💰 /test-billing (paid)</a>
    </div>
</div>

<!-- Тестовые кнопки -->
<div class="card">
    <h3>🧪 Live Tests</h3>
    <button onclick="testHello()">1. Test /hello (free)</button>
    <button onclick="testBilling()">2. Test /test-billing (expect 402)</button>
    
    <h3>📊 Results:</h3>
    <pre id="result">Click a button...</pre>
</div>

<!-- Информация о сервере -->
<div class="card">
    <h3>ℹ️ Server Info</h3>
    <p><strong>Network:</strong> Base Mainnet (eip155:8453)</p>
    <p><strong>Asset:</strong> USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)</p>
    <p><strong>Address:</strong> 0x3803A19280DeeFe533D177C4A169412BD341101b</p>
</div>

<script>
    // Автоматически определяем базовый URL (без hardcode)
    const BASE_URL = window.location.origin;
    
    async function testHello() {
        const result = document.getElementById('result');
        result.textContent = 'Loading...';
        
        try {
            const res = await fetch(`${BASE_URL}/hello`);
            const data = await res.json();
            result.innerHTML = `<span class="success">✅ ${res.status} OK</span>\n${JSON.stringify(data, null, 2)}`;
        } catch (err) {
            result.innerHTML = `<span class="error">❌ ${err.message}</span>`;
        }
    }
    
    async function testBilling() {
        const result = document.getElementById('result');
        result.textContent = 'Loading...';
        
        try {
            const res = await fetch(`${BASE_URL}/test-billing`);
            const data = await res.json();
            
            let output = `Status: ${res.status} ${res.statusText}\n\n`;
            
            // Показываем X402 заголовки
            for (let [key, value] of res.headers.entries()) {
                if (key.toLowerCase().includes('payment') || key.toLowerCase().includes('payable')) {
                    output += `${key}: ${value}\n`;
                }
            }
            
            output += `\nBody:\n${JSON.stringify(data, null, 2)}`;
            
            if (res.status === 402) {
                result.innerHTML = `<span class="success">✅ Correctly requires payment (402)</span>\n\n${output}`;
            } else {
                result.innerHTML = output;
            }
            
        } catch (err) {
            result.innerHTML = `<span class="error">❌ ${err.message}</span>`;
        }
    }
</script>

Server Config

{
  "mcpServers": {
    "x402-billing": {
      "type": "streamable-http",
      "url": "https://x402helper.xyz",
      "description": "Демонстрационный сервер с x402 микроплатежами. Платные эндпоинты: /test-billing (0.001 USDC)",
      "x402": {
        "enabled": true,
        "facilitatorUrl": "https://x402.dexter.cash"
      }
    }
  }
}
Project Info
Created At
2 months ago
Updated At
2 months ago
Author Name
A
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Bring your real authenticated browser session to AI coding agents. Local-first MCP server + Chrome MV3 extension. No cloud. No telemetry.
@Cubenest

peek records the user's actual logged-in browser (DOM via rrweb, console events, network metadata, optional response bodies via opt-in Deep capture) through a Chrome MV3 extension. The extension ships events through a native-messaging stdio bridge to a local MCP server (peek-mcp), which persists them to a SQLite database at ~/.peek/sessions.db. AI coding agents (Claude Code, Cursor, Cline, Windsurf) read sessions from the database via 10 MCP tools: Tool What it does list_recent_sessions List recently recorded sessions (id, origin, ts, event count). get_session_summary LLM-readable narrative summary of a session. get_session_console_errors Console errors recorded in a session. get_session_network_errors Failed/notable network requests in a session. get_user_action_before_error Last N user actions before a console error. generate_playwright_repro Generate a runnable Playwright test from a session. get_dom_snapshot Reconstruct the DOM at a given timestamp. query_dom_history Timeline of attribute/text changes for a selector. request_authorization Side-panel consent for write actions (Level 3). execute_action Dispatch a UI action (gated by permission level + destructive blocklist). Why local-first matters Every other "browser session for AI" tool ships to a vendor cloud. peek's SQLite + extension live on the user's machine — no remote endpoints, no telemetry. The privacy policy (docs/peek/PRIVACY_POLICY.md) is the source of truth. Install # 1. Add the MCP server to Claude Code claude mcp add peek -- npx -y @peekdev/mcp # 2. Install the Chrome extension from the Chrome Web Store # (link added once the CWS listing is approved)

a day ago