Repository avatar
Monitoring
v2.0.6
active

nyc-budget-mcp

io.github.BetaNYC/nyc-budget-mcp

NYC Council budget data: discretionary awards, capital designations, Schedule C, OMB capital

Documentation

New York City Budget

Checked, open data on New York City's budget, from BetaNYC. It has two halves, and they answer different questions:

City agency budgetsCouncil discretionary funding
What it showsHow much each City agency was given in the adopted budget, and how that changed during the yearWhich organizations the City Council funds, for how much, through which agency, and at which Council member's request
Answers questions like"How much does my community board get?" "How did NYPD's budget change since 2017?""Which groups did my Council member fund?" "Did this nonprofit get Council money?"
SourceNYC Open Data, Expense Budget (mwzb-yiwb), published by the Mayor's Office of Management and Budget (OMB)The Council's spreadsheets, its budget PDFs (Schedule C and others) and NYC Open Data
YearsFY2017–FY2027FY2009, FY2011–FY2027 (by dataset; see below)
SizeThe whole expense budget: $117.8 billion adopted for FY2026, as counted in Open DataThe Council's own share: discretionary awards and capital designations
Look at itThe agency budget explorer (moved here from nyc-budget-viz in #265)The Council budget explorer

Not sure which half you need? See Which tool answers my question? It also has a glossary: fiscal year, adopted vs. modified, unit of appropriation, intra-city, discretionary funding.

Last revised: 2026-11-09.

Correction, 2026-11-09. Before this date the agency budget explorer labeled every year one year late: "Adopted 2026" was really the FY2025 adopted budget. A community board staffer's spreadsheet showed it. It was fixed the same day (nyc-budget-viz#4). If you copied agency figures before 2026-11-09, move each one a year earlier, or download them again. The rule now used is below. The Council half was not affected.


Contents

What this project is

City budgets are among the most important public documents there are, and among the hardest to use. This project turns NYC's budget data into files you can search, join and check, so journalists, researchers, community boards and New Yorkers can ask questions of their city's spending. Every row says where it came from, and no number is changed by hand.

It is one home for two kinds of budget data that people often mix up:

  • City agency budgets are the whole expense budget, agency by agency: what the City adopted in June and what it looked like by the end of the year. This is where a community board, a City agency or a reporter looks up how much an agency got.
  • Council discretionary funding is the money the Council itself directs to organizations, at the level of the organization and its tax ID (EIN): who got what. It is a small part of the budget, and it is where you look up a nonprofit's Council award.

Neither half is a source for revenue, actual spending, or spending over decades. For those, see other sources.

One site, two halves. The agency budget explorer used to be a separate site (nyc-budget-viz). It now lives in this repo at viz/agencies/, published at /agencies/ beside the Council explorer at /explorer/ (#265). The old address still works until it is forwarded (#271). The front page has a door to each half, and every page shares one top bar and footer (#267). The rest of the plan is epic #272.

The fiscal year

New York City's fiscal year runs July 1 to June 30 and is named for the year it ends: FY2026 is July 1, 2025 to June 30, 2026. Both halves use this, and every year in this repo is a fiscal year unless it says otherwise. The budget for a year is adopted in June, just before it starts. More words: the glossary.

Half 1: City agency budgets

What it is. The City's expense budget for every agency, broken down by unit of appropriation (the lines the budget is adopted by; often split into Personal Services, which is pay, and Other Than Personal Services, which is everything else). For each fiscal year, FY2017–FY2027, there are two figures:

  • Adopted: the budget adopted in June, before the year starts.
  • Modified: that year's budget as changed during the year, as of June, near the year's end. The newest year's Modified figure is not yet published: the City publishes it in the release that adopts the next year's budget. Until then it is blank, never zero.

Source. NYC Open Data, Expense Budget, mwzb-yiwb, published for OMB. Public, read through the Socrata API with no token. The pipeline keeps 764 units of appropriation.

Totals are gross. Open Data rows include intra-city amounts (money one City agency pays another), which OMB subtracts to get its headline "net total budget". So for FY2026 the adopted budget is $115.9 billion net (OMB's figure) and $117,791,473,676 as counted in Open Data, which includes $1,884,163,949 of intra-city money.

Which fiscal year each amount describes

Each fiscal year is published up to three times, Preliminary (January), Executive (April or May) and Adopted (June), and each release restates the whole budget. Adding them up would count the same money up to three times, so only the June release of each year is used.

A release's fiscal_year tag names the budget being adopted in it, not the year of every amount in the row. OMB's printed FY2026 Adopted Budget, which is the same publication as the June 2025 release tagged 2026, heads its columns "Adopted Budget for FY 2025", "Current Modified Budget for FY 2025" and "Adopted Budget for FY 2026". So, in the release tagged fiscal_year = Y:

FieldDescribes
adopted_budget_amountFY Y−1, adopted
current_modified_budget_amountFY Y−1, as modified to the release date
financial_plan_amountFY Y (in the June release, the adopted budget)

The rule the explorer uses:

  • Adopted Y = financial_plan_amount from the June release tagged Y. (It equals adopted_budget_amount in the release tagged Y+1, to the dollar.)
  • Modified Y = current_modified_budget_amount from the June release tagged Y+1.
  • The newest year's Modified is "Not yet published".

Getting this wrong labels every year one year late. That is the mistake corrected on 2026-11-09 (above).

How the agency figures are checked

The agency pipeline (code/agency_budget_cleanup.py) stops and writes nothing unless its output reproduces OMB's printed FY2026 Adopted Budget, to the dollar: the citywide FY2026 and FY2025 adopted totals, the FY2025 modified total, and Manhattan Community Board 1's lines (page 182E). It also stops if the two routes to "Adopted Y" above ever disagree. 31 tests (code/test_agency_budget_cleanup.py) cover the year rule, the June-release rule, the check itself, and OMB's figures in the committed CSV; CI runs them with the other Python checks and before each deploy. Details: viz/agencies/data/SCHEMA.md.

This is not the row-by-row review the Council PDF tables get (below). The agency numbers are the City's Open Data, as published, checked against OMB's printed totals. A test that checks every community board and year after the move is planned in #268.

Half 2: Council discretionary funding

This half is about who got what, at the level of the organization and its EIN. The Council publishes who gets its discretionary and capital money as spreadsheets and as long PDF tables. This half has three sources, and each row says which one it came from.

1. The Council's spreadsheets and capital lists

DatasetYearsRowsWhere
Expense funding disclosure: each discretionary award, with grantee, EIN, amount, clearance status and mailing addressFY2009, FY2011–FY2027156,544data/fyNN/expense_disclosure/, data/disclosure_years.csv
Capital designations: the Council's capital lists, from its workbooks (FY2015–FY2017, FY2026, FY2027) and, for FY2019–FY2025, from NYC Open Data t474-a92g, which the Council publishesFY2015–FY2017, FY2019–FY202716,916data/capital/

FY2013–FY2027 disclosure files come from the Council's Research & Data site; FY2009, FY2011 and FY2012 from the Council's own workbooks, saved by the Internet Archive. A script reads each workbook cell by cell and keeps every value as published. Each file's sha256 is recorded.

Know these before you use them:

  • FY2010 is not included. The Council's archived workbook is incomplete compared with NYC Open Data, and the two are never mixed (DATA-ANOMALIES §25).
  • FY2009 and FY2013 are early snapshots, frozen while many awards were still Pending. Their Cleared totals are not the year's outcome.
  • The disclosure is not the adopted budget. It is a later list, with awards added during the year. Its council_member is the roster when the file was exported.
  • Addresses are mailing addresses, not where services were delivered. ZIP codes are checked against the Census list, never silently rewritten.
  • FY2018 Council capital has no spreadsheet. The checked FY2018 capital book (below) is planned to fill it once that year is closed (#202, still open).

Details: DATA-DICTIONARY.md, source/expense-funding-disclosure/README.md, data/DISCLOSURE-AUDIT.md, data/capital/README.md.

2. The checked tables from the Council's budget PDFs

Some things are printed only in the adopted budget's PDFs. We read them again, carefully, with a checked process (next section):

FamilyWhat it isYears
Schedule CThe discretionary awards as adopted, with the initiative and categoryFY2018–FY2027
Transparency resolutionsChanges made after adoption: new awards, rescissions, changes of purposeFY2018–FY2026
Capital book (§254 supporting detail: the detail behind the capital changes the Council adopts under Section 254 of the City Charter)The Council's capital additions, project by projectFY2018–FY2020, FY2022–FY2027
Terms and ConditionsThe reports the budget requires agencies to makeFY2018, FY2021–FY2027

That is 36 family-years (one family in one fiscal year), in data/fyNN/pdf/. The gaps in that table are years with no PDF of that kind in source/FYNN/ (see what is not done yet). Each one's status is in data/pdf_years.csv. Values are kept as printed, never corrected. The PDFs themselves are in source/.

3. NYC Open Data

  • City Council Capital Budget (t474-a92g), which the Council publishes: the capital lists for FY2019–FY2025.
  • OMB's Capital Budget (46m8-77gv) and Capital Commitment Plan (2cmn-uidm): to compare the Council's capital money with OMB's, by budget line (1,425 comparisons over 515 budget lines, FY2019–FY2027).
  • City Council Discretionary Funding (4d7f-74pe), which stopped updating in April 2021: a cross-check. It adds NYC Open Data's MOCS ID (the Mayor's Office of Contract Services' ID for an award) to matching disclosure rows (FY2009–FY2021).

The Council explorer also says, for each award and capital row, whether it is on NYC Open Data, and the date of the copy it checked.

How the Council PDF tables are checked

These claims are about the Council's PDF tables only. PDF-RECIPE.md is the step-by-step. In short:

  1. Read each table from the borders the PDF draws, not from the order its text comes out in.
  2. Check every row: against a second reading of the page image, against every total the PDF prints, and for printed marks that were missed.
  3. Never fix the PDF. Where it is wrong or unclear, flag the row for a person to decide.

Each family-year then has one of two statuses, and every row shows it:

  • reviewed: "checked, review in progress." The table is checked and public. A person may still be deciding some flagged rows.
  • closed: "checked and reviewed." A person has decided every flagged row: critical items one by one, warnings by type, and every "needs more information" item answered, or 30 days past the date its question went to Council Finance. The questions, with their issues and dates, are in data/council_questions.csv (explained in data/COUNCIL-QUESTIONS.md).

As of 2026-10-24 all 36 family-years are reviewed, and none is closed yet.

Where the checks stand (the pdf-tables-2026-10-24-260d16e release): 141,456 rows in 36 family-years, FY2018–FY2027. In Schedule C, 76,216 of 76,272 rows read the same from the text and from the page image; the other 56 are flagged for a person. 515 of 519 printed totals tie exactly; the other 4 are totals the PDF gets wrong itself (one each in Schedule C FY2018, FY2024, FY2025 and FY2026), flagged and not fixed. 1,704 review items wait for a person's decision (195 critical, 1,509 warnings); 14 are decided. In short: every row is checked, the review of each row is not finished, and we never change a number.

Rows show their review notes in plain words, and the status of any question to Council Finance. Text in the PDF that can't be seen on the printed page is shown apart, labeled "hidden text".

The checks run in CI (continuous integration: GitHub runs them automatically). On every pull request and every push to main that touches the readers, configs, PDFs or tables, and when a maintainer starts it by hand, python-checks.yml runs python -m pytest code and re-reads every promoted PDF (promoted: its checked tables are committed to data/fyNN/pdf/) to prove the committed tables match (about an hour, on macOS). ci.yml builds and tests the MCP and the explorer, and checks that the two agree. How to run each check yourself: PDF-RECIPE.md, Steps 2, 5 and 6.

Data releases. The checked tables (and the PDFs they cite) are published as GitHub Releases tagged pdf-tables-<date>-<commit>, each with a manifest of sha256s (all releases). The downloader always takes the newest. As of 2026-10-24 that is pdf-tables-2026-10-24-260d16e: the 36 family-years, FY2018–FY2027 (17.4 MB of tables), and 126 PDFs (148 MB). The first was pdf-tables-2026-10-23-5bab77c. The workflow (.github/workflows/pdf-tables-release.yml) can publish on every merge, but that is off for now, so a maintainer runs each release by hand. The explorer redeploys on every merge that changes the data.

Use it

In a browser

  • Council budget explorer: searches the same data the MCP serves. It has pages for expense awards, years, comparing years, capital, capital vs. OMB, and one for each PDF family (Schedule C, transparency resolutions, the capital book, organizations in the capital book, Terms and Conditions). Each page loads its data when you open it. A test checks that the explorer and the MCP give the same rows and totals. Every spreadsheet row links to its file. Every PDF row opens its page with the row highlighted. The "About the data" page explains what each label means. Code: viz/explorer/.
  • Agency budget explorer: a chart of the citywide budget, FY2017–FY2027, with a table by agency and unit of appropriation, adopted vs. modified, and the whole dataset as one CSV. Adapted from DataMade's Look at Cook. Code: viz/agencies/.
  • Community board budgets: all 59 boards, FY2017–FY2027, adopted and modified by unit (Personal Services, Other Than Personal Services, Rent), each figure with the Open Data release it comes from; download all 59 as one CSV (built by code/build_community_boards.py).
  • The first Council explorer (July 2026) is frozen and marked do not cite, at legacy.html, so old links still work (viz/README.md).

Ask an AI assistant: the MCP server

@betanyc/nyc-budget-mcp is a Model Context Protocol server. It lets an AI assistant (Claude Desktop, Claude Code and others) search the Council data and cite each row. It does not answer agency budget questions yet (#270). Add it to your client's config:

"mcpServers": {
  "nyc-budget": {
    "command": "npx",
    "args": ["-y", "@betanyc/nyc-budget-mcp@2"]
  }
}

It has eight tools:

ToolAnswers from
search_disclosure_awardsThe Council's expense funding disclosure
search_council_capitalThe Council's capital lists
compare_capital_to_ombThe Council's capital vs. OMB's adopted capital budget, by budget line
list_available_fiscal_yearsWhat each year holds, where it came from, and each PDF family-year's status
search_schedule_c_awardsSchedule C, from the checked PDF tables
search_transparency_changesThe transparency resolutions, from the checked PDF tables
search_capital_bookThe capital book, from the checked PDF tables
search_terms_conditionsTerms and Conditions, from the checked PDF tables

The npm package holds the server's code and its spreadsheet index (dist and data/budget.db). The checked PDF tables are an optional download (about 17 MB) from this repo's data releases: npx @betanyc/nyc-budget-mcp download --pdf-tables (add --pdfs for the PDFs, 148 MB more), or set "env": { "NYC_BUDGET_PDF_DATA": "on" } and the server downloads them when it starts, if none are installed (run download again to get a newer release). Until then, the four PDF tools say how to add them. Every file is checked against its published sha256.

How text searches match. Name and text filters (organization, member, purpose, title and so on) ignore case and accents. A term of 3 or fewer letters and digits matches whole words only, so AI finds "AI Training Program" but not "Jamaica" or "AIDS". Longer terms match anywhere, so Fellow also finds "Fellowship". Each tool takes whole_word: true or false to choose either way, and the answer says when it matched whole words. Exact filters (EIN, budget line) are unchanged. The capital book's project_id and the transparency resolution_number always match anywhere, so fragments like CC1 work. A name search finds only the rows whose text matches, so report it as "at least". The full rules: mcp/README.md.

Full details: mcp/README.md; changes: mcp/CHANGELOG.md.

Download

What is not done yet

Bringing the two halves together is epic #272: names and this README (#264), moving the agency explorer in (#265), removing what it inherited from Cook County (#266), one site shell (#267), a standing accuracy test for the agency numbers (#268), a community board view (#269), then agency budgets in the Council explorer and the MCP (#270) and forwarding the old address (#271).

For the Council data, open work is tracked in two epics: #101 (read every PDF, one year at a time) and #190 (serve the checked tables). The bugs the FY2018–FY2027 reviews found (epic #244) were fixed on 2026-10-24 (#252, #253, #254, #255).

  • No year is closed yet. All 36 family-years are reviewed.
  • Questions to Council Finance are drafts, not yet sent. One issue each: #227 and #233–#242.
  • FY2017 back to FY2008 are not re-read yet. Only the old parser's output exists for them, and it is not served (#101).
  • Scanned PDFs wait for an OCR step in the recipe (#251): all FY2009 transparency resolutions and some of FY2010–FY2012.
  • Gaps in FY2018–FY2027: FY2027 transparency resolutions are not in source/; two are known with no download route (#246). There is no FY2021 capital supporting detail in source/ (OMB's copy is in source/gpp/, not yet reviewed) and no FY2019 or FY2020 Terms and Conditions.
  • FY2010 disclosure is held. The Council's archived workbook is incomplete compared with NYC Open Data, and we don't mix the two (DATA-ANOMALIES §25).
  • FY2018 Council capital waits for the FY2018 capital book to be closed (#202).
  • Other open issues: the readers give a few pixels' different counts on Linux, so the Python checks run on macOS for now (#256); 4 capital rows still match NYC Open Data two ways (#257); checking mailing addresses (#247); scheduled re-pulls of the Council's workbooks (#248); a Checkbook spot check (#249); and serving OMB's commitment plan and DCP's capital data in the MCP (#250).

How to contribute

  • Found something wrong? Open an issue with the half (agency or Council), the fiscal year, the row (or the explorer link) and what the source shows. Check DATA-ANOMALIES.md first: many oddities are in the source and already listed there.
  • Help review a year. Build the Council explorer with its Review tab (npm run data -- --include-reviewed in viz/explorer/; see PDF-RECIPE.md, Step 7) and decide flagged rows. Export your decisions and send them as a pull request.
  • Check an older year. FY2008–FY2017 are not redone yet. Their issues are under epic #101; the recipe has every step.
  • Change code. Open a pull request against main. CI builds and tests the MCP and the explorer, and a macOS job runs the Python checks (about an hour; run python -m pytest code yourself first). A change to what the npm package ships needs a version bump and a changelog entry.
  • Never fix a value by hand. Change the reader or record a decision, so every value can be traced to its source.

Questions: hello@beta.nyc.

Repository layout

New-York-City-Budget/
├── README.md, WHICH-TOOL.md, PDF-RECIPE.md, DATA-ANOMALIES.md, DATA-DICTIONARY.md
├── source/      the Council's and City's documents (PDFs, workbooks, Open Data pulls), © City of New York
├── data/
│   ├── fyNN/expense_disclosure/   the Council's disclosure, per year
│   ├── fyNN/pdf/                  the checked PDF tables, per year and family
│   ├── capital/                   the Council's capital lists, and the comparison with OMB
│   ├── pdf_years.csv              each PDF family-year's status
│   ├── council_questions.csv      questions to Council Finance, with dates
│   └── retired/                   the old PDF parser's output, kept for history, never served
├── config/      one file per PDF family and year
├── code/        the readers, checks and tests (Python), including the agency pipeline
├── mcp/         the MCP server (TypeScript)
├── viz/         the GitHub Pages site: front page, Council explorer (explorer/), agency
│                explorer (agencies/), frozen legacy.html
└── research/    plans, review records and research notes

History, briefly

  • 1.x (July–August 2026): the first MCP served tables an early parser read from the PDFs. We later found it lost and merged rows without saying so (DATA-ANOMALIES §20, §21).
  • July 2026: BetaNYC built the agency budget explorer, a separate repo (nyc-budget-viz), from DataMade's Look at Cook and NYC Open Data mwzb-yiwb.
  • 2.0.0 (2026-10-17): we stopped serving anything read from a PDF and moved to the Council's spreadsheets and NYC Open Data (DATA-ANOMALIES §27). The old Schedule C explorer stays online, frozen, at legacy.html, with a banner saying not to cite it.
  • October 2026: FY2018–FY2027 were read again from the PDFs with the checked process (epic #101).
  • 2.0.2 (2026-10-23): the checked tables are served again, labeled, in the MCP and the explorer (epic #190, DATA-ANOMALIES §56). The old parser's output stays retired.
  • 2.0.3 (2026-10-24): fixes for the bugs found in the FY2018–FY2027 reviews (epic #244), including the capital crosswalk matching on the full project ID.
  • 2.0.4 (2026-10-25): short search terms match whole words (#259).
  • 2026-11-09: the agency explorer's year labels corrected (nyc-budget-viz#4), and the work to bring it into this repo started (epic #272).

More: mcp/CHANGELOG.md, data/retired/README.md, code/PARSING.md (how each old file was made), and this README as it was before 2.0.2, which describes the old files in detail.

How this relates to other NYC budget data

SourceBest forOverlap with this repo
This repo, agency halfEach agency's adopted and modified budget by unit of appropriation, FY2017–FY2027Built from NYC Open Data mwzb-yiwb, one June release per year
This repo, Council halfCouncil awards and capital designations, at the organization and EIN level—
NYC Independent Budget Office, Data CenterCitywide and agency spending and revenue over decades, debt, headcountNone at the award level. IBO is the context this data sits in
NYC OMB budget publicationsThe printed budget the agency figures are checked againstThe agency half's check uses OMB's FY2026 Adopted Budget
NYC Open Data: City Council Discretionary FundingCouncil awards, FY2009–FY2021Overlaps the disclosure for FY2009 and FY2011–FY2021; stopped updating in April 2021. Compared row by row in research/2026-10-14-open-data-vs-disclosure-diff.md
NYC Checkbook (Comptroller)Actual spending and registered contractsJoin on EIN to ask whether an award became a contract; compare an agency's budget with what it spent
NYC Council budget pagesThe documents the Council half readsThis repo is the structured, checked version

A source-by-source crosswalk: research/2026-07-08-ibo-data-center-crosswalk.md.

AI use

BetaNYC uses AI tools openly and with people accountable for the result. The code here was built by AI agents (Anthropic's Claude) working under the direction and review of BetaNYC staff.

The figures are not AI-generated. Agency figures are read from NYC Open Data's API and summed by a script. Council spreadsheet values are read cell by cell. PDF values are read from the PDF's own text and ruled lines, and checked against an image of the page by ordinary image processing, not a language model. Where a person confirmed that the page shows something the text layer doesn't, the row says so. Every row keeps its source.

One exception, not served: the FY2009 transparency resolutions are scans with no text, so they were read by OCR (a model). They stay in the repo as a research dataset (data/fy09/transparency-resolutions/, DATA-ANOMALIES §28).

License

Everything BetaNYC made here is under the MIT License © 2026 BetaNYC: the code (code/, mcp/, viz/), the derived data (data/) and our documentation and research. If you use the data, please credit BetaNYC, link to this repository and cite the City of New York as the source.

Not covered: the Council and City documents in source/ are public records, © The City of New York, reproduced here for transparency. BetaNYC's license does not apply to them. Third-party libraries in viz/ keep their own licenses (see viz/LICENSE.md). Both the frozen legacy explorer and the agency explorer are built on DataMade's Look at Cook, © 2019 DataMade, Derek Eder, Nick Rougeux and Open City, MIT License; that copyright notice is kept with the code. NYC Open Data is under the NYC Open Data Terms of Use.

Acknowledgments

A member of the NYC Council's Finance Division staff supplied the FY2025 Council-version §254 supporting detail book and pointed us to the expense disclosure spreadsheets. Both made much of this data possible.

A community board staffer's spreadsheet of all 59 boards' budgets found the agency explorer's year error on 2026-11-09.

DataMade (Derek Eder, Nick Rougeux) and Open City built Look at Cook, the front end the agency explorer and the legacy explorer are adapted from.

Built by BetaNYC

BetaNYC is New York's civic organization for public interest technology, open data and civic design. We build tools, train the public, and advocate for a more transparent, accountable and participatory city government.

Support open civic data: beta.nyc · donate · newsletter