{
  "$schema": "https://modelcontextprotocol.io/schema/server-card/v1",
  "serverInfo": {
    "name": "HousingSurvey Pro MCP",
    "version": "1.0.0"
  },
  "description": "API-key authenticated Model Context Protocol server for HousingSurvey Pro: read work orders and evidence, verify a record's tamper-evident hash, raise and assign work orders — scoped exactly like REST API v1.",
  "protocolVersion": "2025-06-18",
  "transport": {
    "type": "streamable-http",
    "endpoint": "https://api.housingsurvey.pro/mcp"
  },
  "authentication": {
    "type": "bearer",
    "description": "Organisation API key (Bearer hsp_live_...), minted in the management portal under Integrations -> API keys. See https://housingsurvey.pro/auth.md",
    "documentation": "https://housingsurvey.pro/auth.md"
  },
  "capabilities": {
    "tools": {
      "listChanged": false
    }
  },
  "rateLimits": {
    "dataAccessTools": "240 requests/minute per organisation — SHARED with REST API v1 (one combined budget, not additive; see /auth.md)",
    "discovery": "unmetered (initialize, ping, tools/list, and the scope-free get_contact_and_data_rights tool)",
    "exceeded": "JSON-RPC 2.0 error object, HTTP 429, with Retry-After and X-RateLimit-* headers"
  },
  "tools": [
    {
      "name": "list_work_orders",
      "description": "List this organisation's work orders. Optional args: status, jobType, limit (max 200). Requires scope work-orders:read.",
      "requiresScope": "work-orders:read"
    },
    {
      "name": "read_work_order",
      "description": "Read one work order by id, including statutory-clock stage timestamps. Requires scope work-orders:read.",
      "requiresScope": "work-orders:read"
    },
    {
      "name": "raise_work_order",
      "description": "Create a new work order. Args: propertyAddress (required unless propertyId/uprn given), postcode, description, externalRef, dueBy, jobType (awaab-damp-mould|emergency|general). Requires scope work-orders:write.",
      "requiresScope": "work-orders:write"
    },
    {
      "name": "assign_work_order",
      "description": "Assign an existing work order to a surveyor by email (must already be a member of your organisation). Args: id, assignedToEmail. Requires scope work-orders:write.",
      "requiresScope": "work-orders:write"
    },
    {
      "name": "list_evidence",
      "description": "List the finalized survey records (evidence) for a work order or the whole organisation. Optional args: workOrderId, limit (max 200). Requires scope surveys:read.",
      "requiresScope": "surveys:read"
    },
    {
      "name": "verify_record_hash",
      "description": "Re-derive a finalized survey's hash SERVER-SIDE (the same canonicalisation finalizeSurvey used) and confirm it matches the stored chain — proves the record has not been tampered with. Args: id. Requires scope surveys:read.",
      "requiresScope": "surveys:read"
    },
    {
      "name": "get_contact_and_data_rights",
      "description": "How to contact HousingSurvey Pro and how an organisation exercises data rights (export/deletion). No scope required.",
      "requiresScope": null
    }
  ],
  "documentation": "https://housingsurvey.pro/developers/"
}