360 Secure SkillHub
360 安全技能中心

Screenshots for AI agents via x402

该 Skill 指导连接远程 MCP 服务并调用 health、take_screenshot、analyze_screenshot 三个工具:截图按 x402/USDC 计费,调用方需配置钱包私钥并使用支持 x402 的 MCP 客户端签名,目标须为 https 页面,视觉分析所需模型密钥由服务端配置。

分类:自动化
sacsand
sacsand
热度 0.00
最近更新 2026-07-16 22:09:39

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add sacsand/screenshot-for-ai-agents
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
screenshot-x402-mcp
description
Pay-per-request browser screenshots over MCP (Streamable HTTP) with x402 USDC micropayments — no caller API key. Fetch discovery, wire a wallet + MCP client, call take_screenshot / analyze_screenshot / health.
homepage
https://screenshotx402.com
metadata
{"version":1,"transport":"streamable-http","payment":"x402"}

screenshot-x402 (MCP + x402)

What this is

screenshot-x402 is a remote Model Context Protocol server at https://screenshotx402.com/mcp (Streamable HTTP only). Tools:

Tool Payment Purpose
health Free Smoke test MCP + x402 network ({}).
take_screenshot x402 / USDC Real browser PNG/JPEG of a public https URL.
analyze_screenshot x402 / USDC JPEG capture + vision text (server needs OpenRouter or OpenAI).

There is no separate REST screenshot URL for tools — everything goes through MCP.

Important files (this deployment)

File URL
SKILL.md (this file) https://screenshotx402.com/skill.md
discovery.json https://screenshotx402.com/discovery.json
API reference (HTML) https://screenshotx402.com/docs

Re-fetch https://screenshotx402.com/skill.md and https://screenshotx402.com/discovery.json when troubleshooting — list prices and links stay in sync with the live Worker.

Sandboxed agents (browser-only IDEs)

Some agent UIs run commands in an ephemeral VM, not the user's laptop. Do not put a funded AGENT_PRIVATE_KEY only inside that sandbox if the user expects a persistent wallet.

  • Tell the user to configure MCP + wallet on their local machine or a persistent agent (e.g. Cursor, Claude Code, Codex CLI) when they need stable funds.
  • health can still be used to verify the server; paid tools need x402 signing from a real wallet.

Steps (for the agent)

  1. Read discovery: GET https://screenshotx402.com/discovery.json → note mcp.url, x402Network, tool names, and list prices (do not hard-code USD).
  2. Read parameters: GET https://screenshotx402.com/docs — do not invent arguments shapes for callTool.
  3. Smoke test: call MCP tool health with {} before spending.
  4. Paid tools: use an MCP client that supports x402 (e.g. TypeScript withX402Client from agents/x402 + StreamableHTTPClientTransport + @modelcontextprotocol/sdk). Set network to match discovery (this deployment: base).
  5. Secrets: load AGENT_PRIVATE_KEY from the user's env or secret store; never echo it into chat logs.

Environment (caller's machine / agent host)

Variable Meaning
AGENT_PRIVATE_KEY Hex private key for viem / withX402Client — funds USDC x402 payments for paid tools.

The server operator sets vision keys (OPENROUTER_API_KEY or OPENAI_API_KEY) for analyze_screenshot; callers do not send those.

TypeScript reference

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { withX402Client } from "agents/x402";
import { privateKeyToAccount } from "viem/accounts";

const transport = new StreamableHTTPClientTransport(
  new URL("https://screenshotx402.com/mcp"),
);
const mcp = new Client({ name: "agent", version: "1.0.0" });
const account = privateKeyToAccount(
  process.env.AGENT_PRIVATE_KEY as `0x${string}`,
);
const paidClient = withX402Client(mcp, {
  account,
  network: "base",
  maxPaymentValue: 100_000n,
});
await paidClient.connect(transport);
await paidClient.callTool(null, {
  name: "take_screenshot",
  arguments: { url: "https://example.com", fullPage: false },
});

Tune maxPaymentValue and network from discovery and your policy.

Triggers

Use this skill when the user wants:

  • Agent screenshots, page captures, or an MCP screenshot tool
  • x402 / USDC micropayments for APIs
  • Help wiring Streamable HTTP MCP at this origin

Constraints

  • Targets for captures must be https:// URLs (see /docs).
  • take_screenshot / analyze_screenshot require successful x402 settlement when invoked.

More links