FreshContext
Exact-version, evidence-backed npm API verification for coding agents.
When your agent writes import { x } from "pkg", it is guessing from stale training data. FreshContext answers one question deterministically: is this symbol publicly exported by this exact package version? It inspects the real published artifact — never a range, never a guess, never executed — and returns a verdict with the evidence attached.
Endpoints
HTTP: POST https://401-chi.vercel.app/api/v1/symbol
MCP (streamable HTTP): https://401-chi.vercel.app/api/mcp — tool check_api_symbol
Discovery: listed in the x402 Bazaar with machine-readable input/output JSON Schemas; the 402 offer itself carries the full contract.
1 — See the offer (no payment)
# 1) Ask without payment — you get a priced x402 offer (HTTP 402)
curl -i -X POST https://401-chi.vercel.app/api/v1/symbol \
-H "Content-Type: application/json" \
-d '{"ecosystem":"npm","package":"zod","version":"4.0.0","symbol":"z"}'
# → 402 Payment Required + PAYMENT-REQUIRED header (price, payTo, schemas)2 — Pay per call from code
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const fetchWithPay = wrapFetchWithPayment(fetch, client);
const res = await fetchWithPay("https://401-chi.vercel.app/api/v1/symbol", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ecosystem: "npm", package: "zod", version: "4.0.0", symbol: "z" }),
}); // pays $0.003 in USDC automatically, returns the verified packetOr use it as an MCP tool
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { wrapMCPClientWithPayment } from "@x402/mcp";
const paid = wrapMCPClientWithPayment(new Client({ name: "my-agent", version: "1.0.0" }), paymentClient);
await paid.connect(new StreamableHTTPClientTransport(new URL("https://401-chi.vercel.app/api/mcp")));
const result = await paid.callTool("check_api_symbol",
{ ecosystem: "npm", package: "zod", version: "4.0.0", symbol: "z" });What you get back
{
"schemaVersion": "1",
"query": { "ecosystem": "npm", "package": "zod", "requestedVersion": "4.0.0", "symbol": "z" },
"resolution": { "package": "zod", "version": "4.0.0", "versionResolution": "exact" },
"result": { "exists": true, "exportKind": "named", "certainty": "verified" },
"evidence": [{
"sourceType": "typescript-declaration",
"sourcePath": "index.d.cts",
"locator": "export { ... z ... }",
"packageVersion": "4.0.0"
}],
"retrievedAt": "2026-07-11T21:34:45.134Z"
}certainty is verified only when the exact artifact proves it — our evaluation gate enforces 1.0 precision and zero false verified claims. When static evidence is insufficient, you get inconclusive, never a guess. A verified exists: false is equally a paid, evidence-backed answer.
Retries are safe
Every payment carries an idempotency identifier (official x402 payment-identifier extension). A duplicate retry replays the original response and settlement — you are never charged twice for the same request, verified end-to-end on-chain.