Skip to main content
Glama

Products API MCP Server

by Demontie

我的第一个 MCP 项目

该项目演示了如何使用 MCP(模型上下文协议)服务器从DummyJSON API 检索数据。使用 Cursor IDE 和默认代理构建。

目录

特征

产品 API 工具

  • 获取产品
    • 描述:获取具有可选过滤和分页功能的产品列表
    • 参数:
      • id (字符串,可选):按 ID 过滤产品
      • q (字符串,可选):按标题过滤产品
      • category (字符串,可选):按类别过滤产品
      • brand (字符串,可选):按品牌过滤产品
      • price (数字,可选):按价格过滤产品
      • rating (数字,可选):按评级过滤产品
      • skip (数字,可选,默认值:0):要跳过的产品数量
      • limit (数字,可选,默认值:10):返回的最大产品数量
    • 返回:符合指定条件的产品列表
    • 数据来源:DummyJSON API( https://dummyjson.com/products

安装和使用

先决条件

  • Node.js(版本 23 或更高版本)
  • Docker 和 Docker Compose
  • WSL2(如果使用 Windows)

游标配置

要使用 Cursor 配置此 MCP 服务器:

  1. 打开游标
  2. 按:
    • Windows/Linux: Ctrl + Shift + P
    • macOS: Cmd + Shift + P
  3. 输入“配置 MCP 服务器”并选择它
  4. 根据您的设置添加适当的配置:
对于 Windows(不带 WSL)或 Linux:
{ "mcpServers": { "postgres": { "command": "node", "args": ["ABSOLUTE_PATH_TO_PROJECT/src/index.ts"] } } }
对于 WSL 用户:
{ "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" ] } } }

要查找您的 Node.js 路径,请运行:

which node

执照

该项目已获得 MIT 许可。

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

MCP 服务器从 DummyJSON API 检索产品数据,支持通过 ID、标题、类别、品牌、价格和评级等各种参数进行过滤。

  1. 目录
    1. 特征
      1. 产品 API 工具
    2. 安装和使用
      1. 先决条件
    3. 游标配置
      1. 对于 Windows(不带 WSL)或 Linux:
      2. 对于 WSL 用户:
    4. 执照

      Related MCP Servers

      • A
        security
        F
        license
        A
        quality
        A lightweight, stateless MCP server utilizing Puppeteer for web searches, returning structured JSON results, easily integratable with other MCP-enabled systems.
        Last updated -
        1
        645
        JavaScript
      • A
        security
        A
        license
        A
        quality
        An API server that implements the Model Completion Protocol (MCP) for Cryo blockchain data extraction, allowing users to query Ethereum blockchain data through any MCP-compatible client.
        Last updated -
        5
        86
        Python
        MIT License
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        An MCP server that enables fetching web content using the Node.js undici library, supporting various HTTP methods, content formats, and request configurations.
        Last updated -
        66
        8
        TypeScript
        MIT License
        • Apple
        • Linux
      • A
        security
        F
        license
        A
        quality
        An MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.
        Last updated -
        39
        28
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/Demontie/my-first-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server