Skip to main content
Glama
Four02 MCP Server

Four02 MCP Server

by primeality

Four02 MCP Server

Give any AI agent the ability to discover and pay merchants through the Four02 network.

Four02 is the universal commerce layer for AI agents — search, browse, and pay any merchant regardless of which payment protocol they use (x402, ACP, UCP, or none at all).

Install

No clone needed. Works with any MCP-compatible client:

npx four02-mcp-server

Option B: Clone & build

git clone https://github.com/four02/mcp-server.git
cd mcp-server
npm install
npm run build

Related MCP server: Commerce MCP Server

Tools

When installed, your AI agent gets five tools:

Tool

Description

four02_search

Find businesses, services, and APIs by keyword, category, city, or tags

four02_browse_catalog

Browse a merchant's product/service menu with prices

four02_buy_product

Purchase from a merchant's catalog (initiates x402 payment)

four02_call_api

Call a merchant's API endpoint through Four02's payment proxy

four02_merchant_info

Get detailed merchant info (endpoints, pricing, location, ratings)

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "four02": {
      "command": "npx",
      "args": ["-y", "four02-mcp-server"],
      "env": {
        "FOUR02_URL": "https://api.four02.ai"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "four02": {
      "command": "npx",
      "args": ["-y", "four02-mcp-server"],
      "env": {
        "FOUR02_URL": "https://api.four02.ai"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "four02": {
      "command": "npx",
      "args": ["-y", "four02-mcp-server"],
      "env": {
        "FOUR02_URL": "https://api.four02.ai"
      }
    }
  }
}

OpenClaw

Add to ~/.openclaw/openclaw.json under mcp.servers:

{
  "four02": {
    "command": "npx",
    "args": ["-y", "four02-mcp-server"],
    "env": {
      "FOUR02_URL": "https://api.four02.ai"
    }
  }
}

Environment Variables

Variable

Default

Description

FOUR02_URL

http://localhost:3402

Four02 facilitator URL

Example Usage

Once installed, just talk to your AI agent naturally:

  • "Find me a coffee shop in Charlotte"

  • "What does Joe's Coffee sell?"

  • "Order me a latte from Joe's Coffee"

  • "Find a weather API I can use"

  • "Call the weather API for New York"

The agent handles discovery, browsing, and payment — all through natural conversation.

How It Works

Your Agent ──► Four02 MCP Server ──► Four02 Network ──► Merchant
                  (this package)        (facilitator)     (any protocol)
  1. Agent calls four02_search to find what it needs

  2. Agent browses catalog or checks endpoints with four02_browse_catalog / four02_merchant_info

  3. Agent purchases via four02_buy_product or four02_call_api

  4. Four02 handles the payment (USDC on Base) and proxies the request

  5. Agent gets the goods/data/service

License

MIT

Available Tools

5 tools
four02_browse_catalogBrowse Merchant CatalogA

Browse a merchant's product or service catalog. Use this after searching to see what a specific merchant offers — their menu items, services, or products with prices.

Inputs: merchantId (required).

four02_buy_productBuy Product from MerchantA

Purchase a product or service from a merchant's catalog. This initiates the x402 payment flow — you'll receive payment instructions including the amount in USDC, the payment address, and the EIP-712 signature fields. Your wallet must have USDC on Base network and have approved the Four02 facilitator.

Inputs: productId (required), merchantId (required), notes, quantity.

four02_call_apiCall Merchant APIA

Call a merchant's API endpoint through Four02's payment proxy. Use this for developer-tier merchants who offer API services (weather data, translation, AI services, etc.). The first call returns payment instructions (402). After paying, the request is proxied to the merchant's actual API and you get the response.

Inputs: path (required), merchantId (required), body, method, +1 more.

four02_merchant_infoGet Merchant DetailsB

Get detailed information about a specific merchant including all their endpoints, pricing, location, ratings, and catalog availability.

Inputs: merchantId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 5 tools

    Disambiguation4/5

    Search, catalog browsing, purchasing, API calling, and merchant info each target a distinct step in the marketplace workflow. Slight overlap exists between four02_merchant_info (returns endpoints, pricing, catalog availability) and four02_browse_catalog (returns catalog items with prices), and buy_product vs call_api both touch payment flows, but descriptions clarify when to use each.

    Naming Consistency4/5

    All tools share the four02_ snake_case prefix and are mostly verb_noun (search, browse_catalog, buy_product, call_api). The one deviation is four02_merchant_info, which is noun-based, but it remains readable and unambiguous.

    Tool Count5/5

    Five tools map cleanly onto the discovery-to-purchase lifecycle: search, inspect merchant, browse catalog, buy, and call API. Each tool earns its place with no redundancy, well within the healthy 3-15 range.

    Completeness3/5

    The discovery and purchase-initiation surface is solid, but the payment lifecycle is a dead end: buy_product only initiates payment and there is no tool to verify payment status, confirm an order, or retrieve purchase history. Agents may need to infer completion by re-calling endpoints, which is fragile.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers