Skip to main content
Glama
Mercari MCP Server

Mercari MCP Server

@striderlabs/mcp-mercari

MCP (Model Context Protocol) server for automating Mercari resale marketplace operations using Playwright and Browserbase.

Overview

This server exposes Mercari functionality as MCP tools, enabling AI assistants to search listings, manage your selling inventory, view purchase/sales history, and create new listings.

Related MCP server: mcp-ebay

Requirements

  • Node.js >= 18

  • A Browserbase account with CDP URL

  • Mercari account (for authenticated operations)

Installation

npm install @striderlabs/mcp-mercari

Or from tarball:

npm install ./striderlabs-mcp-mercari-1.0.0.tgz

Configuration

Set the following environment variable:

export BROWSERBASE_CDP_URL="wss://connect.browserbase.com?apiKey=YOUR_KEY&sessionId=YOUR_SESSION"

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mercari": {
      "command": "npx",
      "args": ["@striderlabs/mcp-mercari"],
      "env": {
        "BROWSERBASE_CDP_URL": "wss://connect.browserbase.com?apiKey=YOUR_KEY&sessionId=YOUR_SESSION"
      }
    }
  }
}

Tools

search_listings

Search Mercari listings by keyword, category, and price range.

Parameters:

  • keyword (required): Search term

  • category (optional): Category filter (e.g. "Electronics", "Clothing")

  • min_price (optional): Minimum price in USD

  • max_price (optional): Maximum price in USD

  • condition (optional): new | like_new | good | fair | poor

  • limit (optional): Max results (default: 20)

Example:

{
  "keyword": "iPhone 14",
  "max_price": 600,
  "condition": "good",
  "limit": 10
}

get_listing_details

Get detailed information about a specific listing.

Parameters:

  • listing_id (required): Mercari item ID or full URL

Example:

{
  "listing_id": "m12345678"
}

get_my_listings

Get listings you're currently selling (requires authentication).

Parameters:

  • status (optional): on_sale | sold_out | all (default: on_sale)


create_listing

Create a new item listing on Mercari (requires authentication).

Parameters:

  • title (required): Item title

  • description (required): Item description

  • price (required): Price in USD

  • condition (required): new | like_new | good | fair | poor

  • category (optional): Item category

  • shipping_from (optional): State code (e.g. "CA")

  • images (optional): Array of local file paths to item images

Example:

{
  "title": "Nike Air Max 90 Size 10",
  "description": "Worn twice, great condition. No box.",
  "price": 85,
  "condition": "like_new",
  "shipping_from": "CA",
  "images": ["/path/to/shoe-front.jpg", "/path/to/shoe-side.jpg"]
}

get_purchases

View your purchase history (requires authentication).

Parameters:

  • limit (optional): Max items to return (default: 20)


get_sales

View your sales history (requires authentication).

Parameters:

  • limit (optional): Max items to return (default: 20)

Authentication

Authenticated tools (get_my_listings, create_listing, get_purchases, get_sales) require an active Mercari session in the Browserbase browser. To authenticate:

  1. Use Browserbase's live view to navigate to mercari.com and log in manually

  2. The session cookies will persist for subsequent tool calls

How It Works

This server uses Playwright to control a browser via Browserbase's CDP endpoint. Each tool call:

  1. Connects to the remote browser via CDP

  2. Navigates to the relevant Mercari page

  3. Extracts or fills in data using DOM selectors

  4. Returns structured JSON results

License

MIT

Available Tools

6 tools
create_listingB

Create a new listing on Mercari

NameRequiredDescriptionDefault
priceYesListing price in USD
titleYesItem title
imagesNoLocal file paths or URLs of item images
categoryNoItem category
conditionYesItem condition
descriptionYesItem description
shipping_fromNoShip from state code (e.g. 'CA')
get_listing_detailsB

Get detailed information about a specific Mercari listing

NameRequiredDescriptionDefault
listing_idYesMercari listing ID or full URL
get_my_listingsA

Get listings the authenticated user is currently selling

NameRequiredDescriptionDefault
statusNoFilter by listing status (default: on_sale)
get_purchasesA

View purchase history for the authenticated user

NameRequiredDescriptionDefault
limitNoMax purchases to return (default 20)
get_salesA

View sales history for the authenticated user

NameRequiredDescriptionDefault
limitNoMax sales to return (default 20)
search_listingsC

Search Mercari listings by keyword, category, and price range

NameRequiredDescriptionDefault
limitNoMax results to return (default 20)
keywordYesSearch keyword
categoryNoCategory filter (e.g. 'Electronics', 'Clothing')
conditionNoItem condition filter
max_priceNoMaximum price in USD
min_priceNoMinimum price in USD

Tool Schema Changelog

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

  1. 6 tool updatesv1.0.0
    • First observedcreate_listing
    • First observedget_listing_details
    • First observedget_my_listings
    • First observedget_purchases
    • First observedget_sales
    • First observedsearch_listings

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct action: viewing own listings, purchases, sales, searching, getting details, and creating listings. No overlap in purpose.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., get_my_listings, search_listings, create_listing), making the set predictable.

Tool Count5/5

With 6 tools covering core marketplace operations (search, view, create), the count is well-scoped and not excessive.

Completeness3/5

Missing update and delete for listings, which are common lifecycle operations. The set covers creation and reading but not full CRUD.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers