Global law
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
Search and read the NYC Charter, Administrative Code and Rules of the City of New York
Lists are ordered by a usage score (out of 100) built from these parts
| Popularity | 19/80 | GitHub stars or weekly downloads: the larger counts 60, the smaller 20 |
|---|---|---|
| Freshness | 12/12 | Full marks for a release or code change within 30 days |
| Still answering | 0/8 | The cloud endpoint answered at the last check |
| Usage score | 31/100 |
Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: 18 (Used only on the Trending tab)
Pick the AI app you use, then copy the settings.
Let your AI install it with one sentence
Please install NYC Charter, Laws and Rules. Follow https://mcp.popnx.com/i/betanyc-nyc-charter-laws-rules.md, show me the commands and wait for my OK before running them.Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads
Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server NYC Charter, Laws and Rules for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nyc-charter-laws-rules": { "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the NYC Charter, Laws and Rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
SettingsDeveloperEdit Config
{
"mcpServers": {
"nyc-charter-laws-rules": {
"command": "npx",
"args": [
"-y",
"@betanyc/nyc-charter-laws-rules"
]
}
}
}Use NYC Charter, Laws and Rules and tell me what you can do for me, then show me one thing✓ If Claude says it is using NYC Charter, Laws and Rules or shows a NYC Charter, Laws and Rules tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
NYC_LAWS_INDEX_DIR Optional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled oneNYC_CLR_FOOTER Optional. How much legal disclaimer each response carries: full-then-compact (default) or full · default full-then-compactDescriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect NYC Charter, Laws and Rules yet
NYC Charter, Laws and Rules runs on your computer, but ChatGPT can only connect servers that run on the web
A · Use an app that can connect NYC Charter, Laws and Rules
B · Others in Law & government data that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
Works with Claude Code, with some setup first
Install Node.js on your computer first (one time)
Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server NYC Charter, Laws and Rules for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rules 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the NYC Charter, Laws and Rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Mac: press Command+Space and type Terminal · Windows: open PowerShell
claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rulesYou should see NYC Charter, Laws and Rules listed as connected
Use NYC Charter, Laws and Rules and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using NYC Charter, Laws and Rules or shows a NYC Charter, Laws and Rules tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
NYC_LAWS_INDEX_DIR Optional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled oneNYC_CLR_FOOTER Optional. How much legal disclaimer each response carries: full-then-compact (default) or full · default full-then-compactDescriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Node.js on your computer first (one time)
Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server NYC Charter, Laws and Rules for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nyc-charter-laws-rules": { "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the NYC Charter, Laws and Rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Use NYC Charter, Laws and Rules and tell me what you can do for me, then show me one thing✓ If Cursor says it is using NYC Charter, Laws and Rules or shows a NYC Charter, Laws and Rules tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
NYC_LAWS_INDEX_DIR Optional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled oneNYC_CLR_FOOTER Optional. How much legal disclaimer each response carries: full-then-compact (default) or full · default full-then-compactDescriptions are as written by the maker.
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Node.js on your computer first (one time)
Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server NYC Charter, Laws and Rules for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "nyc-charter-laws-rules": { "type": "stdio", "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the NYC Charter, Laws and Rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Use NYC Charter, Laws and Rules and tell me what you can do for me, then show me one thing✓ If VS Code says it is using NYC Charter, Laws and Rules or shows a NYC Charter, Laws and Rules tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
NYC_LAWS_INDEX_DIR Optional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled oneNYC_CLR_FOOTER Optional. How much legal disclaimer each response carries: full-then-compact (default) or full · default full-then-compactDescriptions are as written by the maker.
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Claude Code
claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rulesClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"nyc-charter-laws-rules": {
"command": "npx",
"args": [
"-y",
"@betanyc/nyc-charter-laws-rules"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"nyc-charter-laws-rules": {
"command": "npx",
"args": [
"-y",
"@betanyc/nyc-charter-laws-rules"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"nyc-charter-laws-rules": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@betanyc/nyc-charter-laws-rules"
]
}
}
}NYC_LAWS_INDEX_DIR envNYC_CLR_FOOTER envDescriptions are as written by the maker.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026
The registry name was verified with the GitHub account BetaNYC, which owns the repo
Code last changed today
Uses MIT
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
No entries on OSV.dev for @betanyc/nyc-charter-laws-rules@0.5.0
Checks only this package version, not every dependency · checked Nov 15, 2026
If you made this, paste this code into your README. The badge links back to this page.
[](https://mcp.popnx.com/en/servers/betanyc-nyc-charter-laws-rules)Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
No reviews yet
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed today, and the latest version (0.5.0) reached the registry 5 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.
In the same category: Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector
Same category, other makers, commands already checked. Official ones first, then by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
Search French-language and European case law and French legal texts (codes, statutes, treaties).
Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
| This one NYC Charter, Laws and Rules | Global law | Open Legal Data (Germany) | LibreJustice | InfraNode | Fedlex Connector | |
|---|---|---|---|---|---|---|
| Runs where | Installs on your computer | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install |
| Needs a key | No | No | No | No | No | No |
| Add with + in Claude | No | No | No | No | No | No |
| Basic checks | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 |
| License | MIT | NOASSERTION | MIT | Apache-2.0 | Apache-2.0 | MIT |
| Price | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry |
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
The single place to access, process, and query New York City's three primary legal documents:
This repo includes:
data/index/json/) for machine usedata/index/markdown/) for human browsing — readable directly on GitHubClone the repo and everything is ready to use. No setup required to browse or query the current index. Run npm run fetch-data && npm run build-index only when you want to refresh from AML.
Vibe coded with Claude by BetaNYC.
[What's changed](WHATS-CHANGED.md): new tools, corrections and other changes a reader would notice, newest first. Daily law text updates are in CHANGELOG.md.
No API key is required. The Charter, Administrative Code, and Rules are served from an offline corpus bundled with the package, so this server works out of the box — no signup, no token, no environment variables to set.
The bundled text is as of the release. An npm install carries the law text from the day that version was published. When the daily refresh picks up new law text, it also publishes a new patch release automatically (see Releases), so the law text in npx -y @betanyc/nyc-charter-laws-rules is normally at most a day behind main's. Code changes ship with the next release. Automatic releases pause while a hand-bumped version is waiting to be published or a release run has failed. get_version reports the dates you are actually serving. To serve main's index directly, see Getting current law text.
Exposes 7 tools over MCP:
| Tool | Description |
|---|---|
search | Keyword search across all three documents (short keyword queries work best) |
get_section | Retrieve a specific section by citation (e.g. § 259, Chapter 11) |
list_titles | List the top-level chapters or titles of a document |
get_title | Retrieve all sections within a chapter or title |
get_version | Return the currency date for each document — so responses can be grounded in exactly how current the law is |
whats_changed | What changed in this server, newest first, from WHATS-CHANGED.md: new tools and corrections |
about_betanyc | Who built this server, where its code is, and where to report a bug in this server or ask for a new feature |
searchKeyword search across the NYC Charter, Administrative Code, and Rules. It is keyword matching, not a question-answering engine, so short keyword queries work best: sidewalk shed rather than "How long can a sidewalk shed stay up?"
"open data" and open data search the same phrase. If any section contains it, those results are returned, relevance-ranked: heading matches rank above citation matches, which rank above body-text matches, and whole-word matches rank above substring matches.how, what, can, a, the, up, about, …) are dropped. The full list is SEARCH_STOPWORDS in src/corpus.ts. Each remaining term matches at the start of a word, with a trailing plural s ignored, so tanks finds "tank" and shed does not find "established". Sections are ranked by how many terms they contain, then by the same heading > citation > body weights.No section contains the exact query; showing sections containing all of: building, owners, required, drinking, water, tanks.No section matched every term; showing sections matching some of: …, or Only 1 section matched every term (listed first); the rest match some of: long, sidewalk, shed, stay.There is no term weighting yet, so a long definitions section that contains every word can outrank the section you want. Ranked full-text search is a separate, later change.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | yes | — | Search term or phrase |
corpus | string | no | all | charter, admin_code, rules, or all |
limit | number | no | 10 | Max results (max 50) |
search("open data")
search("landlord inspection", corpus="admin_code", limit=20) search("board of health", corpus="rules") search("How long can a sidewalk shed stay up?") # term fallback; first line says so
get_sectionRetrieve a specific section by citation or heading fragment. Input is normalized (with or without §, any case, extra whitespace). If the same citation exists in more than one document (e.g. charter Chapter 3 vs a rules chapter, or a rules section number repeated across titles), a disambiguation list is returned — re-run with the corpus parameter.
| Parameter | Type | Required | Description |
|---|---|---|---|
citation | string | yes | Section citation or heading (e.g. § 259, Section 20-f, 11-602.1, Chapter 11) |
corpus | string | no | charter, admin_code, or rules (default: all three) |
get_section("§ 259")
get_section("11-602.1") get_section("Chapter 11", corpus="charter")
list_titlesList the top-level chapters or titles of a document.
| Parameter | Type | Required | Description |
|---|---|---|---|
corpus | string | yes | charter, admin_code, or rules |
list_titles("charter")
list_titles("rules")
get_titleRetrieve chapter/title records matching an identifier. Matching is whole-token (Chapter 1 does not match Chapter 10). Note: the index is flat — deep hierarchy (every section nested within a title) is not indexed, so this returns matching chapter/title-level records, not full title contents. Title-level indexing is a tracked future feature.
| Parameter | Type | Required | Description |
|---|---|---|---|
corpus | string | yes | charter, admin_code, or rules |
title | string | yes | Chapter or title identifier (e.g. Chapter 11) |
get_title("charter", "Chapter 11")
get_title("admin_code", "Title 6")
get_versionReturn the currency date for each document. Each corpus updates on its own schedule — the Charter and Administrative Code track enacted local laws, while the Rules update independently as agencies adopt new rules.
No parameters required.
get_version()
Example response:
NYC Charter: Current through Local Law 2026/112, enacted June 19, 2026, (854 sections; indexed 2026-06-29T12:33:00.864Z)
Administrative Code: Current through Local Law 2026/112, enacted June 19, 2026, (12587 sections; indexed 2026-06-29T12:33:09.801Z) Rules of NYC: Current through rules effective July 1, 2026. (8671 sections; indexed 2026-07-01T12:43:45.635Z)
whats_changedWhat changed in this server, newest first, from WHATS-CHANGED.md, which ships with the package. Covers new tools, corrections and other changes a reader would notice; daily law text updates are not listed (see CHANGELOG.md). Corrections say what to re-check if you used the old answer. Returns text plus structuredContent matching the tool's outputSchema.
| Parameter | Type | Required | Description |
|---|---|---|---|
since | string | no | YYYY-MM-DD: changes on or after this date |
tag | string | no | Site, Data, MCP or Correction (any case) |
limit | integer | no | 1 to 50, default 10 |
whats_changed()
whats_changed(tag="Correction")
about_betanycWho built the server (BetaNYC, a project of the Fund for the City of New York), its version and repository, where to report a bug in this server or ask for a new feature, and links to BetaNYC. No parameters.
whats_changed and about_betanyc are the two tools BetaNYC is adding to each of its MCP servers. src/betanyc-tools.ts is a copy of the canonical file in BetaNYC's workspace; never edit the copy. Their text ends with the one-line disclaimer (the full one with NYC_CLR_FOOTER=full), and they do not use up the full footer meant for the first law answer.
npm test
npm test builds the TypeScript source first (pretest script), then runs the full suite with node --test. Every test file in the table below runs together. On a laptop the whole run, build included, takes about 4 seconds (measured October 2026).
| File | What it covers |
|---|---|
test/extract-text.test.js | Unit tests for the extractText, normalize, childrenByTag, getAttr, and tagOf helpers in scripts/lib/extract-text.js. Covers inline-LINK document order (issue #3 regression), entity decoding, ALP-marker stripping, enumeration-marker repair, empty/self-closing elements, deep nesting, whitespace-only text nodes, and helper edge cases. |
test/content-leak.test.js | Regression tests for the content-leak fix (PR-A0): undecoded nbsp entities, [ALP S-xxx] editorial markers, and leading-digit run-ons (1Each). Includes scope guards confirming that inline labels with no after them in the source ((6)the) are left untouched. |
test/corpus-invariants.test.js | Invariant assertions over the committed data/index/json/*.json (every section across charter, admin\_code, and rules). Asserts: no run-together text, no subdivision label fused to the next word (a.There, issue #27), no leaked XML tags, no undecoded entities, no double spaces, no leading/trailing whitespace, and structural integrity against versions.json counts. Collects all violations before asserting, with corpus/id/citation/snippet in the failure message. |
test/mcp-tools.test.js | In-process tests for the MCP handler functions (searchCorpus, getSection, listTitles, getTitle, getVersions) imported from dist/corpus.js. Grounded in real index data: verifies § 292 text content (the issue-#3 corrected phrase), negative lookups, version presence, and title listing. |
test/search-fallback.test.js | Plain-language questions (issue #30). Unit tests for stopword and question-word stripping (queryTerms) and surrounding-quote removal (stripSurroundingQuotes). Exact ranks, counts and first-line notices run against a synthetic 8-section index committed at test/fixtures/search-index/, served through NYC_LAWS_INDEX_DIR in a child process: ranking by terms matched, word-start matching (shed is not found in "established"), plural s, the all-terms and widened notices, phrase results unchanged, quoted queries matched as phrases. Against the real index only behavior is checked (fallback used, notice first, terms listed, results non-empty), so a daily refresh cannot turn it red. |
test/index-dir.test.js | The NYC_LAWS_INDEX_DIR override (issue #26), each case in a child process: unset and blank serve the bundled index; a set directory serves its versions and section text; relative paths resolve against the working directory; a directory without versions.json fails at startup naming the variable, with no silent fallback. Also starts the server over stdio and checks that serverInfo.version matches package.json and that get_version reports the override. |
| test/footer-modes.test.js | Disclaimer footer modes (issue #25). NYC_CLR_FOOTER parsing (unset, blan