Charlotte Open City Data

io.github.ajwann由 GitHub 帳號 ajwann 發布v1.0.1更新於 Nov 2, 2026

Charlotte and Mecklenburg County open data: addresses, crime, 311, zoning, budget, and services

已驗證Streamable HTTP可網頁執行位置與生活安全與監控資料與分析

概覽

AI 產生的概覽

唯讀的夏洛特與梅克倫堡郡開放資料 MCP 伺服器,可回答地址、犯罪、311、分區、公車與預算等居民問題。

可以做什麼
  • 查詢地址資訊:所屬議會選區、警政與消防服務、分區、洪泛區、地塊編號、垃圾與回收時間表
  • 查看安全狀況:某地點附近的犯罪、依轄區分組的犯罪趨勢與彙總、附近交通事故
  • 了解市政服務與社區變化:附近的 311 通報、法規執法案件、道路封閉、資本專案、待審重新分區
  • 尋找周邊場所,涵蓋圖書館、學校、公園、藥局、充電樁、公車站等 18 類,並查詢公車路線班次
  • 查看政府資料:城市預算數字與彙總後的薪資統計
  • 探索整個資料入口網:以關鍵字搜尋資料集、檢視圖層欄位、執行帶 SQL 篩選的查詢與分組彙總
適用情境
適合需要夏洛特或梅克倫堡郡官方資訊的情境,例如某地址由哪些服務涵蓋、道路是否封閉、犯罪趨勢如何變化、城市預算投注何處。也適合在不撰寫 ArcGIS 查詢的情況下瀏覽該市開放資料目錄。
執行需求
可作為託管 HTTP 端點使用,透過 Google 登入並依電子郵件允許清單授權;也可透過 queensestate 的 PyPI 套件以 uvx 或 Python 3.14 虛擬環境在本機以 stdio 執行。開放資料入口網不需 API 金鑰,但需要能連線至市與郡的 GIS 主機。
安裝前請注意
託管端點要求 Google 登入且僅允許清單中的電子郵件。自行託管 HTTP 傳輸需設定 QUEENSESTATE_PUBLIC_URL、QUEENSESTATE_GOOGLE_CLIENT_ID、QUEENSESTATE_GOOGLE_CLIENT_SECRET 與 QUEENSESTATE_ALLOWED_EMAILS。工具皆為唯讀,但資料來自第三方且更新頻率不一,地理編碼僅涵蓋梅克倫堡郡,犯罪地點經過概化處理。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Charlotte Open City Data,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.ajwann%2Fqueensestate/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "charlotte-open-city-data": {
      "type": "http",
      "url": "https://queensestate.adamwanninger.com/mcp"
    }
  }
}

README

QueensEstate ♔⛫

[CI]

An MCP server that lets an LLM answer Charlotte residents' everyday questions with official public data from the City of Charlotte Open Data Portal — https://data.charlottenc.gov.

The portal lives at data.charlottenc.gov. It is an ArcGIS Hub site; its ~380 datasets are ArcGIS REST layers run by the City of Charlotte and Mecklenburg County. No API key is required.

What's on the portal

A survey of the catalog (/api/feed/dcat-us/1.1.json) shows these main themes:

ThemeExamples
Public safetyCMPD incidents (870k+ since 2017, updated daily), homicides, traffic stops, fire incident reports, crashes
City services311 service requests (3.4M), solid-waste collection routes, code enforcement cases, street closures
Planning & zoningZoning, rezoning petitions, historic districts, 2040 policy map, floodplains, parcels
TransportationCATS bus routes and stops, LYNX light rail, park-and-ride, bike lanes, sidewalks, greenways
PlacesLibraries, schools, parks, fire/police stations, pharmacies, grocery stores, EV chargers, day care
GovernmentCapital projects, budget, employee salaries, council and commissioner districts
DemographicsCensus block groups/tracts, Quality of Life neighborhood profiles

Tools

The tools are chosen for the questions residents actually ask. Every tool is read-only, and every location parameter accepts either an address ("600 E 4th St, Charlotte") or "latitude,longitude".

My address

ToolAnswers questions like
get_address_profile"Who is my council member?" "What police division and fire station serve me?" "What's my zoning? Am I in a flood zone or historic district?"
get_trash_and_recycling_schedule"What day is trash pickup? Is this a recycling week (GREEN/ORANGE)?"
lookup_address"Is this a valid address? What's its parcel ID and municipality?"

Safety

ToolAnswers questions like
get_crime_near"Any car break-ins near my apartment this month?"
summarize_crime"How have robberies in Charlotte changed since 2019?" "Which division has the most burglaries?"
get_traffic_crashes_near"Is the intersection by my kid's school dangerous?"

City services and neighborhood change

ToolAnswers questions like
get_311_requests_near"Has anyone already reported this pothole or streetlight?"
get_code_enforcement_cases"Does the house I'm renting have open housing-code violations?"
get_street_closures"Are any roads closed on my commute?"
get_capital_projects_near"What's being built near me, when is it done, and who do I contact?"
get_pending_rezonings"Is anyone trying to rezone land near my neighborhood?"

Places and transit

ToolAnswers questions like
find_nearby_placesNearest library, school, park, greenway, pharmacy, grocery store, EV charger, light rail station, bus stop, public Wi-Fi… (18 categories)
get_bus_route"How often does the 9 run on Sunday evenings?"

Government transparency

ToolAnswers questions like
get_city_budget"How much does the city budget for Police?"
get_city_salary_stats"What do Charlotte firefighters earn on average?" (aggregates only, no names)

Anything else in the catalog

ToolPurpose
search_datasetsKeyword search over the whole portal
describe_datasetFields, types, and record count for a layer
query_datasetSQL-filtered records from any layer, optionally near a location
summarize_datasetServer-side counts/sums grouped by fields

Setup

Requires Python 3.14 (developed on 3.14.7).

bash
~/.pyenv/versions/3.14.7/bin/python -m venv .venv.venv/bin/python -m pip install -e . --group dev

Use with Claude Code

bash
claude mcp add queensestate -- /absolute/path/to/queensestate/.venv/bin/queensestate

Use with Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "queensestate": {      "command": "/absolute/path/to/queensestate/.venv/bin/queensestate"    }  }}

Other transports and debugging

bash
.venv/bin/queensestate --transport http --port 8000        # http://127.0.0.1:8000/mcpnpx @modelcontextprotocol/inspector .venv/bin/queensestate  # interactive inspector

The http transport authenticates its callers with Google OAuth and refuses to start without a public URL, a Google client, and an allow list — see Hosting. To try it locally:

bash
QUEENSESTATE_PUBLIC_URL=http://localhost:8000 \QUEENSESTATE_GOOGLE_CLIENT_ID=... QUEENSESTATE_GOOGLE_CLIENT_SECRET=... \[email protected] \  .venv/bin/queensestate --transport http --port 8000

Hosting

The hosted server runs on Google Cloud Run at https://queensestate.adamwanninger.com/mcp, and is its own OAuth 2.1 authorization server: it delegates the sign-in to Google purely to learn which account is calling, then checks that address against an allow list and mints its own tokens. Google's tokens are never passed through to the MCP client.

bash
claude mcp add --transport http queensestate https://queensestate.adamwanninger.com/mcp

scripts/deploy-gcp.sh provisions and deploys the whole thing, and re-running it is also how you update. See deploy/GCP.md.

Hosting is only for the HTTP transport. Running the server locally over stdio needs no Google account, no allow list, and none of the cloud dependencies.

Development

bash
.venv/bin/pytest                 # unit + in-memory MCP tests; no network access.venv/bin/ruff format --check . && .venv/bin/ruff check ..venv/bin/mypy

Layout:

  • src/queensestate/arcgis.py: async ArcGIS REST / Hub client (timeouts, bounded retries, host allowlist)
  • src/queensestate/address.py: address matching against the county Master Address layer
  • src/queensestate/catalog.py: the curated layers behind the purpose-built tools
  • src/queensestate/server.py: the MCP tools

Data notes and limitations

  • Geocoding uses Mecklenburg County's Master Address layer, so only addresses inside the county resolve. Coordinates outside the county are rejected.
  • Freshness varies by dataset: CMPD incidents, 311 requests, and code enforcement are current within days; the Budget Report dataset currently runs FY2018–FY2023. Tools report what the portal publishes.
  • CMPD locations are generalized by the department for privacy.
  • 311 data records when requests were received, not when they were resolved.
  • Timestamps are ISO 8601 in Charlotte local time with the UTC offset (e.g. 2026-09-06T00:00:00-04:00). The underlying services store UTC.
  • Budget amounts include large negative lines (e.g. "00 Non Department", Charlotte Water), so get_city_budget reports both the net total and the sum of positive lines.
  • Statistics limits: some city map services ignore resultRecordCount on aggregate queries, so the client enforces row limits itself.
  • Live bus arrivals are not on the portal; pair this server with a CATS real-time source. Bus stop IDs from find_nearby_places match CATS stop IDs.
  • The generic tools only reach hosts that serve portal datasets (gis.charlottenc.gov, meckgis.mecklenburgcountync.gov, services.arcgis.com, gis.ci.charlotte.nc.us).
  • Mecklenburg County's server rejects default Python user agents, so the client sends its own.

Ideas for more tools

  • Neighborhood Quality of Life indicators by NPA (income, age, housing, amenities)
  • Charlotte Fire incident reports by address block
  • CMPD officer traffic-stop statistics
  • Sidewalk and bike network gaps near an address
  • Tree canopy and land surface temperature by neighborhood

License

MIT - see LICENSE.

來源:README.md,提交 ef76ed5

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

2
  1. v1.0.1最新Sep 20, 2026
  2. v1.0.0Sep 20, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分