Skip to main content
Glama
Demontie

Products API MCP Server

by Demontie

我的第一个 MCP 项目

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

目录

Related MCP server: openfoodfacts-mcp-server

特征

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

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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