Charlotte Food Grades MCP
Query food inspection grades and violations for Charlotte/Mecklenburg County, NC, with tools for searching establishments, getting details, finding nearby, and score distributions.
README
Charlotte Metro Food Grades
Interactive map of food-service inspection grades across Charlotte / Mecklenburg County, NC, backed by scraped public inspection data, plus a live MCP server over the same dataset.
- Map: deployed on Vercel (Git integration; project root directory =
site/) - Data source: Mecklenburg County Environmental Health via the state's public CDPEHS lookup (see docs/DATA-SOURCE.md for the CDPEHS-vs-EHIDS decision and the reverse-engineered data paths)
- Spec: docs/SPEC.md
How it works
CDPEHS (public.cdpehs.com, county 60)
│ CSV export (date-chunked) + grid walk → violation pages
▼
pipeline/ ──► data/db.duckdb ──► site/data/facilities.geojson ──► Vercel (MapLibre site)
▲ │
│ └──► GitHub release asset `data-latest` ──► MCP server (Fly.io)
└── weekly GitHub Action
- Weekly refresh (.github/workflows/refresh.yml):
downloads the previous DuckDB from the
data-latestrelease, grid-walks the last ~35 days of inspections (learning internal CDP ids and fetching violation details), geocodes new facilities via the Census Bureau batch geocoder, exports GeoJSON, republishes the DB, and commits the refreshedsite/data/— which triggers a Vercel redeploy. - History is kept from ~2014 (earliest data in CDPEHS for Mecklenburg).
Pipeline
python3.12 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python -m pipeline.ingest backfill --start 2014-01-01 # one-time seed
.venv/bin/python -m pipeline.ingest update --days 35 # incremental + violations
.venv/bin/python -m pipeline.ingest geocode # Census batch geocoder
.venv/bin/python -m pipeline.ingest export # site/data/*.geojson
.venv/bin/python -m pipeline.ingest weekly # update+geocode+export
Each source window is fetched independently — one failed window doesn't kill a run.
Every record carries fetched_at; the site shows per-facility provenance.
Map site
Static, no backend: MapLibre GL JS over OpenFreeMap vector tiles, grade-colored clustered points (green A / yellow B / red C-or-below / gray ungraded), a detail panel with score sparkline, latest violations, and a link to the official county record. Filters: facility type, grade, name/address search, recently-inspected. Serve locally with any static server:
python3 -m http.server -d site 8000
MCP server
Remote MCP server (streamable HTTP at /mcp) over the same DuckDB file — read-only, no
auth, IP rate-limited. Tools: search_establishments, get_establishment,
nearby_establishments, score_distribution.
cd mcp-server
pip install -r requirements.txt
DB_PATH=../data/db.duckdb python server.py # local
fly launch --no-deploy && fly deploy # Fly.io; set DB_URL secret first
The deployed server boots by downloading the DuckDB file from the data-latest GitHub
release and re-checks every 24 h.
Disclaimer
This is an unofficial visualization of public Mecklenburg County inspection records, refreshed weekly. A facility's grade can change between refreshes; the county lookup is the authoritative record. Inspection type and permit status are not exposed by the public county system and are omitted.
Resolved decisions (2026-07-05)
- CDPEHS vs. EHIDS — CDPEHS; EHIDS's API requires state CAS login (details).
- Facility types in v1 — full Food & Facilities Sanitation scope, filterable on the map.
- Phase 2 civic layers — deferred (Charlotte Code Enforcement, Quality of Life Explorer).
- MCP hosting — Fly.io.
- MCP access — open read-only + rate limiting.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.