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 许可。

Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    This MCP server connects clients with Shopify store data, enabling retrieval of product and customer information via exposed tools.
    Last updated -
    5
    MIT License
  • A
    security
    A
    license
    A
    quality
    MCP server that integrates with Shopify API, allowing Claude Desktop users to retrieve and manipulate product information from Shopify stores.
    Last updated -
    5
    2
    MIT License
    • Apple
  • -
    security
    F
    license
    -
    quality
    An MCP Server that provides access to the Jumpseller e-commerce platform API, allowing users to interact with Jumpseller's functionality through natural language commands.
    Last updated -
    • Linux
    • Apple
  • -
    security
    F
    license
    -
    quality
    An MCP server that enables large language models to directly access and analyze Amazon product information, including product details, variants, and reviews.
    Last updated -

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