@pipeworx/north-carolina-code
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/north-carolina-code’s. Install: one-click buttons
Connect to just the @pipeworx/north-carolina-code pack
https://gateway.pipeworx.io/north-carolina-code/mcp — only @pipeworx/north-carolina-code’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 2
North Carolina General Statutes by citation, plus full-text topic search. Keyless.
See docs/state-law-probe.md for how this source was verified — every state pack
confirms a MISS is distinguishable from a HIT before shipping, because several
state sites answer HTTP 200 for statutes that do not exist.
Coverage (fleet #2505)
The per-section live path (BySection/Chapter_N/GS_N-M.html) is throttled by
ncleg.gov — measured 82 of 85 calls timed out on 2026-09-29. nc_general_statute
now tries a pre-fetched text first: scripts/ingest-nc-statutes.mjs fetches ncleg.gov’s
own per-CHAPTER bulk documents (ByChapter/Chapter_N.html — 396 requests,
counting lettered subchapters, not ~34,000 per-section requests) and splits
each on its § N-M. Heading. markers, writing one JSON bundle per chapter
into the shared pipeworx-datasets R2 bucket at statutes/nc/<chapter>.json.
If the chapter has been crawled and the section is simply not in it, that is authoritative (repealed/renumbered sections are normal) and the tool says so without a live round trip. If the chapter has not been crawled yet, it falls back to the original per-section live fetch.
data_as_of on every response says whether it came from the pre-fetched text (the
crawl’s ingested_at) or a live fetch (now).
Topic search
nc_statute_search answers questions no citation lookup can — “election
conduct at polling places”, “landlord retaliatory eviction” — via FTS5 in the
shared SEARCH_SHARD Durable Object (workers/gateway/src/search-shard.ts,
shard name nc-statutes; no new Cloudflare binding). Search hits carry a
citation and heading; call nc_general_statute with the section from a result
to get the full text.
Known limitation: “Reserved” sub-section headings
The chapter splitter anchors on § <section>. <Heading> — a literal period
before the heading. A minority of sections use a colon instead, specifically
dotted sub-numbers marking a placeholder: § 1-87.2: Reserved for future codification purposes. The splitter’s period-anchor backtracks onto the dot
inside “1-87.2” and folds it under the base section (1-87), so eleven
placeholder sub-sections can attach to one real section’s bundle entry as
separate array items sharing its number. Measured across the full 2026-09-30
crawl: 460 (chapter, section) pairs affected, 1,875 extra entries, essentially
all “Reserved for future codification purposes” (verified — no substantive
section heading appeared in a sample of the affected pairs). A real citation
lookup for one of these numbers still resolves (the FIRST matching entry,
which is the genuine section); only the index used for search-hit resolution
carries the redundant placeholder rows, and the search index itself remains
correct rank-wise since a placeholder has no meaningful full-text content to
rank on. Not fixed here because the affected content is exclusively “reserved,
no text” filler; fixing the splitter to disambiguate . inside a dotted
sub-number from . as a heading terminator is a bounded follow-up if a real
citation ever collides this way.
Refresh
node scripts/ingest-nc-statutes.mjs — re-run periodically (NC’s legislative
session runs annually; there is no daily-freshness need here). No schedule is
wired up: dispatch it by hand, or via gh workflow run if/when a workflow is
added — GitHub’s own schedule: trigger has been unreliable since ~2026-09-09
(see CLAUDE.md), so a recurring refresh should follow the monitor-dispatch
pattern rather than a bare cron trigger.
Data source
Official state legislature site (ncleg.gov). North Carolina statutes are public record; no reuse restriction was found on the bulk document paths used here.
Tools
- nc_general_statute — Get the FULL TEXT of a section of the North Carolina General Statutes — North Carolina state law — by citation. “N.C.G.S. 14-17” is first degree murder. Returns the statutory text with a data_as_of ti
- nc_statute_search — Search North Carolina General Statutes BY TOPIC or keyword rather than citation — “election conduct at polling places”, “landlord retaliatory eviction”, “concealed handgun permit”. Returns ranked sect
Tools
nc_general_statute— Get the FULL TEXT of a section of the North Carolina General Statutes — North Carolina state law — by citation. N.C.G.S. 14-17 is first degree murder. Returns the statutory text with a data_as_of timenc_statute_search— Search North Carolina General Statutes BY TOPIC or keyword rather than citation — election conduct at polling places , landlord retaliatory eviction , concealed handgun permit . Returns ranked section