# NYS Open Legislation

> NYS Open Legislation is a free MCP server for legal and government. Search New York State bills, laws, members and hearings from an AI assistant. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/betanyc/nys-openlegislation-mcp
- **MCP Registry name:** io.github.BetaNYC/nys-openlegislation-mcp
- **Categories:** [legal and government](https://ai-powered.com/categories/legal-and-government)
- **Listing updated:** 2026-11-15

## About

Its dataset is the NYS Open Legislation API run by the New York State Senate, which the README says covers more than 150,000 bills and resolutions back to 2009. BetaNYC, a civic technology group, built this server as part of a suite of civic data servers for New York.

A free API key is needed for live data. As an option, you can build a local SQLite corpus with scripts from the git repository; when one exists the server answers from it first and labels results with the sync date, falling back to the live API when a record is missing. With a corpus but no key it runs in local-only mode, and five tools without local coverage say so rather than failing. It refuses to start only when both are missing.

Bill links point at the public nysenate.gov site.

## Features

- **Bills:** Search, fetch by print number, list by session and read votes.
- **Laws:** Browse law trees and retrieve section text.
- **Members and committees:** Look up Senate and Assembly members, committees and meeting history.
- **Calendars and agendas:** Floor calendars and committee agendas with vote records.
- **Transcripts:** Floor session and public hearing transcripts.
- **Local corpus:** Optional SQLite copy for offline or heavy use.

## Good for

- Research the history of a bill
- Look up the text of a state law section
- Check a committee's agenda and votes
- Run bulk legislative research offline

## Install

### Claude Code (Terminal)

```sh
claude mcp add nys-openlegislation-mcp --env NYS_LEGISLATION_API_KEY='<NYS_LEGISLATION_API_KEY>' -- npx -y @betanyc/nys-openlegislation-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "nys-openlegislation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@betanyc/nys-openlegislation-mcp"
      ],
      "env": {
        "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "nys-openlegislation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@betanyc/nys-openlegislation-mcp"
      ],
      "env": {
        "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "nys-openlegislation-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@betanyc/nys-openlegislation-mcp"
      ],
      "env": {
        "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "nys-openlegislation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@betanyc/nys-openlegislation-mcp"
      ],
      "env": {
        "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "nys-openlegislation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@betanyc/nys-openlegislation-mcp"
      ],
      "env": {
        "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>"
      }
    }
  }
}
```

## Tools

- `get_bill_votes`: Votes on a bill.
- `get_bill_updates`: Updates for a bill.
- `get_committee_meetings`: Committee meeting history.
- `get_updates`: Aggregate change feed across content types.
- `search`: Full-text search within a content type.
- `whats_changed`: What changed in this server.
- `about_betanyc`: Who built the server and where to report issues.

## FAQ

### Do I need an API key?

A free key from legislation.nysenate.gov/public is needed for live data, but a local corpus can serve without one.

### How far back does it go?

Bills and resolutions from 2009.

### How long does building the corpus take?

The README says a full fetch without law or transcript text takes 2 to 6 hours.

### Which Node version?

Node.js 20 or newer.

### Is NYS Open Legislation free?

Yes. NYS Open Legislation is free to use.

### How do I add NYS Open Legislation to Claude Code?

Run this command in your terminal: claude mcp add nys-openlegislation-mcp --env NYS_LEGISLATION_API_KEY='<NYS_LEGISLATION_API_KEY>' -- npx -y @betanyc/nys-openlegislation-mcp

### What are the best alternatives to NYS Open Legislation?

The closest alternatives to NYS Open Legislation are Docket Room, Delilah, NYC Charter, Laws and Rules, Uk Parliament Bills and us-congress-watch.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Docket Room](https://ai-powered.com/mcp/docket-room): Docket Room is a freemium MCP server for legal and government.
- [Delilah](https://ai-powered.com/mcp/delilah): Delilah is a freemium MCP server for legal and government.
- [NYC Charter, Laws and Rules](https://ai-powered.com/mcp/nyc-charter-laws-and-rules): NYC Charter, Laws and Rules is a free MCP server for legal and government.
- [Uk Parliament Bills](https://ai-powered.com/mcp/uk-parliament-bills): Uk Parliament Bills is an open-source MCP server for legal and government.
- [us-congress-watch](https://ai-powered.com/mcp/us-congress-watch): us-congress-watch is a paid MCP server for legal and government.
- [NY Data Registry](https://ai-powered.com/mcp/ny-data-registry): NY Data Registry is a free MCP server for legal and government.
- [Georgia Commons](https://ai-powered.com/mcp/georgia-commons): Georgia Commons is a free MCP server for legal and government.
- [Dados Abertos Senado BR MCP](https://ai-powered.com/mcp/dados-abertos-senado-br-mcp): Dados Abertos Senado BR MCP is an open-source MCP server for cloud and infrastructure.

---
Source: https://ai-powered.com/mcp/nys-open-legislation
