プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

NYC Charter, Laws and Rules

作者:BetaNYCバージョン 0.5.0i★ 10iパソコンで動くリポジトリ ↗
レジストリ名io.github.BetaNYC/nyc-charter-laws-rules

インストール方法

What it does

Search and read the NYC Charter, Administrative Code and Rules of the City of New York

  • Connects パソコンで動く
  • Account or key No key needed
  • Category 法律・行政データ

この順位の理由

一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり

人気19/80GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます
新しさ12/1230 日以内のリリースかコード更新で満点
応答中0/8前回の確認でクラウドのエンドポイントが応答
利用スコア31/100

品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: 18 (「急上昇」タブでのみ使用)

インストール

使っているAIアプリを選んで、設定をコピーしてください。

ひとことで AI にインストールしてもらう

NYC Charter, Laws and Rules をインストールして。https://mcp.popnx.com/i/betanyc-nyc-charter-laws-rules.md に従い、コマンドを見せて、私が OK するまで実行しないで。

パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月14日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server NYC Charter, Laws and Rules を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "nyc-charter-laws-rules": { "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、NYC Charter, Laws and Rules のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "nyc-charter-laws-rules": {
          "command": "npx",
          "args": [
            "-y",
            "@betanyc/nyc-charter-laws-rules"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    NYC Charter, Laws and Rules を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が NYC Charter, Laws and Rules を使っていると言うか、回答に NYC Charter, Laws and Rules のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • NYC_LAWS_INDEX_DIR このディレクトリ(data/index/json/ と同じ構成)のインデックスを、同梱のものの代わりに提供します。
    英語の原文を見るOptional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled one
  • NYC_CLR_FOOTER 任意。各応答に付ける法的免責事項の量を指定します。完全版の後に簡易版(既定)、または完全版
    英語の原文を見るOptional. How much legal disclaimer each response carries: full-then-compact (default) or full
    · 初期値 full-then-compact

説明は自動翻訳です。変数名は原文のままです。迷ったら原文を確認してください。

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ NYC Charter, Laws and Rules につなげません

NYC Charter, Laws and Rules はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · NYC Charter, Laws and Rules につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · 法律・行政データ の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server NYC Charter, Laws and Rules を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rules 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、NYC Charter, Laws and Rules のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rules
  4. Claude Code で /mcp と入力

    NYC Charter, Laws and Rules が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    NYC Charter, Laws and Rules を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が NYC Charter, Laws and Rules を使っていると言うか、回答に NYC Charter, Laws and Rules のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • NYC_LAWS_INDEX_DIR このディレクトリ(data/index/json/ と同じ構成)のインデックスを、同梱のものの代わりに提供します。
    英語の原文を見るOptional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled one
  • NYC_CLR_FOOTER 任意。各応答に付ける法的免責事項の量を指定します。完全版の後に簡易版(既定)、または完全版
    英語の原文を見るOptional. How much legal disclaimer each response carries: full-then-compact (default) or full
    · 初期値 full-then-compact

説明は自動翻訳です。変数名は原文のままです。迷ったら原文を確認してください。

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server NYC Charter, Laws and Rules を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "nyc-charter-laws-rules": { "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、NYC Charter, Laws and Rules のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    NYC Charter, Laws and Rules を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が NYC Charter, Laws and Rules を使っていると言うか、回答に NYC Charter, Laws and Rules のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • NYC_LAWS_INDEX_DIR このディレクトリ(data/index/json/ と同じ構成)のインデックスを、同梱のものの代わりに提供します。
    英語の原文を見るOptional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled one
  • NYC_CLR_FOOTER 任意。各応答に付ける法的免責事項の量を指定します。完全版の後に簡易版(既定)、または完全版
    英語の原文を見るOptional. How much legal disclaimer each response carries: full-then-compact (default) or full
    · 初期値 full-then-compact

説明は自動翻訳です。変数名は原文のままです。迷ったら原文を確認してください。

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server NYC Charter, Laws and Rules を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "nyc-charter-laws-rules": { "type": "stdio", "command": "npx", "args": [ "-y", "@betanyc/nyc-charter-laws-rules" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、NYC Charter, Laws and Rules のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    NYC Charter, Laws and Rules を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が NYC Charter, Laws and Rules を使っていると言うか、回答に NYC Charter, Laws and Rules のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • NYC_LAWS_INDEX_DIR このディレクトリ(data/index/json/ と同じ構成)のインデックスを、同梱のものの代わりに提供します。
    英語の原文を見るOptional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled one
  • NYC_CLR_FOOTER 任意。各応答に付ける法的免責事項の量を指定します。完全版の後に簡易版(既定)、または完全版
    英語の原文を見るOptional. How much legal disclaimer each response carries: full-then-compact (default) or full
    · 初期値 full-then-compact

説明は自動翻訳です。変数名は原文のままです。迷ったら原文を確認してください。

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?NYC Charter, Laws and Rules を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user nyc-charter-laws-rules -- npx -y @betanyc/nyc-charter-laws-rules

Claude 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 env
    このディレクトリ(data/index/json/ と同じ構成)のインデックスを、同梱のものの代わりに提供します。
    英語の原文を見るOptional. Serve the index in this directory (laid out like data/index/json/) instead of the bundled one
  • NYC_CLR_FOOTER env
    任意。各応答に付ける法的免責事項の量を指定します。完全版の後に簡易版(既定)、または完全版
    英語の原文を見るOptional. How much legal disclaimer each response carries: full-then-compact (default) or full

説明は自動翻訳です。変数名は原文のままです。迷ったら原文を確認してください。

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
477/週
接続方法
パソコンで動く
最新バージョンi
0.5.0
レジストリ公開日i
2026年11月14日
コードの最終更新i
2026年11月16日
作者
BetaNYC
パッケージ
npm: @betanyc/nyc-charter-laws-rules
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月19日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント BetaNYC で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:3 日前

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

OSV.dev に @betanyc/nyc-charter-laws-rules@0.5.0 の登録はありません

このバージョンのパッケージ本体のみ確認。すべての依存関係ではありません · 確認日 2026年11月15日

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/betanyc-nyc-charter-laws-rules.svg)](https://mcp.popnx.com/en/servers/betanyc-nyc-charter-laws-rules)

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

法律・行政データのほかのサーバーとの比較i

  • このカテゴリのほかの1948件のうち98%よりスターが多い
  • このカテゴリのほかの1948件のうち88%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1948件のうち99%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

NYC Charter, Laws and Rulesは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は3 日前、最新バージョン(0.5.0)がレジストリに届いたのは5 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Global law

The law of nearly every country on earth, any date: read it, see what changed it, check citations.

作者:lexifina広く使われている★ 20969 日前更新

クラウドで動く✓ lexifina.com

LibreJustice

Search French-language and European case law and French legal texts (codes, statutes, treaties).

作者:librejustice初期★ 362 か月前更新

クラウドで動く✓ 提供元 · librejustice.fr

InfraNode

Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.

作者:street1983nk初期★ 185 か月前更新

クラウドで動く✓ 提供元 · infranode.dev
似たものと比べる
これ
NYC Charter, Laws and Rules
Global lawOpen Legal Data (Germany)LibreJusticeInfraNodeFedlex Connector
動く場所パソコンにインストールが必要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要
キーが必要いいえいいえいいえいいえいいえいいえ
Claude で + から追加いいえいいえいいえいいえいいえいいえ
基本チェック3/34/44/44/44/44/4
ライセンスMITNOASSERTIONMITApache-2.0Apache-2.0MIT
料金登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

nyc-charter-laws-rules

The single place to access, process, and query New York City's three primary legal documents:

  • The New York City Charter
  • The New York City Administrative Code
  • The Rules of the City of New York

This repo includes:

  • A [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server so AI assistants can query the documents directly
  • Scripts to fetch and parse the latest bulk XML from American Legal Publishing
  • A committed JSON index (data/index/json/) for machine use
  • A committed Markdown index (data/index/markdown/) for human browsing — readable directly on GitHub

Clone 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.


API key

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.


What it does

Exposes 7 tools over MCP:

ToolDescription
searchKeyword search across all three documents (short keyword queries work best)
get_sectionRetrieve a specific section by citation (e.g. § 259, Chapter 11)
list_titlesList the top-level chapters or titles of a document
get_titleRetrieve all sections within a chapter or title
get_versionReturn the currency date for each document — so responses can be grounded in exactly how current the law is
whats_changedWhat changed in this server, newest first, from WHATS-CHANGED.md: new tools and corrections
about_betanycWho built this server, where its code is, and where to report a bug in this server or ask for a new feature

Tools reference

search

Keyword 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?"

  1. Phrase first. The whole query is matched as typed (case-insensitive). Quotes around the whole query, straight or curly, are removed first, so "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.
  2. Terms, if the phrase finds nothing. Question words and common words (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.
  3. Said out loud. When step 2 runs, the first line of the response says so and lists the terms:
  • every result contains every term: No section contains the exact query; showing sections containing all of: building, owners, required, drinking, water, tanks.
  • partial matches were added: 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.

ParameterTypeRequiredDefaultDescription
querystringyes—Search term or phrase
corpusstringnoallcharter, admin_code, rules, or all
limitnumberno10Max 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_section

Retrieve 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.

ParameterTypeRequiredDescription
citationstringyesSection citation or heading (e.g. § 259, Section 20-f, 11-602.1, Chapter 11)
corpusstringnocharter, admin_code, or rules (default: all three)
get_section("§ 259")

get_section("11-602.1") get_section("Chapter 11", corpus="charter")


list_titles

List the top-level chapters or titles of a document.

ParameterTypeRequiredDescription
corpusstringyescharter, admin_code, or rules
list_titles("charter")

list_titles("rules")


get_title

Retrieve 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.

ParameterTypeRequiredDescription
corpusstringyescharter, admin_code, or rules
titlestringyesChapter or title identifier (e.g. Chapter 11)
get_title("charter", "Chapter 11")

get_title("admin_code", "Title 6")


get_version

Return 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_changed

What 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.

ParameterTypeRequiredDescription
sincestringnoYYYY-MM-DD: changes on or after this date
tagstringnoSite, Data, MCP or Correction (any case)
limitintegerno1 to 50, default 10
whats_changed()

whats_changed(tag="Correction")


about_betanyc

Who 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.


Testing and CI

Running tests
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).

Test layers
FileWhat it covers
test/extract-text.test.jsUnit 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.jsRegression 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.jsInvariant 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.jsIn-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.jsPlain-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.jsThe 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

冒頭だけを表示しています。続きはリポジトリで読めます