feat: 添加 Strapi 配置文件支持
- 新增 config.yaml:集中管理 Strapi API 配置 - 新增 config_loader.py:配置加载模块 - 更新 http_routes.py:从配置文件读取 API 端点 - 支持从 YAML 文件配置 FAQ 分类和语言 - 更新 requirements.txt:添加 pyyaml 依赖 优势: - 配置与代码分离,易于维护 - 添加新分类无需修改代码 - 支持热加载配置 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
97
mcp_servers/strapi_mcp/config.yaml
Normal file
97
mcp_servers/strapi_mcp/config.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
# Strapi MCP 配置文件
|
||||
# 根据 docs/strapi.txt 中的接口定义配置
|
||||
|
||||
strapi:
|
||||
base_url: https://cms.yehwang.com
|
||||
api_token: "" # 留空表示不需要认证
|
||||
|
||||
# 支持的语言
|
||||
languages:
|
||||
- code: en
|
||||
name: English
|
||||
- code: nl
|
||||
name: Nederlands
|
||||
- code: de
|
||||
name: Deutsch
|
||||
- code: es
|
||||
name: Español
|
||||
- code: fr
|
||||
name: Français
|
||||
- code: it
|
||||
name: Italiano
|
||||
- code: tr
|
||||
name: Türkçe
|
||||
|
||||
# FAQ 分类配置
|
||||
faq_categories:
|
||||
register:
|
||||
endpoint: faq-register
|
||||
description: 账号相关
|
||||
keywords:
|
||||
- account
|
||||
- register
|
||||
- login
|
||||
- password
|
||||
|
||||
order:
|
||||
endpoint: faq-order
|
||||
description: 订单相关
|
||||
keywords:
|
||||
- order
|
||||
- place order
|
||||
- cancel order
|
||||
- modify order
|
||||
|
||||
pre-order:
|
||||
endpoint: faq-pre-order
|
||||
description: 预售订单相关
|
||||
keywords:
|
||||
- pre-order
|
||||
- reserve
|
||||
- pre-sale
|
||||
|
||||
payment:
|
||||
endpoint: faq-payment
|
||||
description: 支付相关
|
||||
keywords:
|
||||
- payment
|
||||
- pay
|
||||
- checkout
|
||||
- voucher
|
||||
- discount
|
||||
|
||||
shipment:
|
||||
endpoint: faq-shipment
|
||||
description: 运输相关
|
||||
keywords:
|
||||
- shipping
|
||||
- delivery
|
||||
- transit
|
||||
- courier
|
||||
|
||||
return:
|
||||
endpoint: faq-return
|
||||
description: 退货相关
|
||||
keywords:
|
||||
- return
|
||||
- refund
|
||||
- complaint
|
||||
- defective
|
||||
|
||||
other:
|
||||
endpoint: faq-other-question
|
||||
description: 其他问题
|
||||
keywords:
|
||||
- other
|
||||
- general
|
||||
|
||||
# 公司信息端点
|
||||
info_sections:
|
||||
contact:
|
||||
endpoint: info-contact
|
||||
description: 联系信息和营业时间
|
||||
|
||||
# API 端点模板
|
||||
api_templates:
|
||||
faq: "/api/{category}?populate=deep&locale={locale}"
|
||||
info: "/api/{section}?populate=deep&locale={locale}"
|
||||
Reference in New Issue
Block a user