nyc-council-mcp
A read-only MCP server for researching NYC Council legislation through the live Legistar API, plus tools explaining data provenance and server changes.
Search live legislation by keyword or quoted phrase, sorted by introduction date.
Look up a specific bill/matter by type-prefixed file number; ambiguous bare numbers are rejected with candidates.
Retrieve a bill’s legislative history and attached files with download links.
List upcoming hearings/meetings, including agenda items, with summary/full detail controls.
Look up Council members and committees.
Get vote records for a specific agenda item by EventItemId.
List recently introduced legislation.
Read what changed in the server, who built it, and where its data comes from, how current it is, and how to cite or verify it.
Reads a local SQLite index (built from the jehiah/nyc_legislation archive) to power fast, sub-second NYC Council legislative tools — full-text bill and hearing search, committee listings, recent and upcoming items, bill aggregation and history, roll-call vote breakdowns, member voting records, co-sponsorship analysis, and event agendas.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nyc-council-mcp search bills about e-bike safety and confirm their current status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@betanyc/nyc-council-mcp
An MCP (Model Context Protocol) server for NYC Council legislative data. Version 2 adds a hybrid mode: a local SQLite index for sub-second search and exploration, plus the live NYC Legistar API for authoritative real-time data.
What's changed: WHATS-CHANGED.md lists every change a reader would notice, newest first, including every correction and what to re-check. Your AI assistant can read it too, with the whats_changed tool.
What it does
Ask an AI assistant about New York City Council legislation and get answers grounded in the Council's own records: bills, resolutions and land use items, their full text and summaries, sponsors, hearings, votes, committee memberships and attachments.
The local index holds every matter in the jehiah/nyc_legislation archive: on 2026-11-11 that was 21,803 matters (13,059 Introductions, 6,198 Resolutions, 2,545 Land Use items), 17,532 meetings, 517,562 individual recorded votes and 254 people. The live tools read the Council's Legistar API directly.
Related MCP server: Korean Assembly MCP
What's new in 2.10.0
Every tool says it only reads. Each tool carries MCP annotations: a title,
readOnlyHint: true, andopenWorldHint(true when it calls the live Legistar API). An AI app can use them to skip asking before it runs a tool.Every answer says where it came from. Each answer ends with a source line: the source, how current it is (when the local index was built, or when a live answer was fetched) and a link to the Council's or the City's page.
Lists say when there is more. Every list tool, live and local (
get_event_billstoo), has a maximum: a largerlimitis lowered to it, and the answer says so. When more results exist than the limit, the answer says so and how to get the rest.Checksums for the shipped data.
data/SHA256SUMSlists a SHA-256 checksum for each data file in the package.Clearer failures. When Legistar is slow or down, a live tool gives up after 30 seconds, retries briefly when Legistar asks it to wait, and says in a plain sentence what went wrong and what to try. Your Legistar token never appears in an error.
BetaNYC's shared module 1.5.2.
about_datagives each source one of three answers on whether it is official. Local answers now say BetaNYC modified the data, inabout_data's own words.If your code reads the answers. A meeting whose agenda could not be fetched now has
EventItems: null, not[]. Alimitmust be a whole number, 1 or more. Notes and the source line come after the JSON as more text items; the JSON is still the first. See CHANGELOG.md for the full list.
What's new in 2.9.0
"What changed?" and "Who built this?" Two new tools work in every mode, with no token or index.
whats_changedanswers from WHATS-CHANGED.md, the plain-language history of this server back to 1.0.0, including every correction and what to re-check.about_betanycsays who built the server, how to report a bug or ask for a feature, and which version of BetaNYC's shared code it runs.BetaNYC's shared module 1.3.7.
about_dataanswers now give BetaNYC's contact for questions and error reports about the data (lab@beta.nyc), say who fixes an error in the data, the publisher or BetaNYC, and list any source the server cannot show.With both data sources set up, the server now lists 28 tools.
What's new in 2.8.0
Who holds a district. New tool
district_membersays who held Council District 1 to 51 on any date. It reads the City's list of every Council term since 1999 (NYC Open Datauvw5-9znb), which ships with the package. When the City's file is behind, the answer names the missing member. On 2026-11-12 that was Carl Wilson, District 3. See Known traps.Committees, chairs and caucuses. New tools
get_member_rolesandcommittee_rostersay who chairs what and who sits where, today or on a past date, from Legistar's own membership records. Party is never inferred from a caucus.Member facts curated by BetaNYC, labeled as such.
get_council_memberandget_member_rolesadd acuratedblock with Wikidata and Wikipedia links, party as every ballot line the member won on (NYC has fusion voting), and office social accounts. Each fact carries its source and check date, and the block says it is not an official record. Rules:data/README.md."Where does this data come from?" New tool
about_dataworks in every mode. It gives each source, its publisher, whether it is official or BetaNYC's curation, how current it is on this server, its terms, a credit line and where to report an error. The same facts are inDATA-SOURCES.jsonand a DCAT-US 3.0 catalog,data.json, with lab@beta.nyc as BetaNYC's contact. See Where the data comes from.Search the full text. Local search now reads summaries and full text, not only titles. New tool
get_matterfinds one matter by file number or Local Law number, with its attachments. New live toolget_bill_attachmentslists a matter's files with download links.Links for every matter type.
legistar_urlnow opens Resolutions, Land Use, M and T items, not only Introductions. Seelegistar_url.Answers you can date and check. Every local answer names when the index was built and from which archive commit. With a token,
upcoming_eventschecks each meeting's status live. Vote times are New York local time, and voting records are ordered by vote date and name the member who voted.Upgrading: the first
indexrun after upgrading rebuilds the index in full, once (about 25 seconds on the 2026-11-11 archive).
The full list is in CHANGELOG.md.
Quick start
The recommended setup, for Claude Code:
Register at user scope so the server is available from any project:
claude mcp add nyc-council-mcp \
--scope user \
npx -- -y @betanyc/nyc-council-mcp serveThen add your environment variables to ~/.claude.json under the mcpServers entry:
{
"mcpServers": {
"nyc-council-mcp": {
"command": "npx",
"args": ["-y", "@betanyc/nyc-council-mcp", "serve"],
"env": {
"LEGISTAR_TOKEN": "your_token_here",
"LEGISTAR_DB_PATH": "/Users/you/legistar/legistar.db"
}
}
}
}Set only LEGISTAR_TOKEN for live-only mode, or only LEGISTAR_DB_PATH for local-only mode.
Prerequisites
Node.js 18 or later
For live tools: a free Legistar API key — register here
For local tools: the
jehiah/nyc_legislationarchive (~920 MB, one-time clone)
Installation
Recommended: hybrid mode (both data sources)
Step 1 — Get a Legistar API key
Register at council.nyc.gov/legislation/api. You'll receive a token by email.
Step 2 — Clone the legislation archive
git clone --depth 1 https://github.com/jehiah/nyc_legislation.git ~/legistar/nyc_legislationThis is about 920 MB and takes a few minutes. It only needs to be done once.
Step 3 — Build the local index
npx @betanyc/nyc-council-mcp index \
--archive ~/legistar/nyc_legislation \
--db ~/legistar/legistar.db \
--verboseThis takes roughly 25 seconds and produces a legistar.db file of about 1 GB. On the 2026-11-11 archive it indexed 21,803 matters, 17,532 events and 517,562 roll-call vote rows. It also loads the Council terms list that ships with the package, with no network call.
Step 4 — Configure your MCP client
Add both environment variables to your MCP config. See Configuration below.
Live-only mode (no local index)
If you only want the live Legistar API tools and don't need local search, just set LEGISTAR_TOKEN and skip the archive clone.
Local-only mode (no API key)
If you only want fast local search (no real-time data), set LEGISTAR_DB_PATH and skip the API key. Note: get_upcoming_hearings, get_bill (current status), and similar live tools will be unavailable. about_data, district_member and the other local tools work without a token.
Build from source
git clone https://github.com/BetaNYC/nyc-council-mcp.git
cd nyc-council-mcp
npm install && npm run build
LEGISTAR_TOKEN=your_token LEGISTAR_DB_PATH=./legistar.db node dist/index.js serveKeeping your index fresh
The archive is updated most weekdays. Run these two commands to pull the latest data and update your index:
# Pull the latest archive files
cd ~/legistar/nyc_legislation && git pull
# Rebuild incrementally (only processes new/changed files — takes seconds after the first build)
npx @betanyc/nyc-council-mcp index \
--archive ~/legistar/nyc_legislation \
--db ~/legistar/legistar.dbYou never need to wait for a BetaNYC-hosted snapshot. Incremental mode (the default) is fast enough to run manually whenever you want fresh data.
Automated daily updates (cron):
# Add to your crontab: daily at 6am
0 6 * * * cd ~/legistar/nyc_legislation && git pull && npx @betanyc/nyc-council-mcp index --archive ~/legistar/nyc_legislation --db ~/legistar/legistar.dbForce a full rebuild:
npx @betanyc/nyc-council-mcp index \
--archive ~/legistar/nyc_legislation \
--db ~/legistar/legistar.db \
--fullNote: The local index is only as current as your last index run — run the daily cron above and it stays about a day behind live Legistar; leave it for a month and it is a month stale. The upstream archive itself updates most weekdays. For current status and upcoming hearings, use the live API tools (
get_bill,get_upcoming_hearings).Every local answer ends with a source line. It says BetaNYC modified the data and how (the index build trims committee names and role titles, leaves out rows with no ID and cuts dates to the day), which
jehiah/nyc_legislationcommit the index was built from, when it was built, that this copy is not the official record, and the official record with a link, e.g.BetaNYC modified this data: it built this local index from jehiah/nyc_legislation@9e52935 (archive commit 2026-11-11T23:38:10Z), an unofficial mirror of the Council's Legistar records; … This copy should not be considered the official record. As of 2026-11-12T11:30:07.125Z (the date of the copy this server answers from). Official record: NYC Council Legistar: Legislation, https://legistar.council.nyc.gov/Legislation.aspxIt is always the last text item. In hybrid mode,upcoming_eventsadds a line sayingagenda_statusis the live Legistar value, with the time it was fetched. The blocks come in this order: the JSON first, then any notes (alimitlowered to the maximum, "more are available",search_legislation's line on its order and agency filter, a meeting status not checked live, missing agendas), then the source line. The link is the Council's page for that kind of data (legislation, calendar, committees) or, for districts, the City's dataset page;district_memberandget_member_rolesalso give the council terms file's fetch date. Live answers end with the same kind of line: the source, that it is a copy BetaNYC modified (it fixes known-bad member profile links and shortens long hearing titles) and that Legistar is the official record, the time it was fetched for this answer (New York time, to the minute), and a link. A liveget_council_memberanswer's source block has a line for each source in it: Legistar; with an index, the council terms file with its fetch date and link; and that thecuratedblock is BetaNYC's and not an official record. With noLEGISTAR_TOKEN, the line also says the answer was not checked live, and that an empty answer means "not in this index", not "does not exist".Why upcoming meeting status is checked live: Legistar can change a meeting's status without updating its last-modified time. Event 22725 went from Final to Deferred with its timestamp still 2026-09-10, so the archive never fetched it again. On 2026-11-12, 10 of 658 meetings in 2026 differed this way, all Final → Deferred.
API key
A free API key is optional — it unlocks the live Legistar API tools, but the server also runs in local-only mode without one.
Live tools (
get_billcurrent status,get_upcoming_hearings, confirmation queries) require a free Legistar API key. Register at council.nyc.gov/legislation/api — you'll receive a token by email — and set it as theLEGISTAR_TOKENenvironment variable.Local fast-path tools (search, browse, voting history, aggregation) need no key — they read the local SQLite index at
LEGISTAR_DB_PATH.
You must set at least one of LEGISTAR_TOKEN or LEGISTAR_DB_PATH; set both for full hybrid mode. Example (live tools):
export LEGISTAR_TOKEN="your-legistar-token"See Setup and Environment variables for full details.
Configuration
Environment variables
Variable | Required for | Notes |
| Live API tools | Register at council.nyc.gov/legislation/api |
| Local SQLite tools | Path to your built |
Do not commit tokens to version control. |
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"nyc-council": {
"command": "npx",
"args": ["-y", "@betanyc/nyc-council-mcp", "serve"],
"env": {
"LEGISTAR_TOKEN": "your_token_here",
"LEGISTAR_DB_PATH": "/Users/you/legistar/legistar.db"
}
}
}
}Tools reference
Fast-path tools (local SQLite index)
These require LEGISTAR_DB_PATH and a built index (see Setup).
Tool | Description |
| Full-text search across all legislation: Introductions, Resolutions, Land Use and every other matter type. Searches titles, sponsors, summaries and the full text; a title hit ranks above a body hit (BetaNYC's own ranking weights; the answer says so). Rows carry |
| One matter by file number ( |
| A member's committees (chairs listed separately), caucuses, party conferences, borough delegations and task forces, from Legistar's own membership records, plus the member's council |
| Who sits on a committee, chair first, on a date or across its history |
| Who held a Council district (1–51) on a date, from the City's terms list (NYC Open Data |
| Alias for |
| Full-text search across committee hearings |
| All committees with bill and event counts |
| Bills introduced in the last N days |
| Scheduled events in the next N days. With |
| Count bills grouped by status, type, committee, or year |
| Every member's vote on a bill (by type-prefixed file number), grouped by roll call — committee and full Council — each with a positions-only tally. Indexed from the archive's |
| All votes cast by a named council member, newest vote first. Each row has |
| A matter's action trail — hearings, referrals, committee/Council actions, outcomes — in chronological order, by file number. No token required |
| Members who most often co-sponsor with a given member |
| Events where a bill appeared on the agenda, with each event's date, body, and action |
| Items on one event's agenda, paged: |
Confirm-path tools (live Legistar API)
These require LEGISTAR_TOKEN.
Tool | Description |
| Current status and record for a bill. A bare |
| Local by default (served from the index, no token; takes a file number). In live-only mode this live variant answers instead — authoritative action trail by numeric matter id |
| Files attached to a matter (committee reports, resolution text, charts, transcripts), each with a direct download link. Takes the numeric matter id |
| Real-time upcoming committee hearings and Stated meetings, in date and time order, each with its agenda items (bills/matters) in |
| Current contact info and active status for a council member, plus a |
| Current membership count and details for a committee |
| Per-item vote breakdown by event item ID. An empty answer says that the item may not have been voted on yet or was not a roll call |
| Most recently introduced legislation (catches bills since last index) |
| Live Legistar search (slower than local, always current). Multi-word queries match all words in any order; quote a |
About this server (every mode)
These need no token or index, and make no network call. They come from BetaNYC's shared module, the same in every BetaNYC MCP server.
Tool | Description |
| What changed in this server, newest first, from WHATS-CHANGED.md: new tools, new data, and every correction with what to re-check. |
| Who built this server (BetaNYC, a project of the Fund for the City of New York), links to BetaNYC, where to report a bug in this server or ask for a new feature, and the version of BetaNYC's shared module it runs. No inputs |
Where the data comes from (every mode)
Tool | Description |
| Ask the server where its data comes from. For each kind of data it gives the source and its publisher, whether it is an official record or BetaNYC's curation, how it was gathered and what BetaNYC changed, how current it is on this server (the index build time, the district snapshot's fetch time, the curated files' check dates), what it covers, terms of use and a credit line, where to check a figure, where to report an error, and which tools use it. |
Tool details
search_legislation / search_bills
Full-text search across the local index, which covers Introductions,
Resolutions, and Land Use Applications. Multi-word queries match matters
containing all the words in any order; quote a "phrase" to require adjacency.
Upgrading from ≤ 2.1.1: Resolutions and Land Use matters were previously absent from the index. Re-run
npx @betanyc/nyc-council-mcp index …after updating to pick them up.
Parameter | Type | Required | Default | Description |
| string | yes | — | Search terms |
| number | no | 25 | Max results (max 100; a larger limit is lowered to 100, and the answer says so) |
| string | no | — | Agency key or name (e.g. |
| string | no | — | Filter by status (e.g. |
| string | no | — | Filter by committee name |
search_bills("open data")
search_bills("bicycle lane", agency="DOT", status="Enacted")
search_bills("tenant protection", committee="Housing")aggregate_bills
Count bills grouped by a dimension.
Parameter | Type | Required | Options |
| string | yes |
|
aggregate_bills(group_by="status")
aggregate_bills(group_by="year")Roll calls are indexed locally (#30). Each matter's
History[].Votesis indexed into avotestable, sovote_breakdown,get_voting_record, andget_bill_historyanswer from the corpus with no token. A member's entry is a position (Affirmative / Negative / Abstain) or a non-position reason for not casting one (Absent, Excused, Medical …); both are stored, but a tally counts positions only — an Absent member is never scored as a vote. If thevotestable is empty the tools still raise a named error rather than return[](which reads as "cast no votes"); that means the corpus predates roll-call indexing and needs anyc-council-mcp indexrebuild.get_votesremains for live per-item positions.
vote_breakdown
Every member's vote on a matter, grouped by roll call (committee and full Council
appear separately), each with a positions-only tally. Res 0540-2026 returns its
Council roll call (45–6, 51 recorded) and its Committee on Finance roll call (14–1,
17 recorded — the tally is 14–1, not 17).
Parameter | Type | Required | Description |
| string | yes | Type-prefixed file number, e.g. |
get_bill_history
A matter's action trail in chronological order — introduced, referred, heard, amended,
approved, enacted — one row per action, with the acting body and date. Served from the
local matter_history table, so it needs no token. Each action also carries the
event_item_id of the meeting item it happened at, which is the id get_votes takes if
you want to confirm a roll call against the live API.
Parameter | Type | Required | Description |
| string | yes | Type-prefixed file number, e.g. |
get_voting_record
All votes cast by a council member.
Parameter | Type | Required | Default | Description |
| string | yes | — | Full or partial name |
| number | no | 50 | Max results (max 500; a larger limit is lowered to 500, and the answer says so) |
co_sponsors
Members who most frequently co-sponsor bills with a given member.
Parameter | Type | Required | Default | Description |
| string | yes | — | Full or partial name |
| number | no | 20 | Top N co-sponsors (max 100; a larger limit is lowered to 100, and the answer says so) |
Agency snippets
When you pass agency to search_bills, results include a role-context snippet showing HOW the agency appears in the bill — whether it is directed, consulted, or reporting. This helps distinguish bills that merely mention an agency from those that grant or restrict its authority.
Supported agency keys: DEP, DOT, NYPD, FDNY, DOB, HPD, HRA, DSS, ACS, DOHMH, DHS, DCAS, DSNY, DPR, DCP, FINANCE, LAW, MAYOR, COMPTROLLER, MTA, EDC, SBS, DCWP, DYCD, DFTA, DOE, CUNY, and more.
You can also pass a full name: agency="department of transportation" or agency="sanitation".
Common workflows
Explore a topic, then confirm
1. search_bills("e-bike") → sub-second results from local index
2. get_bill("Int 0042-2024") → authoritative current status from live API
3. get_bill_history("Int 0042-2024") → full action trail from the local index (no token)
4. vote_breakdown("Int 0042-2024") → how each member voted, per roll call, from the local indexAnalyze a council member's record
1. get_voting_record("Nurse") → all votes cast
2. co_sponsors("Nurse") → frequent co-sponsors
3. search_bills("bicycle", committee="Transportation") → bills in their areaWho represents a district, and what do they chair?
1. district_member(district=3) → who held the seat today (or as_of a past date)
2. get_member_roles("Brewer") → committees, chairs, caucuses, district and terms
3. get_council_member("Gale Brewer") → live contact info, plus the curated block
4. about_data(topic="party") → where the party lines came from, and that they are BetaNYC's curationTrack upcoming hearings
1. upcoming_events(days=14) → from local index (as fresh as your last index run)
2. get_upcoming_hearings() → from live API (real-time)get_upcoming_hearings populates each event's EventItems array with the agenda
items (the bills/matters on that hearing's agenda), fetched per event from the
Legistar /events/{EventId}/eventitems endpoint. The /events list endpoint
itself always returns EventItems empty and ignores $expand, so the follow-up
call is required. Pass include_agenda=false to skip it and return the hearing
schedule faster with EventItems empty. A meeting whose agenda could not be fetched has
EventItems: null, and a note names it and says why.
How it works
Two-speed design
Path | Speed | Data | Use for |
Local index (SQLite) | < 1 second | As fresh as your last index run | Search, browse, voting history, aggregation |
Live API (Legistar) | 1–5 seconds | Real-time | Current status, upcoming hearings, confirmation |
Use both together for the best experience. Search locally to explore; confirm with the live API when accuracy matters.
Index CLI reference
nyc-council-mcp index [options]
Options:
--archive <path> Path to jehiah/nyc_legislation clone (required)
--db <path> SQLite output path (default: $LEGISTAR_DB_PATH or ./legistar.db)
--full Force a full rebuild (default: incremental)
--verbose Print progress to stderr
--help Show helpIncremental mode upgrades itself to a full rebuild when it has to. Even without
--full, the indexer rebuilds from scratch if either has changed since your last run:
the schema version — the corpus was built by an older release whose tables differ, or
the set of indexed sources — the indexer now walks matter trees it did not before.
This matters because an incremental run skips files by modification time, so widening
coverage would otherwise leave older files permanently unindexed. When a trigger fires,
--verbose names it and the run drops and recreates the data tables before indexing.
Upgrading to 2.8.0 (schema version 6) fires the schema trigger once, so your first index
after upgrading takes a full rebuild (about 25 seconds) and picks up full text, Local Law
numbers, attachments, membership records and Council terms. Until then, an older index keeps
working: search returns null version and local_law, and the new tools say to re-index.
Every run, full or incremental, also reloads the Council terms snapshot that ships in the
package (data/council-member-terms.json). It needs no network.
An archive with no matching files is an error, not an empty index. If --archive
points at a directory where none of people/*.json, introduction/**/*.json,
resolution/**/*.json, land_use/**/*.json or events/**/*.json match, index exits
non-zero and leaves any existing database untouched. A source directory that exists but
matches nothing is reported on stderr. The build uses portable paths (including archive
paths with spaces, parentheses or brackets) and is tested in CI on Windows as well as Linux.
Notes and limitations
legistar_url — the human-openable link
Bill/matter records include a legistar_url field: a link a person can click to
open the matter on Legistar. It works for every matter type (Int, Res, LU, M,
T, …) and looks like:
https://legistar.council.nyc.gov/gateway.aspx?M=L&ID={MatterId}Why this shape, so nobody re-attempts the obvious-looking fix:
NYC runs two Legistar backends with different ids. The WebAPI this server reads exposes
MatterId/MatterGuid; the publicLegislationDetail.aspxpage keys on a separate ID/GUID that is not in the API record. SoLegislationDetail.aspx?ID={MatterId}returns "Invalid parameters!".gateway.aspx?M=L&ID={MatterId}takes the API id and redirects to the rightLegislationDetail.aspxpage. Checked 2026-11-12 on Res 0551, 0595, 0652 and 0695-2026, T2026-2764 and an Introduction: each landed on its own page. An id that does not exist shows "This record is currently unavailable."Caveat:
gateway.aspxis not in Granicus's published API docs. It is how the Legistar site links to its own records — observed behavior, not a documented contract.npm run test:livere-checks the fixtures live.A row with no matter id (a procedural agenda line) gets
null.Through 2.7.1 the link came from intro.nyc, which keys on the bare number and assumes an Introduction, so every other type got
null(#45).
Known traps
Vote and history times are New York local time (
2026-10-22T13:30:00). The archive marks them as UTC by mistake; the indexer drops that marker.A partial name can match several members.
get_voting_record("Williams")returns votes by Jumaane D. Williams and Nantasha M. Williams; each row'sperson_namesays whose vote it is.One vote row per roll call.
get_voting_recordreturns a row for each roll call a member voted in, so an item voted on in committee and then by the full Council appears twice.vote_bodyandvote_datetell them apart; dedupe byfile_numberto count distinct matters.The archive can miss a meeting status change. Legistar sometimes changes a meeting's status (e.g. to Deferred) without updating its last-modified time, so the archive keeps the old one. With
LEGISTAR_TOKENset,upcoming_eventschecks status live; without it, useget_upcoming_hearingsbefore relying on a date.get_event_billsis paged. A stated meeting can have 170+ agenda items; readtotaland raiseoffsetto get them all.A caucus or conference is not a party.
get_member_rolesreports Legistar's caucus and party-conference memberships as memberships only. Party appears only in thecuratedblock, which lists every ballot line the member won on, copied from Board of Elections certified results.curatedis BetaNYC's work, not an official record. The Wikidata/Wikipedia link, party lines and office social accounts in each member'scuratedblock were checked by hand on the date shown, against the source given. A blank staysnull. Seedata/README.md.Districts come from a snapshot.
district_memberand thedistrictfield read the City'suvw5-9znbfile as shipped, with its fetch date in every answer. The City updates that file late: on 2026-11-12 it had no term for Carl Wilson, a Council Member since 2026-05-13, so District 3 showed vacant. A vacant answer names such people underunlisted_council_members; check council.nyc.gov before saying a seat is empty. District lines are redrawn, so a past member's district number may not match today's map.search_billsis an alias ofsearch_legislation. Both return every matter type, not only bills.Every answer ends with a source line: local answers say when the index was built and from which archive commit, live answers when they were fetched, and both give a link to check. An empty local answer means "not in this index", not "does not exist".
Lists stop at a limit and say so. Each list tool has a default and a maximum, given in its
limitdescription. This holds for every list, live (list_recent_legislation,search_legislation_live) and local (get_event_billsincluded): a whole-numberlimitabove the maximum is lowered to it and the answer says so; alimitunder 1 or not a whole number is refused with a plain message. When there are more results than the limit, a text item after the JSON says "Showing the first N results; more are available" and how to get the rest (get_council_member, which has every match in hand, says "Showing 10 of M"). The source line is always the last text item.
Testing and CI
npm test # builds, then runs every test offline
npm run test:live # the live checks in test/live/ (read-only GETs; LEGISTAR_TOKEN for the API ones)
npm run eval # the evaluation set in eval/ (see below)Tests use Node's built-in runner (node --test test/*.test.mjs) and never need the network. Live checks live in test/live/, which npm test and CI never run. CI runs them on every pull request to main, on Ubuntu (Node 20 and 22) and Windows (Node 22), and a version guard fails any PR that changes shipped code without a version bump.
CI fails if DATA-SOURCES.json is invalid or leaves a tool without a source (a test checks this too), or if data.json, the DCAT-US 3.0 catalog made from it, is out of date or invalid. These checks follow BetaNYC's about-data standard. Rebuild it with python3 scripts/whats_changed.py about-data catalog DATA-SOURCES.json. CI also checks WHATS-CHANGED.md on every pull request: its format, that a published entry is only ever added to, and that a version bump comes with an entry naming the new version. src/betanyc-tools.ts, scripts/whats_changed.py, scripts/tests/catalog_validate.py and scripts/mcp_shared/ are copies of BetaNYC's shared files: do not edit them here.
Evaluation set. eval/questions.json holds 12 realistic questions, written before scoring, each with a known answer taken from the primary record (the jehiah/nyc_legislation archive files or the City's terms file), not from this server. npm run eval scores them with the local tools: with LEGISTAR_DB_PATH set, all of them against your index; without it, the five the shipped terms file can answer (CI runs these in test/eval.test.mjs). npm run eval -- --save writes the result to eval/runs/. On 2026-11-18 all 12 passed against an index of archive commit 895f5bd1.
Tests that keep the practices true. Every tool is annotated read-only (test/annotations.test.mjs); the tool list plus instructions stays under a size budget (test/tool-size.test.mjs); requests to Legistar have a timeout, a User-Agent and a bounded retry (test/upstream.test.mjs); errors are plain and never carry the token (test/errors-and-secrets.test.mjs); every answer has a source line and lists say when there is more (test/provenance-lists.test.mjs); stdout carries only MCP messages (test/stdout.test.mjs); shared text lives once in the instructions (test/instructions.test.mjs); the data files match their checksums (test/data-provenance.test.mjs).
The council terms snapshot (data/council-member-terms.json) is refreshed by node scripts/refresh-member-terms.mjs. A monthly workflow runs it and opens a PR when the City's rows change. The snapshot ships in the package, so a refresh needs a version bump like code does. The data files' SHA-256 checksums are in data/SHA256SUMS; the refresh rewrites it, and after a hand edit to a curated file run node scripts/data-checksums.mjs.
Contributing
Issues and pull requests welcome at github.com/BetaNYC/nyc-council-mcp.
Before working on the code, read CONTEXT.md — the project's glossary. It
pins down the distinctions this domain punishes you for blurring: a matter versus a
bill versus a file number (which is not unique without its type prefix), an event
versus an event item (different id spaces), and a position versus a non-position in a
roll call (both live in the same field, so a tally must filter rather than count rows).
Releases
Publishing is automated. To cut a release:
Bump
versioninpackage.jsonin a PR, with a matching CHANGELOG.md entry and a WHATS-CHANGED.md entry tagged MCP. The What's changed entry is## Unreleased: Titleuntil the release.Merge the PR.
On the release day, in one commit: change
## Unreleased: Titleto## YYYY-MM-DD: Title(same title), give the CHANGELOG heading the same date, and point the entry's MCP version link at the dated CHANGELOG heading.Push the matching tag:
git tag v<version> && git push origin v<version>.The release workflow runs tests, verifies the tag matches
package.jsonandserver.json, runs the two release checks (anUnreleased:entry left in WHATS-CHANGED.md, or an error or placeholder contact in DATA-SOURCES.json, stops it), publishes to npm with provenance, and creates a GitHub Release.When it succeeds, publish-mcp.yml lists that version in the official MCP Registry as
io.github.BetaNYC/nyc-council-mcp. Bumpversioninserver.json(both places) together withpackage.json.
Prerequisite: the NPM_TOKEN org secret (an npm automation token with publish rights on @betanyc) must be configured. Do not run npm publish by hand.
Data sources
Live tools: NYC Council Legistar API, provided by Granicus
Local index: jehiah/nyc_legislation archive — has been mirroring Legistar since 2018, updated most weekdays
Curated member facts: Wikidata, Wikipedia, NYC Board of Elections certified results (party lines), council.nyc.gov and the Council's Bluesky starter pack (office accounts). Rules in
data/README.mdCouncil districts and terms: NYC Open Data City Council Members (1999 to Present) (
uvw5-9znb), shipped as a dated snapshot; the index trims names, leaves a district that is not a number blank and cuts term dates to the day
The full list, source by source, is DATA-SOURCES.json (also as a DCAT-US 3.0 catalog, data.json), and the about_data tool answers from it.
Acknowledgments
This project builds on the foundational work of @jehiah, whose nyc_legislation project has been mirroring NYC Council legislative data since 2018 and powers intro.nyc.
The local SQLite index and agency snippet approach are adapted from WillHsiaoNYC/legistar-mcp, which introduced the two-speed architecture and role-context snippet design that v2 implements in TypeScript.
Thank you to Nathan Storey for including this project in the Civic AI Tools Directory.
About BetaNYC
This project is built and maintained by BetaNYC, New York's civic technology and open-data community. We work to improve lives in New York through civic design, technology, data, and public-interest technology.
Come do civic tech with us. We run public events, meetups, and hands-on data classes throughout the year — including NYC School of Data and CityCamp NYC, and we host frequent civic-tech gatherings. See what's coming up on our events calendar.
Sustain this work. These MCP servers are free and open source. To help keep this work going and find BetaNYC's tools, please consider donating and becoming a Beta Builder.
Freedom isn't free. Support BetaNYC.
Related BetaNYC MCP servers
BetaNYC maintains a suite of open-source MCP servers for NYC and NYS civic data. See the full directory, with install details for each, at beta.nyc/ai-tools.
This server pairs directly with:
nyc-charter-laws-rules: trace a bill through to the Charter, Administrative Code, and Rules text it amends.
nyc-budget-mcp: connect Council members and legislation to the discretionary funding (Schedule C) they direct.
Building on this? Tell us!
If you build something with this project, we'd love to hear about it. We can help other New Yorkers find it. BetaNYC publishes a weekly newsletter, This Week in NYC's Civic Technology and Open Data.
Subscribe to the newsletter to keep up with NYC civic tech, open data, and public-interest technology.
Built something, or found a story worth sharing? Submit a link for the newsletter and we'll consider it for an upcoming issue.
License
MIT License — Copyright (c) 2026 BetaNYC, a project of the Fund for the City of New York
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Available Tools
12 toolsabout_betanycAbout BetaNYC and this serverARead-only
Who built this server and how to reach them: BetaNYC, a project of the Fund for the City of New York. Returns what BetaNYC is, links to its events, newsletter and donation page, where to report a bug in this server or ask for a new feature (this server's GitHub issues), and this server's name and version.
Inputs: no named parameters. Returns: about, links, server, history, +4 more
about_dataWhere this server's data comes fromARead-only
Where this server's data comes from and how far to trust it. For each kind of data: who publishes it and a link, whether it is an official record (only data its publisher published and BetaNYC did not modify is; data BetaNYC modified or produced is not), how it was gathered, what BetaNYC did to it (for example cleaned it, matched it to addresses, joined it with other data, or counted it), how current it is on this server, what it covers and what is missing, the terms of use and the credit line to print, where to check a figure at the official record, where to report an error (to BetaNYC when BetaNYC modified or produced the data, to the publisher for the original records, and to this server's issues for a bug), which tools use it, and corrections that touched it. Call it whenever someone asks where an answer comes from, how current or accurate it is, or how to check or cite it. topic narrows it to one kind of data, or to the data behind one tool (give the tool's name). For who built this server, use about_betanyc. Topics on this server: live, bills, votes, events, committees, districts, party, wikidata, social.
Inputs: topic. Returns: note, topic, server, topics, +6 more
get_billARead-only
Get a specific bill by its intro/file number from the live Legistar API. Legistar file numbers are type-prefixed (e.g. 'Int 0349-2024', 'Res 0232-2024'). A type-prefixed number returns that one matter. A bare 'NNNN-YYYY' number is AMBIGUOUS — the same number can be both an Introduction and a Resolution; if it matches more than one matter the call is REJECTED with an error naming every match, and you re-call with the exact type-prefixed file number. A single match returns the authoritative record.
Inputs: file_number (required).
get_bill_attachmentsARead-only
List the files attached to a bill or other matter — committee reports, resolution text, charts, hearing transcripts, agendas — from the live Legistar API. Each row has MatterAttachmentName and MatterAttachmentHyperlink (a direct download URL). Takes the numeric matter id (MatterId from get_bill or search_legislation_live; matter_id from the local tools). Many matters have none: [] is a normal answer.
Inputs: matter_id (required).
get_bill_historyARead-only
Get the full legislative history of a bill — hearings, referrals, votes, and status changes. Live API data, authoritative.
Inputs: matter_id (required).
get_committeeBRead-only
Look up an NYC Council committee by name. Returns current membership count and details.
Inputs: name (required).
get_council_memberARead-only
Look up an NYC Council member by name. Returns current contact info and active status. PersonWWW2 may carry a PersonWWW2_warning (and the original value in PersonWWW2_upstream) when the upstream link is known or suspected wrong. Adds the 'curated' block (BetaNYC's checked facts, not official records). With a local index, district and council terms are added too.
Inputs: name (required).
get_upcoming_hearingsARead-only
List upcoming NYC Council committee hearings and Stated meetings. Real-time data — use this for scheduling, not the local index. Each event's EventItems array is populated with its agenda items (the bills/matters on the agenda) via a follow-up call per event; EventItems is null when that agenda could not be fetched (a note says why). Pass include_agenda=false to skip that and return events faster with EventItems empty. Returns a short shape by default (detail='summary'); detail='full' returns every Legistar field. A stated meeting can carry 100+ agenda items: for those, use include_agenda=false and page the agenda with get_event_bills.
Inputs: detail, days_ahead, include_agenda.
get_votesARead-only
Get the vote record for a specific agenda item by its EventItemId. Shows how each member voted. Live API data — use for freshness. For a bill's roll call from the local corpus, prefer vote_breakdown (grouped roll calls with a positions-only tally) or the local get_bill_history, which returns each action's event_item_id directly. EventItemIds also come from an event's agenda items (GET /events/{EventId}/eventitems) — e.g. the EventItemId field inside each event returned by get_upcoming_hearings. Note: the live get_bill_history's MatterHistoryEventId is an EVENT id, not an event ITEM id, whereas each local history action's event_item_id IS the id this tool takes.
Inputs: event_item_id (required).
list_recent_legislationARead-only
List the most recently introduced NYC Council legislation. Use this to catch bills introduced since the last index update.
Inputs: limit.
search_legislation_liveARead-only
Search NYC Council legislation via the live Legistar API. Slower than search_bills but always current — use when the local index may be stale. Multi-word queries match matters whose title contains ALL the words (in any order), so 'section 254 capital' works — you do NOT need a single generic token. Wrap a phrase in double quotes to require those words to be adjacent. Note: Legistar's OData API has no full-text relevance ranking, so results are ordered by introduction date, not by how well they match. To find OLDER legislation, set order='date_asc' (oldest first) rather than raising the limit.
Inputs: query (required), limit, order.
whats_changedWhat's changedARead-only
What has changed in this server, its data and its website, newest first, from the project's WHATS-CHANGED.md: new tools and pages, new data, data fixes, and corrections when BetaNYC published something wrong. Each correction says what to re-check if you used the old numbers. Call this before relying on a figure you got from this server earlier, or when a user asks whether something was fixed. Filter with since (YYYY-MM-DD; also keeps older entries that have an update on or after that date) and tag (Site, Data, MCP or Correction).
Inputs: tag, limit, since. Returns: note, server, source, entries, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Tools target mostly distinct resources and actions: bill retrieval/history/attachments, hearing listing, member/committee lookup, votes, search/list, and metadata. The overlap between get_bill_history and get_votes is clarified by the descriptions, though references to local tools not present in this set add some confusion.
Most tools follow a predictable snake_case pattern with get_*, list_*, and search_* prefixes. The meta tools about_data, about_betanyc, and whats_changed deviate from verb_noun naming but remain readable and consistent with their informational role.
Twelve tools is well within the appropriate range for a read-only civic-data server. Each tool covers a distinct area, and there is no obvious bloat or duplication.
Core bill lookup, search, history, votes, hearings, member, and committee coverage exists, but the surface has significant gaps. get_upcoming_hearings explicitly points to get_event_bills for large agendas, and get_votes points to vote_breakdown or local get_bill_history, none of which are in this tool set, creating dead ends.
Maintenance
Related MCP Connectors
City council meetings, agenda items and documents for any city on Legistar, with source links.
U.S. federal policy data — bills, Congress members, voting records, and civic info.
Agent-ready NYC public records. Hosted, source-backed civic data organized around durable anchors.
Read sourced U.S. civic records: candidates, offices, campaign finance, elections and governments.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables to discover, inspect, query, and profile live NYC Open Data through a CLI and MCP server, providing a developer-first interface to Socrata APIs.5 npmMIT
- AlicenseAqualityCmaintenanceEnables querying South Korean National Assembly public data — members, bills, votes, schedules, meeting transcripts, audit reports, and publications — and recording live AI captions so speeches can be summarized before official transcripts are released, with fetched content cached in a local SQLite full-text index for later search.17MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching and browsing municipal resolutions, meetings, votes, and member voting records through tools for full-text and semantic search, details, statistics, and attendance/voting history.MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching US state bills by keyword, sponsor, committee, status, or chamber, and searching speaker-attributed committee hearing testimony across all 50 states and DC. Also retrieves full bill details, hearing transcripts, speaker activity histories, and the list of states with available data.49 npmMIT