MCP-native integrations
Connect your agent
Agents can send the same typed assertions over REST or MCP. Keep the exact condition list with the original private recovery record. See the four decision examples.
Connect AI Agent for the endpoint, first call and recovery.
Use one remote endpoint with your existing framework. Discover12 tools, inspect a useful fixture result, then authorize only the operation your application needs.
https://api.fresh402.com/mcp
Community examples, not vendor endorsements. Connectivity does not grant payment authority. No signer, prepaid key or model call is configured by these examples.
Complete tested examples and recovery rules · API and payment docs
For a JavaScript connection example, run its install command in a Node 24+ project. Save the JavaScript as fresh402.mjs and run node fresh402.mjs.
OpenAI Agents
Tested live discovery, retained free Register and unpaid challenge; no inference or paid execution.
npm install @openai/agents@0.22.0import {MCPServerStreamableHttp} from '@openai/agents';
import {pathToFileURL} from 'node:url';
export async function connectFresh402(){
const server=new MCPServerStreamableHttp({url:'https://api.fresh402.com/mcp',name:'Fresh402',clientSessionTimeoutSeconds:20,cacheToolsList:true});
await server.connect();return{tools:()=>server.listTools(),call:(name,args)=>server.callToolResult(name,args),close:()=>server.close()};
}
if(process.argv[1]&&pathToFileURL(process.argv[1]).href===import.meta.url){
const client=await connectFresh402();try{
console.log((await client.tools()).map(t=>t.name));
// This is an unpaid challenge. No signer, API key, payment handler or model is configured.
console.log(await client.call('fresh402_extract',{url:'https://example.com/'}));
if(process.argv.includes('--register-example'))console.log(await client.call('fresh402_register',{url:'https://example.com/'}));
}finally{await client.close();}
}
LangChain / LangGraph
Tested live discovery, retained free Register and unpaid challenge; no inference or paid execution.
npm install @langchain/mcp-adapters@2.0.3import {MCPAdapter} from '@langchain/mcp-adapters';
import {pathToFileURL} from 'node:url';
export async function connectFresh402(){
const adapter=new MCPAdapter({servers:{fresh402:{transport:'http',url:'https://api.fresh402.com/mcp',defaultToolTimeout:20000}},prefixToolNameWithServerName:false});
const tools=await adapter.getTools();return{tools:async()=>tools,call:(name,args)=>{const tool=tools.find(t=>t.name===name);if(!tool)throw Error('Tool is unavailable');return tool.invoke(args);},close:()=>adapter.close()};
}
if(process.argv[1]&&pathToFileURL(process.argv[1]).href===import.meta.url){
const client=await connectFresh402();try{
console.log((await client.tools()).map(t=>t.name));
try{console.log(await client.call('fresh402_extract',{url:'https://example.com/'}));}catch(error){console.log('Inspect the unpaid MCP challenge; do not auto-pay:',error.message);}
if(process.argv.includes('--register-example'))console.log(await client.call('fresh402_register',{url:'https://example.com/'}));
}finally{await client.close();}
}
CrewAI
Tested live discovery, retained free Register and unpaid challenge; no inference or paid execution.
python -m pip install crewai==1.15.41"""CrewAI 1.15.41 / Python3.13: MCP connectivity, no inference or payment authority."""
import asyncio
import os
os.environ.setdefault("OTEL_SDK_DISABLED", "true")
os.environ.setdefault("CREWAI_TELEMETRY_ENABLED", "false")
from crewai.mcp.client import MCPClient
from crewai.mcp.transports.http import HTTPTransport
async def main():
async with MCPClient(
HTTPTransport(url="https://api.fresh402.com/mcp", streamable=True),
connect_timeout=20, discovery_timeout=20, execution_timeout=20,
max_retries=1, # This release counts total attempts, so1 means no retry.
) as client:
tools = await client.list_tools()
print([tool["name"] for tool in tools])
# Ordinary unpaid call: no API key, signer, model or payment interceptor.
result = await client.call_tool_result("fresh402_extract", {"url": "https://example.com/"})
if result.is_error:
print("Unpaid challenge or tool error; inspect content before any separately authorized execution.")
print(result)
if os.environ.get("FRESH402_REGISTER_EXAMPLE") == "1":
print(await client.call_tool_result("fresh402_register", {"url": "https://example.com/"}))
if __name__ == "__main__":
asyncio.run(main())
Vercel AI SDK
Tested live discovery, retained free Register and unpaid challenge; no inference or paid execution.
npm install @ai-sdk/mcp@2.0.104import {createMCPClient} from '@ai-sdk/mcp';
import {pathToFileURL} from 'node:url';
export async function connectFresh402(){
const client=await createMCPClient({transport:{type:'http',url:'https://api.fresh402.com/mcp'}});
return{tools:async()=>(await client.listTools()).tools,call:(name,args)=>client.callTool({name,arguments:args}),close:()=>client.close()};
}
if(process.argv[1]&&pathToFileURL(process.argv[1]).href===import.meta.url){
const client=await connectFresh402();try{
console.log((await client.tools()).map(t=>t.name));
console.log(await client.call('fresh402_extract',{url:'https://example.com/'}));
if(process.argv.includes('--register-example'))console.log(await client.call('fresh402_register',{url:'https://example.com/'}));
}finally{await client.close();}
}
A useful result before payment
API compatibility fixture · Website change fixture. These fixed scenarios use production comparators, not live target observations.
Keep authority separate
Ordinary MCP returns unpaid x402/MPP requirements. It does not implement a wallet or pay automatically. Existing prepaid execution needs an eligible private key, authenticated tariff quote, finite credit ceiling and durable original-operation persistence. Recover original input/proof/key after uncertainty; never replace a payment after a timeout.
Optional feedback
POST /v1/agent-feedback accepts voluntary task/outcome/obstacle/alternative enums. No prompts, URLs, account identifiers or free text. Aggregates expire after30days;100 accepted submissions/day globally. Feedback is unverified and self-selected, not proof of adoption.
Current limits
Static HTTPS documents only; no browser execution. Base blockchain observations remain selected finalized single-provider evidence. Native Solana MPP passed an official-client mainnet standalone API Compatibility Review acceptance with finalized delivery and original replay. Read the live unpaid challenge and root payment-method flags; its client pays the authorized SOL fee. Prepaid MPP funding remains Base-only. Existing Base MPP and Base/Solana x402 remain available as advertised.