Products API MCP Server

Products API MCP Server

An MCP server that retrieves product data from the DummyJSON API, supporting filtering by various parameters like ID, title, category, brand, price and rating.

Category
Visit Server

README

My First MCP Project

This project demonstrates the use of MCP (Model Context Protocol) server that retrieves data from the DummyJSON API. Built using Cursor IDE with the default agent.

Table of Contents

Features

Products API Tools

  • get_products
    • Description: Get a list of products with optional filtering and pagination
    • Parameters:
      • id (string, optional): Filter products by ID
      • q (string, optional): Filter products by title
      • category (string, optional): Filter products by category
      • brand (string, optional): Filter products by brand
      • price (number, optional): Filter products by price
      • rating (number, optional): Filter products by rating
      • skip (number, optional, default: 0): Number of products to skip
      • limit (number, optional, default: 10): Maximum number of products to return
    • Returns: A list of products matching the specified criteria
    • Data Source: DummyJSON API (https://dummyjson.com/products)

Installation and Usage

Prerequisites

  • Node.js (version 23 or higher)
  • Docker and Docker Compose
  • WSL2 (if using Windows)

Using Docker (Recommended)

  1. Clone the repository:
git clone [repository-url]
cd my-first-mcp
  1. Install dependencies:
npm install
  1. Compile TypeScript:
npm run build
  1. Start containers using Docker Compose:
docker-compose up -d

⚠️ Important Notes

For WSL Users

If you're using WSL on Windows, you might encounter connection issues when using "localhost". Follow these steps:

  1. Find your WSL IP:
ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'
  1. Use this IP instead of "localhost" in the PostgreSQL connection string

Cursor Configuration

To configure this MCP server with Cursor:

  1. Open Cursor
  2. Press:
    • Windows/Linux: Ctrl + Shift + P
    • macOS: Cmd + Shift + P
  3. Type "Configure MCP Server" and select it
  4. Add the appropriate configuration based on your setup:

For Windows (without WSL) or Linux:

{
  "mcpServers": {
    "postgres": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_PROJECT/src/index.ts"]
    }
  }
}

For WSL Users:

{
  "mcpServers": {
    "postgres": {
      "command": "wsl.exe",
      "args": [
        "-e",
        "ABSOLUTE_PATH_TO_NODE/.nvm/versions/node/v23.11.0/bin/node",
        "ABSOLUTE_PATH_TO_PROJECT/src/index.ts"
      ]
    }
  }
}

To find your Node.js path, run:

which node

License

This project is licensed under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured