Purpose
secondhand-mcp is a Model Context Protocol (MCP) server used to let AI assistants search secondhand marketplaces. It can find secondhand and idle items on Facebook Marketplace, eBay, Depop, and Poshmark, supports filtering by conditions such as price, category, condition, size, and color, and returns complete item details including photos, descriptions, and seller information.
Main capabilities
- Search for items across multiple secondhand marketplaces.
- Supports filtering by conditions such as price, category, condition, size, and color (the degree of support varies by marketplace).
- Provides complete item details: photos, descriptions, seller information.
- Exposes the following tools:
- search_marketplace: Search for items across marketplaces.
- get_listing_details: Use an ID from search results to get complete details for a specific item.
- list_marketplaces: List all enabled marketplaces and their status.
- search / fetch: A convenient pair following the ChatGPT Deep Research tool convention, both accepting a single string parameter. search(query) searches all enabled marketplaces at once and returns { results: [{ id, title, text, url }] }, where id is marketplace:listingId; fetch(id) returns complete item details in the format { id, title, text, url, metadata }.
Usage and configuration
The project runs on the local computer, so it is only available in local environments (Claude Desktop, Claude Code, Cursor).
- Add the configuration to ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop).
- Or add it to ~/.claude/.mcp.json (Claude Code).
- Each marketplace is optional: if the eBay API key is missing or Chrome is not installed, the corresponding marketplace is automatically disabled, and the remaining functionality still works normally.
Marketplace enablement and selection
- All marketplaces are enabled by default.They can be restricted via the comma-separated MARKETPLACES environment variable. Valid values: facebook, ebay, depop, poshmark.
- eBay: Uses the official Browse API and requires a free eBay developer account. Create an account at developer.ebay.com and create an application to obtain the Client ID and Client Secret, then add EBAY_CLIENT_ID and EBAY_CLIENT_SECRET to the MCP configuration. The default target is the US eBay site, and the regional marketplace can be switched via the EBAY_MARKETPLACE_ID environment variable.
- Depop and Poshmark: Require a headless browser. If Google Chrome or Chromium is installed on the system, both are automatically enabled with no configuration required; if Chrome is not found, they are silently skipped. On macOS, the first time you search Depop or Poshmark, a system prompt may appear asking to allow Node.js to control Chrome. This is expected behavior; after allowing it once, it will not ask again. The browser runs invisibly in the background and only starts during searches.
Implementation details for each marketplace
- Facebook Marketplace: Searches for items by location, radius, price, and query, can resolve city names to coordinates, and requires no login or browser. Facebook sometimes returns a restricted version of the search API to non-browser callers; in that case, the server instead reads the logged-out search page and can still retrieve the complete first page of results.
- eBay: Uses the official eBay Browse API with OAuth 2.0 client credentials. Tokens are cached and automatically refreshed. The target regional marketplace is controlled by EBAY_MARKETPLACE_ID (default EBAY_US).
- Depop: Uses a headless browser to search, supports category, condition, size, and color filters, and the browser instance is shared between requests.
- Poshmark: Uses a headless browser to search, supports condition, size, color, sorting, and price filters. Poshmark is not location-based; all items ship nationwide.
Limitations and notes
- Not available for ChatGPT.
- Runs only on the local computer, so it can only be used in local clients where the server is installed.
- Facebook: If Facebook Changing the frontend may cause it to stop working.
- eBay: Requires a developer API key (there is a free tier).
- Depop: Requires Chrome/Chromium to be installed; slower than Facebook/eBay (about 5 seconds per search).
- Poshmark: Requires Chrome/Chromium to be installed; no official API, relies on page scraping.
- Rate limits: Do not make too many requests too quickly.
Extending
To add a new marketplace: create a new file under src/marketplaces/, inherit from BaseMarketplace and implement search() (optionally implement getListingDetails()), then add that constructor to allMarketplaces in src/marketplaces/index.ts.