关于 king-county-permit-status
面向 King County, WA 地址、地块号或许可证号的只读建筑许可查询服务,适用于需要查看许可状态与历史的用户。它整合县级和城市数据源;无法实时查询的辖区会提供对应门户及后续查询说明。
主要功能
- 01按地址、地块号或许可证号查询
- 02汇总许可状态、类型与时间范围
- 03按日期及许可类型筛选
- 04说明已查询的辖区和数据源
- 05为不支持的辖区提供门户链接
适用场景
- 01查询房屋地址的建筑许可历史
- 02检查地块相关许可及开放状态
- 03遇到无实时数据的辖区时前往市政门户
MCP 相关
托管服务提供只读 MCP 工具 `king_county_permit_status`,通过 Streamable HTTP 接收查询参数。MCP 客户端可连接 `https://permits-api.secondlandings.ai/mcp`。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://permits-api.secondlandings.ai/mcpclaude mcp add --transport http chaoz23-king-county-permit-status https://permits-api.secondlandings.ai/mcp{"mcpServers":{"chaoz23-king-county-permit-status":{"type":"http","url":"https://permits-api.secondlandings.ai/mcp"}}}在 Cursor 中打开{"servers":{"chaoz23-king-county-permit-status":{"type":"http","url":"https://permits-api.secondlandings.ai/mcp"}}}在 VS Code 中打开{"mcpServers":{"chaoz23-king-county-permit-status":{"type":"http","url":"https://permits-api.secondlandings.ai/mcp"}}}{"mcpServers":{"chaoz23-king-county-permit-status":{"serverUrl":"https://permits-api.secondlandings.ai/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
1| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| limit | integer | 否 | 返回的许可证数上限(最新优先)。summary 始终涵盖全部匹配结果,因此请先设置较小值,仅在需要查看记录时再调高。 |
| query | string | 否 | 以下之一:街道地址('1817 Morris Ave S, Renton WA 98055')、10 位地块编号(普通格式 '7222000353' 或带格式 '722200-0353'),或许可证编号('B25000947'、'ADDC21-0275'、'23-127651-LP'、'6145915-CN')。自动检测输入类型。 |
| since | string | 否 | 仅返回在此日期当天或之后申请/签发的许可证(YYYY-MM-DD)。 |
| types | array | 否 | 与每个许可证的类型进行不区分大小写的子字符串匹配,例如 ['electrical', 'mechanical']。 |
| license | string | 否 | WA L&I 承包商许可证编号——按许可证编号进行相同搜索。请替代 query 使用。 |
| contractor | string | 否 | 承包商公司名称(子字符串)——返回其在 MyBuildingPermit 各城市申办的许可证。请替代 query 使用。 |
详细介绍
金县许可状态
查询美国华盛顿州金县各辖区的建筑许可记录与状态——同一地址可能同时涉及县级许可(化粪池、重点区域、土地平整)和市级许可(建筑、机械、电气)。辖区提供开放许可数据源时,可实时查询;其他地区则会提供正确的市政门户链接。
当前覆盖情况: 🟢 20/39 个城市支持实时查询(状态 + 记录)· 🟠 19/39 个城市已建立索引(金县评估师提供已签发许可记录;当前状态需查询城市门户,next_step 会指出该门户)· 另含未建制的金县。各城市覆盖情况详见下方覆盖评分卡。
python3 lookup.py "27927 E Main St" # by address
python3 lookup.py "7222000353" # by parcel number
python3 lookup.py "B25000947" # by permit number
python3 lookup.py "23-127651-LP" # Bellevue permit number
python3 lookup.py "6145915-CN" # Seattle SDCI permit number
python3 lookup.py --pipe "27927 E Main St" # agent pipeline mode
python3 lookup.py --limit 10 --since 2020-01-01 --type electrical "27927 E Main St" # shape: newest 10 electrical since 2020
python3 lookup.py --all "27927 E Main St" # every permit (default is the 50 newest + a summary of all)
python3 lookup.py --schema # print tool definition
托管 API + MCP(无需安装)
同一查询服务以只读方式提供,无需身份验证,地址为 permits-api.secondlandings.ai
(server.py,零依赖;参见 deploy/README.md):
| MCP(Streamable HTTP) | POST https://permits-api.secondlandings.ai/mcp — 工具 king_county_permit_status,参数 query |
| REST | GET https://permits-api.secondlandings.ai/api/lookup?q=1817+Morris+Ave+S,+Renton+WA — 可选参数 limit、since=YYYY-MM-DD、types=electrical,mechanical |
| 供应商映射 | /vendor-map(以及 /vendor-map.json)— 列出 39 个城市各自使用的许可系统、查询方式或无法查询的原因、电气主管部门以及按类型划分的路由;根据适配器配置生成(scripts/gen_vendor_map.py,另见 docs/vendor-map.md) |
| OpenAPI 3.1(类型化) | /openapi.json · Agent 指引 /llms.txt · CLI 定义 /tool.json · /healthz |
结果为实时数据;服务端会将每个查询缓存 15 分钟,并按客户端限流(每分钟 30 次),以保护市政门户。已知的仅限托管版问题: Tyler 托管的 Civic Access(Redmond)会向数据中心 IP 返回 403,因此通过托管端点查询 Redmond 时,结果会包含评估师索引以及带有 reason: source_blocked 的 next_step,而不会包含 Redmond 的实时记录;如需查询这些记录,请在本地运行 lookup.py。其他所有数据源都可通过该服务获取。可使用 python3 server.py 或 docker compose up 自行运行——server.json 是 MCP Registry 清单。
按地块编号搜索时,会查询所有受支持的 MyBuildingPermit 和实时城市门户,因为仅凭地块编号无法确定其所属城市辖区。
地址搜索按地理位置而非邮寄城市路由:使用金县四县地理编码器对地址进行地理编码,再将坐标点与城市边界多边形进行比对。位于未建制金县的“肯特,WA”地址会按县级辖区查询,而非按肯特市查询;不含城市名的地址也会被正确路由,而不是扩展到所有辖区;位于皮尔斯县一侧的 Milton/Pacific/Auburn 地址会获得 pierce: 地块 ID。只有在地理编码失败时才使用邮寄城市(jurisdiction.basis 会说明依据)。
你将获得什么
{
"action": "found",
"permit_count": 2,
"searched": ["Renton (EnerGov)"],
"permits": [
{
"permit_number": "E26000458",
"type": "Residential Electrical Permit",
"status": "Issued",
"description": "Electrical Work (Garage & Garage Exterior): ...",
"address": "1817 Morris Ave S Renton WA 98055",
"jurisdiction": "Renton",
"applied_date": "2026-01-28",
"issued_date": "2026-01-28",
"finaled_date": null,
"expires_date": "2027-07-27",
"portal": "https://permitting.rentonwa.gov",
"record_url": null,
"is_open": true
}
],
"trust_level": "live",
"fetched_at": "2026-10-08T19:02:11+00:00",
"parcel_id": "king:7222000353",
"cite_as": "King County Permit Status (github.com/chaoz23/king-county-permit-status), queried 2026-10-08 via Renton (EnerGov)"
}
| 字段 | 描述 |
|---|---|
action | found(已返回许可)、none(没有匹配项)、refine(连接问题) |
permit_count | 筛选前找到的唯一许可数量(= summary.total) |
summary | 请先从这里获取答案。 根据匹配 since/types 的所有许可计算,而非仅根据返回的记录:total、matched、returned、truncated、open、closed、status_unknown、by_type、by_status、by_year、years [最早年份,最新年份]、latest |
permits | 最多返回 limit 条记录(默认为 50),按时间从新到旧排列——包含 356 项许可的商业地块,未经精简约有 56k 个 token;摘要涵盖了全貌 |
filters | 生成此响应的 limit / since / types |
searched | 已搜索的辖区 |
separate_portal | 如果该城市使用不受支持的门户:城市名称 + URL + 文字说明 |
next_step | 面向 Agent 的 separate_portal 结构化对应项:kind: manual_portal_search、reason(no_feed / electrical_only / parcel_resolution_failed / source_incomplete / source_blocked——该城市的实时系统通过 403 拒绝了此客户端)、portal_url(已知时为门户的实际搜索页面——PermitTrax、LAMA、OpenGov、Kent)、vendor、search_by(该页面接受的输入;需要登录时为空)、query、query_type、covers_electrical、hint |
errors | 搜索不完整时的来源错误;也可能同时包含来自成功来源的许可 |
trust_level | live(所有适用来源均已响应)、partial(某个来源出错或达到结果上限——参见 errors)、fallback(没有可搜索的数据源)。需要手动访问门户的城市(next_step)属于范围事实,并不表示不可信,因此不会再降低此值 |
fetched_at | 查询的 UTC 时间戳——记录为实时数据,从不缓存 |
parcel_id | 以县为命名空间的地块标识,例如 king:7222000353 或 pierce:5985002900;查询目标为地块或已解析为地块时提供 |
jurisdiction | 查询被路由到何处以及原因:city、basis(city-limits = 地理编码点位于该城市多边形内——权威依据;geocoder-city;address-text = 查询中的邮寄城市,仅在地理编码失败时使用)、county、unincorporated(true → 仅查询县级许可,即使邮寄城市显示为 "Kent") |
routing_by_type | 已解析地点中各类许可的归属位置——building、mechanical_plumbing、electrical、land_use、engineering_row、fire、grading、septic → {system, portal, live, note}。live: true 表示此工具已搜索该系统;否则,portal 指明应前往何处查询(例如,化粪池许可始终由 King County Public Health 管理;电气许可归 L&I 管理,除非该城市自行管理) |
address_resolution | 地理编码器对地址的匹配程度:matched_address、score、match_type(point = 精确地址点;interpolated = 将门牌号定位到街道沿线;street)、partial_match、street_number_snapped、parcel_basis(若 PIN 来自插值点下方或附近的地块图层,则为 address-point、parcel-polygon 或 nearby-parcel;此时 candidate_parcels 会列出其他候选地块) |
cite_as | 用于生成文本的单行署名字符串 |
每项许可包含:permit_number、type、status、is_open(启发式判断,每周通过人口普查数据测试;来源未提供状态时为 null),以及 is_open_basis(finaled_date = 确定;status-vocabulary = 对供应商状态词进行正则匹配;null = 未知)、description、address、jurisdiction、applied_date、issued_date、finaled_date、expires_date、portal、record_url(来源提供时,指向该记录的专属 URL)。
多辖区覆盖
| 来源 | 城市 / 范围 |
|---|---|
| MyBuildingPermit.com | Auburn、Bellevue、Bothell、Burien、Edmonds、Federal Way、Issaquah、Kenmore、King County(未建制地区)、Kirkland、Mercer Island、Mill Creek、Newcastle、Sammamish、Snoqualmie |
| Bellevue Open Data(实时 ArcGIS API) | Bellevue 每日许可证快照(1998 年起),支持按地址、地块和许可证编号搜索 |
| Seattle Open Data(实时 Socrata API) | 支持按 Seattle 地址和许可证编号搜索建筑、电气、行业和土地用途许可证;地块编号查询通过 Assessor 网站地址进行(数据集没有地块列) |
| Renton EnerGov(实时 API) | Renton 所有类型的许可证,包括电气许可证 |
| Redmond EnerGov Civic Access(实时 API) | Redmond 所有类型的许可证,包括电气许可证,支持按地址、地块和许可证编号搜索 |
| Accela Citizen Access(实时) | Woodinville,以及 King County 自有机构处理的未建制地区地址(包括较早的历史记录、执法和 MyBuildingPermit 未收录的电气记录),支持按地址、地块和许可证编号搜索 |
| SmartGov(实时) | Normandy Park 和 Carnation,支持按地址、地块和许可证编号搜索 |
| King County Assessor 地块索引 | King County 每个地块的已签发许可证历史记录(编号、类型、描述、签发日期、价值、签发城市)——这是 19 个没有公共门户的城市唯一的数据源。它记录各城市申报的估值:建筑/改建/扩建许可证(部分为电气许可证),2023 年左右以来记录密集,此前较少,最早可追溯至 20 世纪 90 年代末;不含行业子许可证或检查记录,也不含状态。地址查询使用地理编码后的地块,地块查询则直接使用地块 |
| LAMA(实时) | SeaTac,支持按地址和许可证编号搜索(包括 SeaTac 自行管理的电气许可证;门户不提供地块搜索;每次查询最多返回最新的 200 条记录) |
| Shoreline eTRAKiT(实时) | 支持按 Shoreline 地址、地块和许可证编号搜索建筑、机械/管道和土地用途许可证(门户搜索不公开状态/描述) |
| WA State L&I | 自 2020 年起为不自行处理电气许可证的城市提供电气许可证数据 |
覆盖情况一览
根据 routing_data.json 自动生成(python3 scripts/gen_scorecard.py --write)。King County 每个城市一行。
图例 — ✅ 实时(状态 + 历史记录) · 🗂️ 索引(估值申报的建筑历史记录 · Building 栏中 ✅/🗂️ 后面的数字是该城市 QC 地址(参见 qc_addresses.json)的记录数——表示 King County Assessor 地块索引实际收录的记录量——无状态、无子许可证,2023 年左右以来记录密集) · ➖ 仅 L&I 电气许可证(2020 年起) · ⚠️ 缺口(城市自行管理电气许可证,尚未集成)
健康状态 = 对该城市数据源进行的上次每周实时探测(scripts/source_health.py,2026-10-26):✅ 有记录 · ⚪ 查询成功,但已知有效查询返回零行 · ⛔ 被阻止(403) · ❌ 不可用 · ❔ 未检查 · — 无实时数据源
| 城市 | 状态 | 来源 | 健康状况 | 建筑 | 电气 | 机械/管道 | 土地用途 |
|---|---|---|---|---|---|---|---|
| Algona | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 2 | ➖ L&I | 🗂️ index | 🗂️ index |
| Auburn | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 133 | ➖ L&I | ✅ | ✅ |
| Beaux Arts Village | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 5 | ➖ L&I | 🗂️ index | 🗂️ index |
| Bellevue | 🟢 在线 | Bellevue (Open Data) | ✅ | ✅ 360 | ✅ | ✅ | ✅ |
| Black Diamond | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 2 | ➖ L&I | 🗂️ index | 🗂️ index |
| Bothell | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 117 | ➖ L&I | ✅ | ✅ |
| Burien | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 27 | ✅ | ✅ | ✅ |
| Carnation | 🟢 在线 | Carnation (SmartGov) | ✅ | ✅ 2 | ➖ L&I | ✅ | ✅ |
| Clyde Hill | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 3 | ➖ L&I | 🗂️ index | 🗂️ index |
| Covington | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 24 | ➖ L&I | 🗂️ index | 🗂️ index |
| Des Moines | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 17 | ⚠️ 缺口 | 🗂️ index | 🗂️ index |
| Duvall | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 1 | ➖ L&I | 🗂️ index | 🗂️ index |
| Enumclaw | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 3 | ➖ L&I | 🗂️ index | 🗂️ index |
| Federal Way | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 120 | ✅ | ✅ | ✅ |
| Hunts Point | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 2 | ➖ L&I | 🗂️ index | 🗂️ index |
| Issaquah | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 57 | ➖ L&I | ✅ | ✅ |
| Kenmore | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 77 | ➖ L&I | ✅ | ✅ |
| Kent | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 7 | ➖ L&I | 🗂️ index | 🗂️ index |
| Kirkland | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 2 | ✅ | ✅ | ✅ |
| Lake Forest Park | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 1 | ➖ L&I | 🗂️ index | 🗂️ index |
| Maple Valley | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 8 | ➖ L&I | 🗂️ index | 🗂️ index |
| Medina | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 5 | ➖ L&I | 🗂️ index | 🗂️ index |
| Mercer Island | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 12 | ✅ | ✅ | ✅ |
| Milton | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 0 | ⚠️ 缺口 | 🗂️ index | 🗂️ index |
| Newcastle | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 85 | ➖ L&I | ✅ | ✅ |
| Normandy Park | 🟢 在线 | Normandy Park (SmartGov) | ✅ | ✅ 22 | ✅ | ✅ | ✅ |
| North Bend | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 2 | ➖ L&I | 🗂️ index | 🗂️ index |
| Pacific | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 8 | ➖ L&I | 🗂️ index | 🗂️ index |
| Redmond | 🟢 在线 | Redmond (EnerGov Civic Access) | ✅ | ✅ 32 | ✅ | ✅ | ✅ |
| Renton | 🟢 在线 | Renton (EnerGov) | ✅ | ✅ 24 | ✅ | ✅ | ✅ |
| Sammamish | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 11 | ✅ | ✅ | ✅ |
| SeaTac | 🟢 在线 | SeaTac (LAMA) | ✅ | ✅ 178 | ✅ | ✅ | ✅ |
| Seattle | 🟢 在线 | Seattle (SDCI Open Data) | ✅ | ✅ 131 | ✅ | ✅ | ✅ |
| Shoreline | 🟢 在线 | Shoreline (eTRAKiT) | ✅ | ✅ 53 | ➖ L&I | ✅ | ✅ |
| Skykomish | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 3 | ➖ L&I | 🗂️ index | 🗂️ index |
| Snoqualmie | 🟢 在线 | MyBuildingPermit | ✅ | ✅ 57 | ➖ L&I | ✅ | ✅ |
| Tukwila | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 6 | ⚠️ 缺口 | 🗂️ index | 🗂️ index |
| Woodinville | 🟢 在线 | Woodinville (Accela) | ✅ | ✅ 9 | ➖ L&I | ✅ | ✅ |
| Yarrow Point | 🟠 已索引 | KC Assessor index | ✅ | 🗂️ index 1 | ➖ L&I | 🗂️ index | 🗂️ index |
| 金县(非建制地区) | 🟢 在线 | MyBuildingPermit (King County) + KC Accela | ✅ | ✅ | ➖ L&I | ✅ | ✅ |
**覆盖范围:20/39 个在线 · 19/39 个已索引(通过 Assessor 获取已签发历史记录;状态需查询城市门户)。另包括金县(非建制地区)**的县级许可证(化粪池、重点区域、土地平整)。
⚠️ 电气许可缺口: Des Moines、Milton、Tukwila。这些城市自行管理电气许可项目(因此不经过 L&I),且未接入 MyBuildingPermit,因此我们搜索的任何数据源都没有它们的电气许可记录。自行管理电气许可的 MBP 城市(Burien、Federal Way、Kirkland、Mercer Island、Sammamish)不属于缺口——已于 2026-07-15 确认,MBP 收录了它们的电气许可历史。剩余缺口的补齐工作由覆盖率史诗任务跟踪。
ℹ️ 跨县城市: Milton(大部分位于 Pierce County)、Pacific 和 Auburn 横跨 King County 与 Pierce County 的边界。每个城市都为全市范围签发自己的许可,因此 实时 行适用于两侧;但 🗂️ Assessor 索引属于 King County,因此对于有索引的跨县城市(Milton),只有 King County 一侧的地块有索引记录;Pierce County 一侧的地址仅提供门户链接。不会搜索 Pierce County 的门户。地块 ID 会加上县名命名空间前缀(
king:…/pierce:…),原因即在于此。
全部 39 个已建制 King County 城市均可识别。对于不在可搜索数据源范围内的城市,会标出其市政门户 URL,而不会将其视为 King County 非建制地区。
对于以逗号分隔的地址,地点部分优先于同样出现在街道名称中的城市名(例如,Kent Kangley Rd, Covington)。如果无法将 Renton 地址解析为地块以进行其实时
EnerGov 搜索,结果会保留 Renton 门户作为可操作的备用选项。
Seattle 地址和精确许可证编号搜索会查询全部四个官方 SDCI
Open Data 数据集;目前尚不支持仅凭地块查询 Seattle。
Kent 的官方许可证状态页面目前要求用户登录市门户,因此 Kent 结果会将该页面列为手动备用选项。
退出代码
| 代码 | 操作 | 含义 |
|---|---|---|
| 0 | found | permits[] 已填充 |
| 1 | none / refine | 没有许可证或连接问题 |
| 2 | reject | 输入无效 |
面向 Agent
仓库根目录中的 tool.json 包含完整的工具定义,采用 Anthropic/OpenAI 工具调用格式。Agent 可以直接加载该文件,或获取实时版本:
python3 lookup.py --schema
{
"name": "king_county_permit_status",
"description": "Look up building permit history and status for any King County, WA property...",
"input_schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Street address, 10-digit parcel number, or permit number..."
}
},
"required": ["query"]
},
"output_schema": { ... },
"invocation": {
"command": "python3 lookup.py --pipe \"{query}\"",
"exit_codes": {
"0": "action=found — permits[] is populated",
"1": "action=none or refine — no permits or connection issue",
"2": "action=reject — bad input"
}
}
}
流水线模式:
# Get all permits at an address, extract open ones
python3 lookup.py --pipe "1817 Morris Ave S, Renton WA" \
| python3 -c "
import sys, json
d = json.load(sys.stdin)
open_statuses = {'Issued', 'In Review', 'On Hold', 'Pending'}
open_permits = [p for p in d.get('permits', []) if p['status'] in open_statuses]
print(json.dumps(open_permits, indent=2))
"
本系列中的相关工具:
king-county-address-to-parcel-number— 将地址解析为地块编号wa-contractor-license— 核实 WA 承包商许可证状态及违规记录king-county-property-tax-appeal— 生成可直接提交的税务申诉材料包
要求
- Python 3.10+(仅使用标准库,无依赖项)
- 可访问上方来源表中市级和县级主机的网络(MyBuildingPermit、Tyler/Accela/SmartGov/eTRAKiT/LAMA 门户、Seattle 和 Bellevue Open Data、
gismaps.kingcounty.gov、blue.kingcounty.com、secure.lni.wa.gov)
开发
使用以下命令运行无需网络的回归测试套件:
python3 -m unittest discover -s tests -v
承包商搜索
python3 lookup.py --contractor "Brambila" # what a contractor has pulled
python3 lookup.py --license BRAMBSL123AA # same, by L&I license number
并发搜索 MyBuildingPermit 的 People 索引,覆盖其所有辖区(Auburn、Bellevue、
Bothell、Burien、Edmonds、Federal Way、Issaquah、Kenmore、King County、Kirkland、Mercer
Island、Mill Creek、Newcastle、Sammamish、Snoqualmie),并按申请日期区间拆分繁忙承包商的搜索;使用相同的架构和 summary。coverage_note 会说明哪些城市不在承包商搜索范围内(Seattle、Renton、Redmond、Shoreline、SeaTac、
Woodinville、Normandy Park、Carnation——这些城市门户的承包商搜索尚未实现)。可与 wa-contractor-license
配合使用,以检查许可证/保证金/保险。托管 API 也支持:?contractor= / ?license=,
以及 MCP 工具的 contractor / license 参数。
质量检查
四层检查,各自回答不同的问题:
| 检查 | 问题 | 运行时间 |
|---|---|---|
python3 -m unittest discover -s tests | 代码是否仍按原来的方式运行?(使用模拟数据,离线运行) | 每次推送时及每周一由 CI 运行 |
python3 scripts/qc_scorecard.py | 每条评分卡记录是否都能在实际运行中按所述表现? 每个城市使用一个真实地址(qc_addresses.json);预期结果根据用于呈现评分卡的同一分类方式得出——实时数据行必须返回该城市自身来源的记录,索引数据行必须返回 Assessor 历史记录以及 next_step,电气列必须与搜索内容相符 | 每周一(非阻塞),或手动运行 |
python3 scripts/qc_smoke.py | 真实、伪造和边缘输入是否能端到端地合理路由? | 每周一(非阻塞) |
python3 scripts/source_health.py | 每个适配器是否仍能响应已知有效的查询?它返回哪些状态词汇? | 每周一 → source_health.json → 评分卡的健康状态列 |
许可证
MIT——参见 LICENSE。许可数据来自上文列出的市政和县级公共来源;引用结果时请使用 cite_as 字段。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。