Token导航 LogoToken导航TokenDH.com
Example MCP Server N8n Retail logo
搜索检索未说明官方级别未说明来源级核验

Example MCP Server N8n Retail

MCP Server

一个用于购物助手的模型上下文协议(MCP)服务器,提供搜索、读取、写入工具和提示,用于与购物系统交互。

工具数

11

提示词数

0

GitHub Stars

0

资源数

0
TypeScriptClaude搜索Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

heldiapriadi

提供方

heldiapriadi

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

n8n购物助手MCP服务器

这是购物助理的模型上下文协议(MCP)服务器实现。它提供了工具和提示,可供Claude等MCP客户端与购物系统交互。

特性

搜索工具

  • search_products –按关键字搜索产品
  • list_categories –列出所有可用的产品类别
  • list_recommendations –返回人工智能生成的产品推荐

阅读工具

  • get_product_detail –获取单个产品的详细信息
  • get_cart_contents –返回当前用户的购物车
  • get_chat_history –返回用户会话中的先前消息

写入工具

  • create_cart –为用户会话启动新购物车
  • add_to_cart –将产品添加到购物车
  • update_cart_item –更改购物车中商品的数量
  • create_order –完成结账并创建订单
  • save_user_message –将用户消息记录到聊天记录中

提示

  • 产品推荐:为给定的用户输入或产品建议相关或互补的项目
  • 购物车摘要:用自然语言总结用户购物车中的内容
  • 订单确认:生成包含总价、交货信息等的确认摘要。

入门指南

先决条件

  • Node.js 18或更高版本
  • npm或纱线

安装

  1. 克隆存储库
git clone https://github.com/yourusername/n8n-mcp-server.git
cd n8n-mcp-server
  1. 安装依赖项
npm install
  1. 构建项目
npm run build
  1. 启动服务器
npm start

默认情况下,服务器将在端口3000上启动。您可以通过设置来更改端口 PORT 环境变量。

端点

  • 现代MCP端点(流式HTTP): http://localhost:3000/mcp
  • 传统MCP端点(SSE): http://localhost:3000/sse
  • 健康检查: http://localhost:3000/health

与克劳德一起使用

要将此MCP服务器与Claude一起使用,您可以通过Claude Desktop应用程序或使用MCP TypeScript SDK客户端的Claude API进行连接。

通过克劳德桌面连接

  1. 启动服务器
  2. 在Claude Desktop中,转到“设置”>“模型上下文协议”
  3. 使用URL添加新服务器 http://localhost:3000/mcp

Claude使用示例

I'd like to search for some snacks. Can you show me what's available?

[Claude will use the search_products tool to look for snacks]

I'd like to add some Oreo cookies to my cart.

[Claude will use the create_cart and add_to_cart tools]

Can you show me what's in my cart?

[Claude will use the get_cart_contents tool and the cart-summary prompt]

I'd like to checkout now.

[Claude will use the create_order tool and the order-confirmation prompt]

发展

要在开发模式下运行服务器并自动重启,请执行以下操作:

npm run dev

项目结构

  • src/index.ts -主服务器实现
  • src/models.ts -数据模型和函数

目录标签

目录标签

TypeScriptClaude搜索购物助手本地部署MCP服务器产品搜索购物车管理订单处理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

11

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP