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.
healthcan still be used to verify the server; paid tools need x402 signing from a real wallet.
Steps (for the agent)
- Read discovery:
GET https://screenshotx402.com/discovery.json→ notemcp.url,x402Network, tool names, and list prices (do not hard-code USD). - Read parameters:
GET https://screenshotx402.com/docs— do not inventargumentsshapes forcallTool. - Smoke test: call MCP tool
healthwith{}before spending. - Paid tools: use an MCP client that supports x402 (e.g. TypeScript
withX402Clientfromagents/x402+StreamableHTTPClientTransport+@modelcontextprotocol/sdk). Setnetworkto match discovery (this deployment:base). - Secrets: load
AGENT_PRIVATE_KEYfrom 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_screenshotrequire successful x402 settlement when invoked.
