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 分