设置指南 · API 密钥

Claude Code

将 Hillbase 添加到你的本地编程工作区。

先注册一个免费 Hillbase 账户。 在你的账户中创建 API 密钥,并妥善保密。

连接 Hillbase

  1. 在你的 Hillbase 账户中创建密钥,并在 Bash 终端中导出 HILLBASE_API_KEY。
  2. 运行下面的命令。用户作用域可让凭据不进入项目共享的 MCP 文件;本地客户端会将其保存在自己的配置中。
  3. 启动 Claude Code,使用 /mcp 确认 Hillbase 已连接。然后粘贴下方的第一个提示词。
Bash · 设置 Hillbase 密钥
# Paste the key shown once in your Hillbase account.
# Run in a private terminal; keep keys out of source control.
read -r -s -p "Hillbase API key: " HILLBASE_API_KEY; printf '\n'
export HILLBASE_API_KEY
Bash · 添加服务器
claude mcp add --transport http --scope user hillbase https://api.hillbase.com/mcp \
  --header "X-API-Key: $HILLBASE_API_KEY"

客户端设置可能会变化。当前的客户端要求请参阅Claude Code MCP 指南。

提出第一个问题

第一个提示词
Use Hillbase address_profile for point latitude 51.045417, longitude -114.055404, region AB, locality Calgary. Summarize the school assignments, transit and property context. Report each section's coverage status; do not treat unsupported or no_match as proof that something does not exist.

下面的固定摘录来自 MCP 工具所使用的同一个地址概况 API。你的助手的措辞和当前记录可能有所不同。

真实捕获的响应. 仅显示部分回答字段和列表项。捕获的数值可能与当前数据不同。

{
  "schema_version": "hillbase.v0",
  "data": {
    "point": {
      "lat": 51.045417,
      "lng": -114.055404
    },
    "sections": {
      "school_assignments": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": [
          {
            "school": {
              "name": "Bowcroft School"
            },
            "catchment": {
              "program": "German Bilingual Program (K-6)",
              "school_year": "2026-2027"
            }
          },
          {
            "school": {
              "name": "Glenmeadows School"
            },
            "catchment": {
              "program": "Spanish Bilingual Program (K-12)",
              "school_year": "2026-2027"
            }
          }
        ]
      },
      "transit": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "name": "NB 3 ST @ 7 AV SE",
              "routes": [
                {
                  "short_name": "302",
                  "long_name": "BRT Southeast/City Centre"
                }
              ]
            },
            {
              "name": "NB 3 ST @ 7 AV SE",
              "routes": [
                {
                  "short_name": "1",
                  "long_name": "Bowness/Forest Lawn"
                },
                {
                  "short_name": "117",
                  "long_name": "McKenzie Towne Express"
                }
              ]
            }
          ]
        }
      },
      "zoning": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "zone_code": "CC-ET",
              "zone_description": "Centre City East Village Transition"
            }
          ]
        }
      },
      "parks_nearby": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "name": "OLYMPIC PLAZA",
              "park_type": "regional"
            },
            {
              "name": "PAGET PARK",
              "park_type": "local"
            }
          ]
        }
      }
    }
  },
  "coverage": {
    "status": "partial",
    "outcome": "resolved"
  },
  "retrieved_at": "2026-10-29T22:58:38.063675Z"
}
查看每个部分的覆盖范围
{
  "air_quality": {
    "status": "partial",
    "outcome": "resolved"
  },
  "livability": {
    "status": "partial",
    "outcome": "resolved"
  },
  "traffic": {
    "status": "partial",
    "outcome": "resolved"
  },
  "waste_collection": {
    "status": "partial",
    "outcome": "no_match"
  },
  "road_restrictions": {
    "status": "stale",
    "outcome": "resolved"
  },
  "enforcement": {
    "status": "partial",
    "outcome": "resolved"
  },
  "collisions": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "climate_projections": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "building_energy": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "site_conditions": {
    "status": "partial",
    "outcome": "resolved"
  },
  "nearby_industrial_emitters": {
    "status": "partial",
    "outcome": "resolved"
  },
  "economy": {
    "status": "supported",
    "outcome": "resolved"
  },
  "health_facility_status": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "health_indicators": {
    "status": "supported",
    "outcome": "resolved"
  },
  "housing_market": {
    "status": "supported",
    "outcome": "resolved"
  },
  "development_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "land_constraints": {
    "status": "partial",
    "outcome": "resolved"
  },
  "school_assignments": {
    "status": "supported",
    "outcome": "resolved"
  },
  "schools_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "amenities": {
    "status": "supported",
    "outcome": "resolved"
  },
  "permits_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "transit": {
    "status": "supported",
    "outcome": "resolved"
  },
  "regulated_businesses_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "businesses_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "facilities_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "community_services": {
    "status": "supported",
    "outcome": "resolved"
  },
  "parcel": {
    "status": "supported",
    "outcome": "resolved"
  },
  "zoning": {
    "status": "supported",
    "outcome": "resolved"
  },
  "hazards": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "property_values": {
    "status": "supported",
    "outcome": "no_match"
  },
  "demographics": {
    "status": "supported",
    "outcome": "resolved"
  },
  "parks_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "crime": {
    "status": "supported",
    "outcome": "resolved"
  }
}

核对回答

阅读每个分区的 coverage.status 和 coverage.outcome。部分支持或不支持的分区并不能证明不存在记录。如果连接返回 401,请检查导出的密钥是否有效,并已被客户端继承。429 响应会包含 Retry-After 响应头。

在你的账户中撤销密钥,并更新本地配置。 连接会使用你的 Hillbase 套餐额度。

下一步:查询 CSV、保存 Signal,或浏览端点参考。