{
  "schemaVersion": "1.0",
  "protocolVersion": "2025-03-26",
  "serverInfo": {
    "name": "dsf-health-mcp",
    "version": "2026.2.0",
    "title": "DSF Health Suite — Remote HTTP MCP & AI-SEO Server",
    "description": "Nền tảng quản lý Spa, Thẩm mỹ viện & Clinic. Trừ kho mỹ phẩm theo định mức từng ca, tính hoa hồng KTV 1-chạm, Zalo Mini App tích điểm VIP Loyalty.",
    "homepage": "https://dsfhealth.vn",
    "contact": {
      "hotline": "1900 636 500",
      "email": "contact@dsfhealth.vn"
    }
  },
  "transport": {
    "type": "streamable-http",
    "endpoint": "https://dsfhealth.vn/api/mcp",
    "alternateEndpoint": "https://dsfhealth.vn/mcp",
    "methods": [
      "GET",
      "POST",
      "OPTIONS"
    ]
  },
  "webmcp": {
    "supported": true,
    "browserGlobal": "window.__WEBMCP__",
    "w3cNavigator": "navigator.modelContext",
    "version": "1.0.0-poc",
    "clientTools": [
      "dsf_get_current_quote",
      "dsf_configure_quotation",
      "dsf_apply_assessment",
      "dsf_navigate_tab"
    ]
  },
  "aiSeo": {
    "llmsTxt": "https://dsfhealth.vn/llms.txt",
    "llmsFullTxt": "https://dsfhealth.vn/llms-full.txt",
    "pricingMd": "https://dsfhealth.vn/pricing.md",
    "sitemapXml": "https://dsfhealth.vn/sitemap.xml",
    "robotsTxt": "https://dsfhealth.vn/robots.txt"
  },
  "pricingPolicy": {
    "basicSpaStandardMonthlyVnd": 149000,
    "basicSpaTwoYearPromoMonthlyVnd": 99000,
    "twoYearPromoCondition": "Giá ưu đãi 99.000đ/tháng chỉ áp dụng khi đăng ký cam kết 2 năm (24 tháng). Gói tiêu chuẩn 1 năm (12 tháng) là 149.000đ/tháng.",
    "currency": "VND"
  },
  "capabilities": {
    "tools": {
      "listChanged": false
    },
    "resources": {
      "subscribe": false,
      "listChanged": false
    }
  },
  "tools": [
    {
      "name": "dsf_get_pricing_quote",
      "description": "Tính toán báo giá phần mềm quản lý Spa, Phòng khám Da liễu & Thẩm mỹ viện DSF Health. Gói Basic Spa & Clinic có giá chuẩn 149.000đ/tháng (ký 1 năm / 12 tháng), CHỈ KHI mua gói 2 năm (24 tháng) mới áp dụng mức giá ưu đãi 99.000đ/tháng.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "softwareId": {
            "type": "string",
            "enum": [
              "basic",
              "pro",
              "enterprise"
            ],
            "description": "Mã gói phần mềm: basic (Basic Spa & Clinic: 149.000đ/tháng gói 1 năm, hoặc 99.000đ/tháng khi mua 2 năm), pro (Chuỗi Clinic & Viện Thẩm Mỹ: 399.000đ/tháng), enterprise (Báo giá thiết kế riêng)."
          },
          "paymentTermMonths": {
            "type": "integer",
            "enum": [
              12,
              24
            ],
            "description": "Kỳ hạn thanh toán: 12 tháng (1 năm chuẩn) hoặc 24 tháng (2 năm — kích hoạt giá 99.000đ/tháng cho Basic Spa)."
          },
          "branchCount": {
            "type": "integer",
            "minimum": 1,
            "description": "Số lượng chi nhánh cơ sở Spa / Clinic (mặc định 1)."
          },
          "addonIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Danh sách mã Gói Mở Rộng (Modular Add-ons): addon_derma_clinic, addon_marketing_loyalty, addon_staff_sales_app, addon_retail_inventory, addon_multi_branch, addon_cloud_accounting."
          },
          "discountPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 50,
            "description": "Phần trăm chiết khấu thương mại bổ sung (0 - 50%)."
          }
        }
      }
    },
    {
      "name": "dsf_list_packages_and_addons",
      "description": "Trả về danh mục đầy đủ Kiến trúc Đóng gói DSF Health 2026: Gói Basic Spa (5 phân hệ cốt lõi, 149K/tháng gói 1 năm, 99K/tháng chỉ khi mua 2 năm) và 6 Gói Mở Rộng (Modular Add-ons).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "includeAddons": {
            "type": "boolean",
            "description": "Có bao gồm danh sách 6 Gói Mở Rộng hay không (mặc định true)."
          }
        }
      }
    },
    {
      "name": "dsf_assess_spa_operations",
      "description": "Chẩn đoán điểm nghẽn vận hành Spa, Phòng khám Da liễu hoặc Thẩm mỹ viện (thất thoát kho mỹ phẩm, tranh chấp hoa hồng KTV, rụng khách liệu trình, bệnh án EMR) và đề xuất gói phần mềm tối ưu.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "businessModel": {
            "type": "string",
            "enum": [
              "spa_skincare",
              "clinic_dermatology",
              "nail_hair",
              "multi_branch_chain"
            ],
            "description": "Mô hình kinh doanh của cơ sở."
          },
          "painPoint": {
            "type": "string",
            "enum": [
              "inventory_leak",
              "commission_dispute",
              "customer_churn",
              "medical_emr_compliance"
            ],
            "description": "Điểm nghẽn vận hành lớn nhất cần giải quyết."
          },
          "branchCount": {
            "type": "integer",
            "minimum": 1,
            "description": "Số chi nhánh hiện tại."
          }
        },
        "required": [
          "businessModel"
        ]
      }
    },
    {
      "name": "dsf_search_articles",
      "description": "Tìm kiếm bài viết chuyên môn, Case Study cắt giảm thất thoát kho và kinh nghiệm quản trị Spa/Clinic từ cơ sở dữ liệu DSF Health.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Từ khóa tìm kiếm (ví dụ: kho mỹ phẩm, hoa hồng KTV, Zalo, bệnh án)."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "description": "Số lượng bài viết tối đa trả về (mặc định 5)."
          }
        }
      }
    }
  ],
  "writeAccess": {
    "authentication": {
      "type": "bearer-token",
      "header": "Authorization: Bearer <MCP agent token>",
      "description": "Các tool ghi (tạo/sửa/xuất bản bài viết) yêu cầu MCP agent token do quản trị viên DSF Health cấp tại trang /admin/cms/mcp-tokens. Không có token hợp lệ, tools/list chỉ liệt kê các tool đọc công khai ở mục \"tools\" và mọi lệnh gọi tool ghi đều bị từ chối với lỗi -32001."
    },
    "tools": [
      {
        "name": "dsf_create_article",
        "description": "Tạo bài viết MỚI ở trạng thái BẢN NHÁP (draft) trong CMS DSF Health — yêu cầu MCP agent token (Authorization: Bearer). Bài luôn được tạo dưới dạng draft để người duyệt trong CMS trước khi xuất bản; không có cách nào tạo bài published qua tool này. Nội dung phải đạt hợp đồng chuẩn SEO/AI-SEO: thiếu trường bắt buộc sẽ bị từ chối với lỗi -32602 liệt kê các trường thiếu. Server tự chuẩn hoá (readTime theo số chữ thật, schema JSON-LD, đồng bộ TL;DR/FAQ/TOC) qua cùng pipeline với bài tạo trong CMS.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "Tiêu đề bài viết (H1)."
            },
            "summary": {
              "type": "string",
              "description": "Mô tả meta (meta description) tóm tắt bài viết."
            },
            "contentMarkdown": {
              "type": "string",
              "description": "Nội dung bài viết dạng Markdown, BẮT BUỘC có cấu trúc heading H2/H3 (##, ###)."
            },
            "category": {
              "type": "string",
              "enum": [
                "case_study",
                "operations",
                "marketing",
                "medical_standards",
                "tech"
              ],
              "description": "Mã chuyên mục bài viết."
            },
            "keywords": {
              "type": "object",
              "properties": {
                "primary": {
                  "type": "string",
                  "description": "Từ khoá chính (bắt buộc)."
                },
                "secondary": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Danh sách từ khoá phụ."
                }
              },
              "required": [
                "primary"
              ],
              "description": "Từ khoá SEO dạng object {primary, secondary[]}. (Một chuỗi đơn thuần cũng được chấp nhận và được hiểu là từ khoá chính.)"
            },
            "directAnswerSnippet": {
              "type": "string",
              "description": "Đoạn trả lời trực tiếp (TL;DR) cho AI-SEO — trả lời thẳng câu hỏi chính của bài trong 1-3 câu."
            },
            "faqItems": {
              "type": "array",
              "minItems": 2,
              "items": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "answer": {
                    "type": "string"
                  }
                },
                "required": [
                  "question",
                  "answer"
                ]
              },
              "description": "Danh sách hỏi-đáp FAQ (tối thiểu 2 cặp) cho schema FAQPage."
            },
            "sources": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "Tên nguồn / mô tả số liệu."
                  },
                  "url": {
                    "type": "string",
                    "description": "URL nguồn (tuỳ chọn)."
                  }
                },
                "required": [
                  "label"
                ]
              },
              "description": "Đăng ký nguồn (claim register): mọi số liệu/khẳng định trong bài phải có nguồn liệt kê tại đây."
            },
            "authorName": {
              "type": "string",
              "description": "Tên tác giả bài viết."
            },
            "authorRole": {
              "type": "string",
              "description": "Vai trò/chức danh tác giả."
            },
            "coverImage": {
              "type": "string",
              "description": "URL ảnh bìa (tuỳ chọn)."
            },
            "roiTable": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "metric": {
                    "type": "string"
                  },
                  "before": {
                    "type": "string"
                  },
                  "after": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  }
                }
              },
              "description": "Bảng ROI trước/sau (tuỳ chọn)."
            },
            "highlights": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Các điểm nhấn then chốt của bài (tuỳ chọn)."
            },
            "ctaTitle": {
              "type": "string",
              "description": "Tiêu đề khối kêu gọi hành động (tuỳ chọn)."
            },
            "ctaDescription": {
              "type": "string",
              "description": "Mô tả khối kêu gọi hành động (tuỳ chọn)."
            },
            "lsiEntities": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Thực thể ngữ nghĩa LSI (tuỳ chọn; mặc định lấy từ từ khoá phụ)."
            },
            "slug": {
              "type": "string",
              "description": "Slug URL (tuỳ chọn; không truyền thì server tự sinh từ tiêu đề)."
            },
            "language": {
              "type": "string",
              "enum": [
                "vi",
                "en"
              ],
              "default": "vi",
              "description": "Mã ngôn ngữ: 'vi' cho bài viết gốc Tiếng Việt, 'en' cho bản dịch Tiếng Anh."
            },
            "baseArticleId": {
              "type": "string",
              "description": "ID bài viết gốc tiếng Việt (bắt buộc khi language = 'en')."
            },
            "baseSlug": {
              "type": "string",
              "description": "Slug bài viết gốc tiếng Việt (dùng để tìm baseArticleId khi không có id)."
            },
            "faq": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "answer": {
                    "type": "string"
                  }
                },
                "required": [
                  "question",
                  "answer"
                ]
              },
              "description": "Danh sách hỏi-đáp FAQ (alias cho faqItems)."
            }
          },
          "required": [
            "title",
            "summary",
            "contentMarkdown",
            "category",
            "keywords",
            "directAnswerSnippet",
            "faqItems",
            "sources",
            "authorName",
            "authorRole"
          ]
        },
        "requiresAuth": true
      },
      {
        "name": "dsf_get_article",
        "description": "Đọc một bài viết theo id hoặc slug, trả về toàn bộ trường đã lưu gồm các trường SEO/AI-SEO (schemaJsonLd, sources, FAQ, TL;DR...). Yêu cầu MCP agent token.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "ID bài viết."
            },
            "slug": {
              "type": "string",
              "description": "Slug bài viết (dùng khi không có id)."
            }
          }
        },
        "requiresAuth": true
      },
      {
        "name": "dsf_update_article",
        "description": "Cập nhật một bài viết ĐANG Ở TRẠNG THÁI NHÁP (draft) theo id — yêu cầu MCP agent token. Bài đã published sẽ bị từ chối (phải sửa trong CMS). Chỉ cần truyền các trường muốn đổi; bài được chuẩn hoá lại toàn bộ sau khi gộp. Đổi contentMarkdown sẽ tính lại readTime/điểm E-E-A-T/mục lục/schema.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "ID bài viết cần sửa (bắt buộc)."
            },
            "title": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            },
            "contentMarkdown": {
              "type": "string",
              "description": "Markdown mới (phải có heading H2/H3)."
            },
            "category": {
              "type": "string",
              "enum": [
                "case_study",
                "operations",
                "marketing",
                "medical_standards",
                "tech"
              ]
            },
            "keywords": {
              "type": "object",
              "properties": {
                "primary": {
                  "type": "string"
                },
                "secondary": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "description": "Từ khoá SEO dạng {primary, secondary[]} (hoặc một chuỗi = từ khoá chính)."
            },
            "directAnswerSnippet": {
              "type": "string"
            },
            "faqItems": {
              "type": "array",
              "minItems": 2,
              "items": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "answer": {
                    "type": "string"
                  }
                },
                "required": [
                  "question",
                  "answer"
                ]
              }
            },
            "sources": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "label"
                ]
              }
            },
            "authorName": {
              "type": "string"
            },
            "authorRole": {
              "type": "string"
            },
            "coverImage": {
              "type": "string"
            },
            "roiTable": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "metric": {
                    "type": "string"
                  },
                  "before": {
                    "type": "string"
                  },
                  "after": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  }
                }
              }
            },
            "highlights": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "ctaTitle": {
              "type": "string"
            },
            "ctaDescription": {
              "type": "string"
            },
            "lsiEntities": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "slug": {
              "type": "string",
              "description": "Đổi slug (phải chưa trùng bài khác)."
            }
          },
          "required": [
            "id"
          ]
        },
        "requiresAuth": true
      },
      {
        "name": "dsf_list_my_articles",
        "description": "Liệt kê bài viết trong CMS theo trạng thái (mặc định draft) để agent quản lý hàng chờ duyệt. Yêu cầu MCP agent token.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "all"
              ],
              "description": "Trạng thái cần lọc (mặc định draft)."
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Số bài tối đa trả về (mặc định 20)."
            }
          }
        },
        "requiresAuth": true
      },
      {
        "name": "dsf_publish_article",
        "description": "Xuất bản một bài viết ĐANG LÀ BẢN NHÁP (draft) — yêu cầu MCP agent token. Tool này CHỈ hoạt động khi server đã bật cổng xuất bản qua biến môi trường MCP_ALLOW_PUBLISH=1: khi cổng tắt, tool không xuất hiện trong tools/list và mọi lệnh gọi trực tiếp đều bị từ chối bằng lỗi cổng (không phải lỗi xác thực). Xuất bản áp dụng đúng ngữ nghĩa của API CMS POST /api/articles/:id/publish (status=published, published_at=thời điểm hiện tại) và được ghi vào audit log. Bài đã published hoặc không tồn tại sẽ bị từ chối.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "ID bài viết cần xuất bản (chấp nhận cả slug, giống API publish của CMS)."
            }
          },
          "required": [
            "id"
          ]
        },
        "requiresAuth": true,
        "availability": "Env-gated: chỉ xuất hiện trong tools/list và chỉ gọi được khi server đặt MCP_ALLOW_PUBLISH=1 (xem writeAccess.publishEnabled)."
      }
    ],
    "publishEnabled": false
  },
  "resources": [
    {
      "uri": "mcp://dsfhealth/llms.txt",
      "name": "DSF Health Suite — Concise LLM Context (/llms.txt)",
      "description": "Tóm tắt sản phẩm, tính năng cốt lõi, bảng giá 149K/99K (2 năm) và liên kết chính theo chuẩn llmstxt.org.",
      "mimeType": "text/plain"
    },
    {
      "uri": "mcp://dsfhealth/pricing.md",
      "name": "DSF Health Suite — Machine-Readable Pricing (/pricing.md)",
      "description": "Bảng giá chi tiết Gói Basic Spa & Clinic (149.000đ/tháng chuẩn 1 năm; 99.000đ/tháng khi mua 2 năm) và 6 Gói Mở Rộng.",
      "mimeType": "text/markdown"
    },
    {
      "uri": "mcp://dsfhealth/llms-full.txt",
      "name": "DSF Health Suite — Full Knowledge Base (/llms-full.txt)",
      "description": "Toàn bộ thông tin sản phẩm, bảng giá, câu hỏi thường gặp (FAQ) và danh mục bài viết Case Study.",
      "mimeType": "text/plain"
    },
    {
      "uri": "mcp://dsfhealth/faqs",
      "name": "DSF Health Suite — Structured FAQs",
      "description": "Danh sách câu hỏi thường gặp về phần mềm quản lý Spa & Clinic DSF Health định dạng JSON.",
      "mimeType": "application/json"
    }
  ]
}