Freedom Commerce Protocol
Supports native Ethereum payments for agent transactions.
Integrates with Google's commerce standards for catalog discovery (adapter ready).
Integrates with OpenAI payment standards, enabling agents to use OpenAI's payment infrastructure (adapter ready).
Integrates with Shopify for catalog discovery, allowing agents to browse and purchase services listed on Shopify (adapter ready).
Supports native Solana payments for agent transactions.
Provides payment processing integration via Stripe, enabling fiat-based transactions (adapter ready).
ποΈ Freedom Commerce Protocol
The Agent-Native Marketplace β where AI agents discover, negotiate, and purchase services without a single line of HTML.
"If agents will orchestrate $3β5T in commerce by 2030, they need a marketplace built for them, not for humans with browsers."
Freedom Commerce is an open protocol and reference implementation for agentic commerce β a marketplace API designed from the ground up for machine-to-machine transactions. No CAPTCHAs, no DOM parsing, no brittle browser automation. Pure JSON, MCP tool definitions, and protocol-driven negotiation.
Why This Exists
Today's web was built for humans. AI agents navigating it face:
β CAPTCHAs that block automated access
β JavaScript-heavy pages that break DOM parsing
β Inconsistent structures β every site is different
β No machine-readable pricing β agents can't compare offers
β No negotiation protocol β take it or leave it
β No standard checkout β every payment flow is unique
Freedom Commerce flips this: the API is the storefront. Agents call JSON endpoints, get MCP tool definitions, negotiate pricing, and transact β all in milliseconds.
Current web β Human browses HTML, fills forms, clicks buttons
Freedom Commerce β Agent calls POST /api/purchase, gets receipt back
How It Works
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β AI Agent ββββββΆβ Freedom Commerce ββββββΆβ Service β
β (Claude, β β Protocol API β β Providers β
β GPT, βββββββ (localhost:4000) βββββββ (APIProxy, β
β Grok, β β β β DataForge...) β
β etc.) β ββββββββββββββββββββ βββββββββββββββββββ
β β β
β Discovers β β MCP Tool Definitions
β Negotiates β β Agent-to-Agent Negotiation
β Purchases β β ACP-compatible Payments
βββββββββββββββ βββββββββββββββββββββββββββββββββββAgent Flow
Discover β
GET /api/services?category=infrastructure&maxPrice=10Inspect β
GET /api/services/{id}for full details + provider infoCompare β
GET /api/mcp/toolsto see all purchase options as MCP tool definitionsNegotiate (optional) β
POST /api/negotiatewith your offer pricePurchase β
POST /api/purchaseβ get signed receipt
Architecture
freedom-commerce/
βββ server.js # HTTP server β agent-first API
βββ lib/
β βββ registry.js # Service registry, negotiation engine, MCP tool generator
βββ protocols/ # (ready for ACP, UCP, A2A protocol adapters)
βββ public/
β βββ index.html # Human dashboard (for monitoring only)
βββ package.json
βββ README.mdCore Concepts
Concept | Description |
Provider | A service seller (APIProxy, DataForge, LogTail, etc.) |
Service | A purchasable offering with price, category, terms |
MCP Tool | A machine-readable action definition an agent can invoke |
Negotiation | An agent-to-agent price discussion with counter-offers |
Transaction | A completed purchase with cryptographic receipt |
API Reference
All endpoints return application/json. Agents identify themselves via X-Agent-ID header.
Discovery
GET /api/servicesQuery parameters for agent-driven filtering:
Parameter | Type | Example | Description |
| string |
| Filter by category |
| number |
| Maximum price |
| number |
| Minimum provider rating |
| string |
| Text search in name + description |
Response:
{
"query": { "category": "infrastructure", "maxPrice": 10 },
"count": 3,
"services": [
{
"name": "API Proxy β 10k requests",
"category": "infrastructure",
"price": 4.99,
"currency": "USD",
"description": "10,000 API proxy requests with global CDN caching",
"deliveryTime": "instant",
"terms": "Monthly subscription, cancel anytime",
"provider": { "name": "APIProxy", "rating": 4.8 }
}
]
}MCP Tool Definitions
GET /api/mcp/toolsReturns tool definitions compatible with the Model Context Protocol. Agents use these to understand what purchase actions are available.
{
"protocol": "MCP/1.0",
"tools": [
{
"name": "purchase_api_proxy_10k",
"description": "Purchase: API Proxy β 10k requests",
"inputSchema": {
"type": "object",
"properties": {
"quantity": { "type": "number" },
"maxPrice": { "type": "number" }
},
"required": ["quantity"]
},
"_acp": {
"price": 4.99,
"currency": "USD",
"paymentEndpoint": "/api/payments/svc_xxx"
}
}
]
}Purchase
POST /api/purchase
Content-Type: application/json
X-Agent-ID: my-agent
{
"serviceId": "svc_xxx",
"quantity": 2
}Response:
{
"transaction": {
"id": "txn_1747432892",
"status": "completed",
"price": 9.98,
"currency": "USD"
},
"receipt": "FCP-txn_1747432892"
}Negotiation (Agent-to-Agent)
POST /api/negotiate
Content-Type: application/json
X-Agent-ID: my-agent
{
"serviceId": "svc_xxx",
"offer": { "price": 3.99 }
}Provider counter-offers:
POST /api/negotiate/{id}/counter
{ "price": 4.50 }Agent accepts:
POST /api/negotiate/{id}/acceptMarketplace Stats
GET /api/stats{
"totalProviders": 5,
"totalServices": 8,
"totalTransactions": 42,
"totalRevenue": 249.50,
"activeNegotiations": 3
}Quick Start
# Clone
git clone https://github.com/BARRYPMARSHALL/freedom-commerce.git
cd freedom-commerce
# Run (no dependencies needed β pure Node.js)
node server.js
# The marketplace starts with 8 demo services from 5 providers
# Agent API: http://localhost:4000/api/services
# Dashboard: http://localhost:4000/No npm install required. Zero external dependencies. Pure Node.js http module.
Seeded Services
The server starts with a pre-seeded marketplace for demonstration:
Service | Provider | Category | Price |
API Proxy β 10k req | APIProxy | infrastructure | $4.99 |
API Proxy β 100k req | APIProxy | infrastructure | $29.99 |
Synthetic Dataset β 1k rows | DataForge | data | $9.99 |
Synthetic Dataset β 10k rows | DataForge | data | $49.99 |
Log Ingestion β 1GB/mo | LogTail | infrastructure | $14.99 |
Email Sending β 1k emails | MailJet | communication | $2.99 |
Serverless Compute β 10hr | ComputeCells | compute | $5.99 |
GPU Compute β 1hr A100 | ComputeCells | compute | $2.49 |
Protocol Compatibility
Freedom Commerce is designed to bridge with emerging agent commerce protocols:
Protocol | Status | Description |
MCP (Model Context Protocol) | β Native | Tool definitions auto-generated for every service |
ACP (Agentic Commerce Protocol) | π§ Adapter ready | Stripe/OpenAI payment standard β add your Stripe key |
UCP (Universal Commerce Protocol) | π§ Adapter ready | Shopify/Google standard for catalog discovery |
A2A (Agent-to-Agent) | π§ Future | Google's agent interoperability protocol |
Deployment
Local (ngrok)
# Start the server
node server.js &
# Expose via ngrok
ngrok http 4000Production (Railway / Fly.io / Render)
The server is stateless and deploys as a single process. No build step needed.
# Example: Deploy to Railway
railway login
railway init
railway upSet PORT environment variable for your platform's assigned port.
What Makes This Different
Traditional E-Commerce | Freedom Commerce | |
Customer | Human with browser | AI agent |
Interface | HTML + CSS + JS | JSON API + MCP tools |
Discovery | SEO, ads, search |
|
Comparison | Manual tab-switching |
|
Pricing | Fixed, human-negotiated | Agent-to-agent negotiation protocol |
Checkout | Forms + CAPTCHAs |
|
Time to purchase | Minutes | < 100ms |
The Vision
Freedom Commerce is step one toward an agent-native economy where:
Agents manage subscriptions, reorder supplies, compare and switch providers autonomously
Providers compete on API quality, not SEO or ad spend
Humans set budgets and policies β agents execute
Markets clear in milliseconds, not days
Protocols (MCP, ACP, UCP) create a universal layer for machine commerce
The $3β5 trillion projection isn't about humans shopping faster β it's about agents shopping for us. But agents can't shop on a web built for eyeballs. They need APIs, tool definitions, and protocols. That's what this is.
License
MIT β build on it.
Built by Freedom ποΈ for Barry Marshall
π° Crypto Payment Rails
Freedom Commerce is built on crypto-native payments β because agents don't have bank accounts, they have wallets.
Supported Payment Methods
Method | Chain | Token | Fee | Settlement |
USDC Transfer | Base L2 | USDC | 0.5% protocol fee | ~12 seconds |
x402 Micropayments | Base L2 | USDC | 0.5% protocol fee | ~$0.001 gas |
Escrow Contract | Base L2 | USDC | 0.5% protocol fee | On-chain final |
Native ETH | Ethereum | ETH | 0.5% | ~12 seconds |
Native SOL | Solana | SOL | 0.5% | ~2 seconds |
Why Crypto?
Fiat payment rails (Stripe, PayPal) fail for agent commerce:
Problem | Fiat | Crypto |
Minimum transaction | $0.50 minimum | 0.000001 cents |
Settlement time | 2-3 business days | ~12 seconds (Base L2) |
KYC requirements | Must be a person | Wallet only |
Chargebacks | 180 days of risk | Final settlement |
Cross-border fees | 3%+ currency fees | Same cost everywhere |
Agent autonomy | Impossible (no human) | Fully programmable |
Crypto API Endpoints
POST /api/crypto/pay β Create USDC payment request
POST /api/crypto/verify β Verify on-chain payment
POST /api/crypto/escrow β Create escrow contract
POST /api/crypto/escrow/:id/deposit β Deposit into escrow
POST /api/crypto/escrow/:id/release β Release funds
POST /api/crypto/escrow/:id/refund β Refund (dispute)
POST /api/crypto/x402 β x402 micropayment request
GET /api/crypto/methods β Supported chains/tokens
GET /api/crypto/quote β Fee quote
GET /api/crypto/solidity β Escrow contract template
GET /api/crypto/stats β Payment statisticsProtocol Architecture
ββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββ
β AI Agent ββββββΆβ Freedom Commerce ββββββΆβ Provider β
β (Wallet) β β (Marketplace) β β (Wallet) β
β β β β β β
β 1. Discover β β 3. Create β β 5. Deliver β
β services β β escrow β β service β
β 2. Negotiateβ β 4. Both deposit β β 6. Confirm β
β price β β USDC β β β
β β β β β β
β β β 7. Release β β β
β β β funds β β β
β β β 8. Protocol fee β β β
ββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββ
β
ββββββββββ΄βββββββββ
β On-Chain β
β (Base L2) β
β USDC + Escrow β
βββββββββββββββββββQuick Start with Crypto
# 1. Discover a service
curl http://localhost:4000/api/services?category=infrastructure
# 2. Get a crypto quote
curl "http://localhost:4000/api/crypto/quote?amount=10"
# 3. Create an escrow (agent + provider deposit USDC)
curl -X POST http://localhost:4000/api/crypto/escrow \
-H "Content-Type: application/json" \
-d '{"agentWallet":"0xAgent...","providerWallet":"0xProvider...","amount":10}'
# 4. Agent deposits into escrow
curl -X POST http://localhost:4000/api/crypto/escrow/ESCROW_ID/deposit \
-d '{"wallet":"0xAgent...","party":"agent"}'
# 5. Provider deposits
curl -X POST http://localhost:4000/api/crypto/escrow/ESCROW_ID/deposit \
-d '{"wallet":"0xProvider...","party":"provider"}'
# 6. Release funds on delivery
curl -X POST http://localhost:4000/api/crypto/escrow/ESCROW_ID/releaseDeploying the Escrow Contract
A complete Solidity escrow contract is available at:
GET /api/crypto/solidityDeploy to Base L2:
# Using Foundry
forge create FreedomEscrow \
--rpc-url https://base-rpc.publicnode.com \
--private-key $YOUR_KEY \
--constructor-args $AGENT_ADDR $PROVIDER_ADDR $FEE_COLLECTOR $USDC_BASE $AMOUNT $DEADLINERoadmap
USDC payments on Base L2
x402 micropayment protocol
On-chain escrow with Solidity contract
Multi-chain support (ETH, SOL, MATIC)
Deploy escrow contract to Base mainnet
Coinbase Smart Wallet integration
Cross-chain settlement (LayerZero/Wormhole)
π Deployment
Railway (Recommended)
# Install Railway CLI
npm install -g @railway/cli
# Deploy
railway login
cd freedom-commerce
railway init
railway upDocker
docker build -t freedom-commerce .
docker run -p 4000:4000 freedom-commerceManual
git clone https://github.com/BARRYPMARSHALL/freedom-commerce.git
cd freedom-commerce
node server.jsEnvironment Variables
Variable | Default | Description |
|
| HTTP server port |
|
| Protocol fee recipient |
π€ MCP Integration
Freedom Commerce is registered in the Awesome MCP Servers directory (PR #5570 pending).
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"freedom-commerce": {
"command": "node",
"args": ["/path/to/lib/mcp-server.js"]
}
}
}Any MCP Client
The endpoint returns full MCP-compatible tool definitions:
GET /api/mcp/toolsThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BARRYPMARSHALL/freedom-commerce'
If you have feedback or need assistance with the MCP directory API, please join our Discord server