merchant-mcp

merchant-mcp

A universal MCP server that provides a single merchant interface for AI agents across multiple protocols, enabling catalog browsing, checkout creation, and transaction status queries.

Category
Visit Server

README

merchant-mcp

CI npm License: MIT

Universal Merchant MCP Server — integrate once, speak every AI agent protocol.


The Problem

Every AI agent protocol (MCP, OpenAI tool-calling, Visa TAP, UCP) needs its own integration. A merchant who wants their catalog and checkout accessible to AI agents today must build and maintain separate connectors for each one. When a new protocol ships, the work starts over.

merchant-mcp solves this by sitting between agents and merchants. Merchants implement one interface. New protocols are added as adapters on the server side — the merchant does nothing.


How It Works

AI Agent (Claude, GPT, etc.)
        │
        │  MCP / OpenAI SDK / Visa TAP / ...
        ▼
┌──────────────────────────────┐
│         merchant-mcp         │
│   ┌──────────────────────┐   │
│   │   MCP Tool Layer     │   │
│   │  get_catalog         │   │
│   │  create_checkout     │   │
│   │  get_tx_status       │   │
│   └──────────┬───────────┘   │
│              │ MerchantAdapter│
└──────────────┼───────────────┘
               │
       ┌───────┼───────┐
       ▼       ▼       ▼
     Mock   Autopay  Stripe
   (built-in)        (coming)

The MerchantAdapter interface is the only contract a backend needs to satisfy. See docs/adapter-spec.md.


Quickstart

git clone https://github.com/autopaylab/merchant-mcp
cd merchant-mcp
npm install
npm run dev

Verify it's running:

curl http://localhost:3000/health
# {"status":"ok","server":"merchant-mcp","version":"0.1.0","adapter":"mock"}

Call a tool directly:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_catalog",
      "arguments": { "merchant_id": "demoshop", "limit": 3 }
    }
  }'

Connect to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "merchant-mcp": {
      "url": "https://mcp.autopaylab.com/mcp"
    }
  }
}

Restart Claude Desktop. The three tools will appear automatically.


Tools Reference

Tool Description Key Inputs
get_catalog Browse products from a merchant merchant_id, category?, limit
create_checkout_session Start a checkout and get a payment URL merchant_id, items[], currency
get_transaction_status Poll a checkout for completion session_id (UUID)

Full input/output schemas: see source files in src/tools/.


Building an Adapter

See docs/adapter-spec.md for:

  • The full MerchantAdapter TypeScript interface with JSDoc
  • All input/output types
  • Error contract (what to throw and when)
  • A minimal 30-line skeleton you can copy and fill in

Roadmap

  • [ ] OpenAI SDK function-calling adapter (expose tools via /openai/tools)
  • [ ] Per-request authentication (Authorization header → buyer context)
  • [ ] Multi-merchant routing (single server, many merchant_ids, each pointing to a different adapter)
  • [ ] Visa TAP adapter
  • [ ] Stripe adapter

License

MIT © Autopay Lab

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured