Protocol v1.0·Apache 2.0

Make any websiteagent-readyin 5 minutes

The open standard that makes any e-commerce site discoverable and transactable by AI agents. Zero server-side code required.

Three layers, five minutes

Each layer is independent. Start with static files and add interactivity as your needs grow.

1DISCOVERStatic files only

Add two files to any web server. Zero server-side code, zero dependencies.

# Deploy to any static host
.well-known/ocp.json   # Manifest
ocp.md                 # Description
ocp/products.jsonl     # Product feed
  • Works on GitHub Pages, Netlify, S3
  • Crawlable by agent discovery engines
  • No runtime required
2INTERACTOne script tag

Add the OCP runtime to register tools with WebMCP and window.__ocp.

<script src="ocp-runtime.min.js"></script>
<script>
OCP.init({
  handlers: { search_products, add_to_cart }
});
</script>
  • WebMCP (Chrome 146+) support
  • Graceful fallback via window.__ocp
  • < 8KB gzipped
3BRIDGEnpm adapters

Translate OCP to any other protocol. Implement once, get compatibility everywhere.

import { createMCPServer } from '@opencommerceprotocol/bridge-mcp';
import { ocpToUCP } from '@opencommerceprotocol/bridge-ucp';
import { ocpToA2ACard } from '@opencommerceprotocol/bridge-a2a';
  • MCP (Claude, Cursor, all major AI)
  • UCP (Google Shopping Agent)
  • A2A (Google A2A protocol)

The minimum viable manifest

This is all you need to be discoverable by AI agents.

/.well-known/ocp.jsonJSON
{
  "version": "1.0",
  "merchant": {
    "name": "My Store",
    "url": "https://mystore.com",
    "currency": "USD"
  },
  "capabilities": {
    "catalog": true,
    "search": true
  },
  "discovery": {
    "feed": "https://mystore.com/ocp/products.jsonl",
    "feed_format": "jsonl"
  },
  "permissions": {
    "requires_human_checkout": true
  }
}

Add /ocp.md and /ocp/products.jsonl and your store is agent-discoverable.

New

Make any service agent-discoverable

Not just e-commerce. Any API — hotels, knowledge bases, SaaS tools — can declare its tools and become findable by AI agents.

registerAgentTools() — auto-generates /.well-known/agent.json
import { agentDiscoveryMiddleware } from '@opencommerceprotocol/agent-discovery';

agentDiscoveryMiddleware(app, {
  name: 'Hotel Search API',
  verticals: ['travel'],
  tools: [
    {
      name: 'search_hotels',
      endpoint: '/api/hotels/search',
      method: 'POST',
      parameters: {
        type: 'object',
        properties: {
          location: { type: 'string' },
          checkin:  { type: 'string' },
        },
        required: ['location'],
      },
    },
  ],
  auth: { type: 'oauth2' },
  bridge: { ocp: '/.well-known/ocp.json' },
});
// Now serves /.well-known/agent.json automatically
Discovery/.well-known/agent.json

Protocol-neutral tool manifest. One file makes any site agent-discoverable — no MCP server required.

NeutralityProtocol bridges

toMCPTools(), toOpenAITools(), toA2ATools(), toOpenAPISpec() — map one manifest to every agent framework.

RegistryAgent Registry

POST /v1/register to list your service. GET /v1/search with filters or GET /v1/route?intent=... for natural-language routing.

SecuritySecurity layer

HMAC-SHA256 request signing, domain verification, OAuth2 token helpers, and rate limit parsing built in.

Agent Discovery docs

Discover agent tools at any URL

The ocp agent-discover command fetches /.well-known/agent.json, validates the manifest, and exports to any protocol format.

# validate compatibility
$ npx @opencommerceprotocol/cli agent-discover https://hotels.example.com
Discovery endpoint found
4 tools declared
4/4 tools have schemas
Auth: oauth2
Agent Compatibility Score:
90/100 — Good compatibility
# export as MCP tools
$ npx @opencommerceprotocol/cli agent-discover https://example.com --format mcp
[
  {
    "name": "search_hotels",
    "description": "Search hotels...",
    "inputSchema": {
      "type": "object",
      "properties": {
        "location": { "type": "string" }
      }
    }
  }
]

One implementation, all protocols

OCP bridges generate compatibility with every major agentic commerce protocol.

ProtocolByUse caseOCP support
OCPOpen SourceDiscovery + interaction (this!)Native
MCPAnthropicAI tool calling (Claude, Cursor)@opencommerceprotocol/bridge-mcp
UCPGoogleUniversal checkout@opencommerceprotocol/bridge-ucp
A2AGoogleAgent-to-agent communication@opencommerceprotocol/bridge-a2a
ACPOpenAIAgent commerce protocol@opencommerceprotocol/bridge-acp
WebMCPW3C/ChromeBrowser-native agent APIsBuilt into runtime

See it live, end-to-end

Every example is a runnable, standalone project in the OpenCommerceProtocol/examples repo. Clone it, run it, point an agent at it.

Retail · L1
Static Site
Three files, zero backend. The L1 discovery floor.
github.com/OpenCommerceProtocol/examples/static-site
Retail · L1+L2
PageTurner Books
Static bookstore with window.__ocp in-page tools.
github.com/OpenCommerceProtocol/examples/bookstore
Retail · L1–L3
Reference Store
Full L1–L3 merchant on Hono/Workers.
github.com/OpenCommerceProtocol/examples/store
Retail · Bridges
Express Store
Full stack with MCP, UCP, and A2A bridges.
github.com/OpenCommerceProtocol/examples/express-store
Retail · Next.js
Next.js Store
L1–L3 merchant built on Next.js 15 App Router.
github.com/OpenCommerceProtocol/examples/nextjs-store
Retail · MCP
Pet Store
Hono merchant with an MCP server baked in.
github.com/OpenCommerceProtocol/examples/pet-store
Food · L1–L3
Restaurant Ordering
Menu + cart + checkout for food delivery.
github.com/OpenCommerceProtocol/examples/restaurant-ordering
Ticketing · L1–L3
Event Ticketing
Non-refundable checkout with human approval.
github.com/OpenCommerceProtocol/examples/event-ticketing
SaaS · Recurring
SaaS Subscriptions
Recurring plans modeled as OCP products.
github.com/OpenCommerceProtocol/examples/saas-subscriptions
Marketplace
Bazaar Marketplace
One deployment, many vendors, split checkouts.
github.com/OpenCommerceProtocol/examples/multi-vendor-marketplace
Observability
Analytics Dashboard
Observability for agent traffic hitting your store.
github.com/OpenCommerceProtocol/examples/analytics-dashboard
Consumer · Vanilla
Gift Finder
Consumer web app powered entirely by OCP fetches.
github.com/OpenCommerceProtocol/examples/gift-finder-webapp
Agent · WebGPU
Browser LLM Agent
On-device WebGPU agent shopping any OCP store.
github.com/OpenCommerceProtocol/examples/browser-llm

Ready to make your store agent-ready?

Start with two static files. Add interactivity when you need it.