Sponsored by Deepsite.site

My MCP Server

Created By
Chopin858 months ago
Content

My MCP Server

This project is a Model Context Protocol (MCP) server for interacting with the Mon Marché french grocery store website. It provides tools to search for products and add them to a cart using a command-line interface.

Features

  • Search Products: Search for products by name on the Mon Marché website.
  • Add Products to Cart: Add products to your cart by specifying their name.
  • Session Management: Automatically logs in and manages session cookies for interacting with the website.

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Playwright (installed automatically as a dependency)
  • A Mon Marché account with valid credentials

Installation

  1. Clone the repository:

    git clone https://github.com/Chopin85/mcp-server-monmarche
    cd mcp-server-monmarche
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file based on the .env.example file:

    cp .env.example .env
    

    Fill in your Mon Marché credentials:

    MON_MARCHE_EMAIL=your-email@example.com
    MON_MARCHE_PASSWORD=your-password
    
  4. Build the project:

    npm run build
    

Usage

Build

Before using the tools, you need build:

npm run build

Login Session

Before using the tools, you need to log in to Mon Marché:

npm run login

This will save the session cookies to session-cookie.json.

Start the Server

Run the server:

node build/index.js

The server will start and listen for requests via the standard input/output (stdio) transport.

Tools

Search Products

Use the get_products tool to search for products by name:

{
  "name": "get_products",
  "arguments": {
    "name": "apple"
  }
}

Add Products to Cart

Use the add_product tool to add a product to your cart:

{
  "name": "add_product",
  "arguments": {
    "name": "apple"
  }
}

Commands

You can also run commands directly thefrom CLI:

  • Login: npm run login

Project Structure

  • index.ts: Main server implementation.
  • monmarche.ts: Utility functions for interacting with the Mon Marché website.
  • .env.example: Example environment variables file.
  • tsconfig.json: TypeScript configuration.
  • package.json: Project metadata and scripts.

Development

Build

To compile the TypeScript code:

npm run build

Run in Test Mode

You can run the server directly using @modelcontextprotocol/inspector:

npx @modelcontextprotocol/inspector node build/index.js

Debugging

To debug the Playwright browser, set headless: false in the Playwright launch options in monmarche.ts.

Known Issues

  • Ensure you have valid Mon Marché credentials in the .env file.
  • The session-cookie.json file must exist for the tools to work.

License

This project is licensed under the ISC License.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™