{
  "openapi": "3.0.3",
  "info": {
    "title": "MassageInChina — Official Public REST & MCP API",
    "version": "1.0.0",
    "description": "MassageInChina is a practical cultural and wellness reference helping international visitors navigate legitimate hospital TCM Tuina departments, licensed blind acupressure clinics (Mangren Anmo), and boutique foot reflexology chains across Beijing, Shanghai, Chengdu, and Guangzhou. Includes meridian acupoint charts, realistic RMB price benchmarks, zero-tipping etiquette, Alipay/WeChat booking tips, and Mandarin/Pinyin pressure communication cards.",
    "contact": {
      "name": "MassageInChina",
      "url": "https://massageinchina.com",
      "email": "admin@massageinchina.com"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "externalDocs": {
    "description": "MassageInChina Official Web Workbench",
    "url": "https://massageinchina.com"
  },
  "servers": [
    {
      "url": "https://massageinchina.com",
      "description": "Production Cloudflare Global Edge"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional API Key for Albato / automation tracking (e.g. pk_live_massageinchina_2026)"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "verifyApiConnection",
        "summary": "Verify MassageInChina API Key & Service Health",
        "description": "Authentication test and metadata endpoint for Albato App Integrator, RapidAPI, Make, and custom workflows.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Authenticated connection status and tool count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "authenticated": {
                      "type": "boolean",
                      "example": true
                    },
                    "service": {
                      "type": "string",
                      "example": "MassageInChina"
                    },
                    "domain": {
                      "type": "string",
                      "example": "massageinchina.com"
                    },
                    "version": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "toolsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools": {
      "get": {
        "operationId": "listAvailableTools",
        "summary": "List All MassageInChina Read-Only Tools & Schemas",
        "responses": {
          "200": {
            "description": "Array of available read-only tools"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "getMcpServerMetadata",
        "summary": "Get MassageInChina MCP Server Metadata",
        "responses": {
          "200": {
            "description": "MCP Server metadata and Grade-A tool annotations"
          }
        }
      },
      "post": {
        "operationId": "invokeMcpJsonRpc",
        "summary": "Execute Streamable HTTP JSON-RPC 2.0 MCP Request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "id",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "example": "2.0"
                  },
                  "id": {
                    "type": "integer",
                    "example": 1
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "initialize",
                      "tools/list",
                      "tools/call"
                    ],
                    "example": "tools/list"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response envelope"
          }
        }
      }
    },
    "/api/v1/tools/lookup_tcm_acupoints_and_tuina": {
      "post": {
        "operationId": "lookup_tcm_acupoints_and_tuina",
        "summary": "TCM Tuina Acupoints & Clinic Modality Lookup",
        "description": "Look up Traditional Chinese Medicine (TCM) Tuina massage modalities, blind clinical massage (Mangren Anmo), meridian acupoints, and RMB pricing.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symptomOrTopic": {
                    "type": "string",
                    "description": "Symptom or topic (e.g. \"neck pain\", \"lower back\", \"foot reflexology\", \"jet lag\")"
                  }
                },
                "required": [
                  "symptomOrTopic"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from lookup_tcm_acupoints_and_tuina"
          }
        }
      }
    },
    "/api/v1/tools/generate_mandarin_massage_phrase_card": {
      "post": {
        "operationId": "generate_mandarin_massage_phrase_card",
        "summary": "Bilingual Mandarin & Pinyin Massage Clinic Communication Card",
        "description": "Generate ready-to-show Chinese character and Pinyin communication cards for adjusting pressure, specifying sore areas, or declining add-ons.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "string",
                    "enum": [
                      "lighter-pressure",
                      "stronger-pressure",
                      "focus-neck-shoulders",
                      "avoid-lower-back",
                      "no-cupping-scraping"
                    ],
                    "description": "Communication intent to display in Mandarin characters and Pinyin to the massage therapist"
                  }
                },
                "required": [
                  "intent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from generate_mandarin_massage_phrase_card"
          }
        }
      }
    },
    "/api/v1/tools/compare_china_massage_venue_types": {
      "post": {
        "operationId": "compare_china_massage_venue_types",
        "summary": "Hospital TCM Dept vs Blind Tuina vs Foot Spa Chain Comparator",
        "description": "Compare clinical rigor, typical RMB cost, tipping norms (zero tipping), and booking workflow across Chinese massage venue categories.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cityTier": {
                    "type": "string",
                    "enum": [
                      "tier1-shanghai-beijing",
                      "tier2-chengdu-xian-hangzhou"
                    ],
                    "description": "Target Chinese city tier for RMB pricing comparison (Tier 1 Shanghai/Beijing vs Tier 2 Chengdu/Xian/Hangzhou)"
                  }
                },
                "required": [
                  "cityTier"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from compare_china_massage_venue_types"
          }
        }
      }
    },
    "/api/v1/tools/check_tuina_cupping_contraindications": {
      "post": {
        "operationId": "check_tuina_cupping_contraindications",
        "summary": "Clinical Tuina, Cupping (Baguan) & Gua Sha Safety Checklist",
        "description": "Check medical contraindications and travel timing tips before receiving deep orthopedic Tuina, fire cupping, or Gua Sha.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modality": {
                    "type": "string",
                    "enum": [
                      "deep-tuina",
                      "fire-cupping",
                      "gua-sha",
                      "foot-soak"
                    ],
                    "description": "Traditional Chinese bodywork modality to inspect for medical contraindications and aftercare"
                  }
                },
                "required": [
                  "modality"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from check_tuina_cupping_contraindications"
          }
        }
      }
    }
  }
}