npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mercadona-mcp

v1.0.1

Published

MCP Server for Mercadona Online Store

Readme

Mercadona MCP Server

Claude Desktop Cursor Antigravity

An MCP Server for the Mercadona Online Store. This server gives AI assistants (like Claude or Cursor) superpowers to manage your grocery shopping: search products, build carts, and analyze your history.


🚀 Quick Start

Add this to your claude_desktop_config.json or Cursor MCP settings. No manual installation required!

{
  "mcpServers": {
    "mercadona": {
      "command": "npx",
      "args": ["-y", "mercadona-mcp"] 
    }
  }
}

Note: Since this is a local project, you might point to the directory instead:

{
  "mcpServers": {
    "mercadona": {
      "command": "node",
      "args": ["/path/to/mercadona-mcp/dist/index.js"]
    }
  }
}

First Run: You need to log in. Just ask your AI: "Log me in to Mercadona" and follow the instructions it gives you (it uses the login tool).


✨ Capabilities

🛒 Product Search & Details

  • Search: find products by name (e.g., "leche", "hummus"). The server filters out unavailable items.
  • Details: Get full specs, packaging info, and nutrition facts.

📦 Complete Cart Management

  • View Cart: See what's currently in your basket and the total price.
  • Add/Remove: Add single items or bulk add multiple items at once.
  • Clear: Empty the entire cart in one go.

🧠 Smart Cart (AI-Powered)

  • Predictive Shopping: The calculate_smart_cart tool analyzes your last year of orders to find items you buy regularly (e.g., every 2 weeks) and checks if you are due for a restock.
  • Resource: View the results anytime at mercadona://smart_cart.

📜 Order History

  • Recent Orders: List your last purchases.
  • Resource: Get a fast JSON dump at mercadona://recent_orders.

⚡ Live Resources

The server exposes MCP Resources: | Resource | Description | | :--- | :--- | | mercadona://cart | Live JSON view of your current shopping cart. | | mercadona://smart_cart | The latest recommendations from the Smart Cart algorithm. | | mercadona://recent_orders | A list of your last 20 orders. |


🔐 Authentication

This server needs a valid Mercadona session (MO-user token) and location data (postal_code, warehouse_id) to work.

Option A: AI-Assisted (Recommended)

  1. Ask: "Log me in to Mercadona."
  2. Follow: The AI will use the login tool to guide you. It usually involves:
    • Opening a browser to the login page.
    • You logging in manually.
    • The AI grabbing the credentials from the browser storage and saving them strictly to your local machine (~/.mercadona_auth.json).

Option B: Manual Setup

If you prefer to grab the token yourself:

  1. Log in to tienda.mercadona.es.
  2. Open Developer Tools (F12) > Application.
    • Local Storage: Copy the value of MO-user.
    • Cookies: Find __mo_da and decode it (it contains your warehouse/zip).
  3. Create ~/.mercadona_auth.json:
    {
        "local_storage": {
            "MO-user": "{\"token\": \"...\", \"uuid\": \"...\"}"
        },
        "location": {
            "postal_code": "46001",
            "warehouse_id": "4115"
        }
    }

🛠️ Configuration

You can override the default auth file location using an environment variable:

"env": {
  "MERCADONA_AUTH_FILE": "/absolute/path/to/my_auth.json"
}

👩‍💻 Development

To run from source:

git clone https://github.com/aganoob/mercadona-mcp
cd mercadona-mcp
npm install
npm run build
npm start

Legacy Python

The original Python implementation is available in legacy_python/.