mcpField
B
brmarket-mcp

brmarket-mcp

Local
github.com/thomenzSearch0Updated 15w ago

About brmarket-mcp

brmarket-mcp is an MCP server for searching Brazilian marketplace products and estimating import taxes. It combines results from Mercado Livre, Shopee and AliExpress in a normalized format, with marketplace status reported per source; the README says it is built but not yet published.

Key features

  1. 01Combined marketplace product search
  2. 02Search by product image
  3. 03Normalized BRL prices and links
  4. 04Free import-tax and landed-price estimate
  5. 05Per-marketplace source status

Use cases

  1. 01Compare offers across three marketplaces
  2. 02Find a product from a photo
  3. 03Estimate the final cost of an imported purchase

MCP support

The MCP server exposes product search, image search, preview and import-tax calculation tools to MCP clients. Paid search tools use x402 micropayments in USDC on Base or Solana; preview and tax calculation are free.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"thomenz-brmarket": {
"command": "npx",
"args": [
"-y",
"brmarket-mcp"
],
"env": {
"EVM_PRIVATE_KEY": "<EVM_PRIVATE_KEY>",
"SOLANA_PRIVATE_KEY": "<SOLANA_PRIVATE_KEY>",
"SOLANA_RPC_URL": "<SOLANA_RPC_URL>",
"BRMARKET_BASE_URL": "<BRMARKET_BASE_URL>",
"X402_NETWORK": "<X402_NETWORK>"
}
}
}
}
Run commandnpx -y brmarket-mcp
Environment variables to set
EVM_PRIVATE_KEYSecret0x private key of a DEDICATED wallet holding USDC on Base. OPTIONAL: product search and the tax calculator are free and work without any wallet; only search_by_image and the link comparison return 402 without it.
SOLANA_PRIVATE_KEYSecretbase58 or JSON-array secret key of a DEDICATED Solana wallet holding USDC (pays per call). Configure this and/or EVM_PRIVATE_KEY; the x402 layer settles on whichever rail the 402 advertises.
SOLANA_RPC_URLOptional Solana RPC override used to build the payment (e.g. a Helius URL).
BRMARKET_BASE_URLBase URL of a brmarket Worker. Defaults to the hosted production API (https://brmarket.thomenz.me).
X402_NETWORK'base' (mainnet, default) or 'base-sepolia' (testnet).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmbrmarket-mcp0.3.0

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
qstringYesWhat to search for, e.g. 'iphone 14 pro'.
ufstringNoBuyer's 2-letter Brazilian state (e.g. SP), for the ICMS rate in landed-price estimates. Default: 20% ceiling.
sortenumNoDefault price_asc (cheapest first).price_asc | price_desc | relevance
limitintegerNoResults in the merged page. Default 10, max 20.
rerankbooleanNoOpt-in LLM relevance pass (~400ms, free). Turn it ON whenever the query has a cheaper accessory, part or homonym: it drops offers that merely contain the words (a coffee FILTER for 'cafeteira', an AirPods CASE for 'fone bluetooth', a wired earphone for a bluetooth query). See `relevance` in the response for what each pass removed.
max_pricenumberNoMaximum price in BRL.
min_pricenumberNoMinimum price in BRL (e.g. 199.90).
marketplacearrayNoRestrict the search to these marketplaces. Default: all three.

Details

From the project README

brmarket-mcp

MCP server for Brazilian marketplace product search, paid automatically with x402 micropayments (USDC on Base or Solana).

One call searches Mercado Livre, Shopee and AliExpress together and returns a single normalized shape: BRL prices in integer cents, canonical + affiliate links, and a per-marketplace sources state so a degraded marketplace is never silent. A free import-tax calculator turns a price into the real landed price — the honest "best value with Brazilian import tax" comparison.

Status: not published yet. [email protected] is built and ready; publishing to npm and the MCP registry is a manual step. See Publishing below.

Tools

ToolPriceWhat it does
search_products$0.01Mercado Livre + Shopee + AliExpress in one call. Normalized BRL prices (integer cents), canonical + affiliate links, free shipping, rating, sold count, seller id/name/official-store, dataAsOf.
search_by_image$0.05Same, but from a product photo. Returns interpreted_query so you can see what was actually searched.
search_products_previewfreeOne result, canonical link only, no affiliate link.
calculate_import_taxesfreeBrazilian import tax + landed price of a cross-border purchase (Import Tax 0% ≤ US$50 else 30% − US$20, ICMS por-dentro by state, Bacen PTAX rate). BRL cents or USD in; pass uf on search_products too for per-offer landed_price_estimate.
Always read sources

Every response reports each marketplace as ok / error / timeout / not_configured. A short result list may mean a marketplace was down, not that the market is thin. Never present a degraded page as the whole market.

Install

npx brmarket-mcp

Claude Desktop / Claude Code (claude_desktop_config.json):

{
  "mcpServers": {
    "brmarket": {
      "command": "npx",
      "args": ["-y", "brmarket-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "0x…"
      }
    }
  }
}

The free preview tool works with no wallet at all.

Environment

VariableRequiredDescription
EVM_PRIVATE_KEYno0x… key of a dedicated wallet holding USDC on Base.
SOLANA_PRIVATE_KEYnobase58 or JSON-array secret key of a dedicated Solana wallet holding USDC.
SOLANA_RPC_URLnoRPC override used to build the Solana payment (e.g. a Helius URL).
BRMARKET_BASE_URLnoDefaults to https://brmarket.thomenz.me.
X402_NETWORKnobase (default) or base-sepolia.

Configure either rail, or both — the x402 layer settles on whichever the server's 402 advertises. Without any key, paid tools fail with HTTP 402.

⚠️ These keys spend real money. Use dedicated wallets with small balances, never a personal or treasury key. Anything that can read this process' environment can spend from them.

Develop

npm install
npm run build          # tsc -> dist/
npm run typecheck
npm run version:check  # all FIVE version sites must agree

Publishing (manual — Thiago only)

npm run version:check   # wired into prepublishOnly too
npm publish

Then verify the tarball from the registry, not the local build:

npm pack brmarket-mcp@<version> --registry https://registry.npmjs.org
tar -xzOf brmarket-mcp-<version>.tgz package/dist/index.js | grep -o 'version: "[^"]*"'

A green build proves nothing about what was published — brdata-mcp 0.3.4 shipped from a stale source copy and its MCP handshake reported 0.3.2 while npm said 0.3.4. Check the tarball.

For the MCP registry, server.json carries the full environmentVariables block. Do not drop it: brdata-mcp 0.3.3 published without it and the registry entry lost every variable.

License

MIT © Thiago Menzinger

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.