# NYS Open Legislation

NYS Open Legislation is an MCP server for Claude Code and Cursor that queries New York State bills, laws, and transcripts.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: BetaNYC
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/BetaNYC/nys-openlegislation-mcp
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/nys-open-legislation

## What it does

The server connects AI assistants to the New York State legislative records API. It handles searches across bills, statutes, committee agendas, and public hearing transcripts dating back to 2009.

Running it requires Node.js 20 or newer. Live data requests need an API key from the NYS Open Legislation portal passed via `NYS_LEGISLATION_API_KEY`, while offline mode relies on a local SQLite corpus.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `NYS_LEGISLATION_API_KEY`, `NYS_CORPUS_DB` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env NYS_LEGISLATION_API_KEY=<NYS_LEGISLATION_API_KEY> --env NYS_CORPUS_DB=<NYS_CORPUS_DB> --transport stdio nys-open-legislation -- npx -y @betanyc/nys-openlegislation-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add nys-open-legislation --env NYS_LEGISLATION_API_KEY=<NYS_LEGISLATION_API_KEY> --env NYS_CORPUS_DB=<NYS_CORPUS_DB> -- npx -y @betanyc/nys-openlegislation-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "nys-open-legislation": {
            "command": "npx",
            "args": [
                "-y",
                "@betanyc/nys-openlegislation-mcp"
            ],
            "env": {
                "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>",
                "NYS_CORPUS_DB": "<NYS_CORPUS_DB>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "nys-open-legislation": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@betanyc/nys-openlegislation-mcp"
            ],
            "env": {
                "NYS_LEGISLATION_API_KEY": "<NYS_LEGISLATION_API_KEY>",
                "NYS_CORPUS_DB": "<NYS_CORPUS_DB>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e NYS_LEGISLATION_API_KEY=<NYS_LEGISLATION_API_KEY> -e NYS_CORPUS_DB=<NYS_CORPUS_DB> nys-open-legislation npx -y @betanyc/nys-openlegislation-mcp
```
Replace <…> with your own values

## When to use it
- find a bill by print number
- check floor calendars
- browse committee agendas
- retrieve hearing transcripts

## Example prompts
- Find bill details
- Show the latest senate calendar
- List members of the judiciary committee

## Similar
- [open-zk-kb](https://affpapa.org/en/nevibecode/mcp/open-zk-kb.md) — MCP server · ★ 7 repo stars
- [Spree Commerce: open-source B2B and marketplace ecommerce](https://affpapa.org/en/nevibecode/mcp/spree-commerce-open-source-b2b-and-marketplace-ecommerce.md) — MCP server · ★ 15848 repo stars
- [Open Library](https://affpapa.org/en/nevibecode/mcp/open-library.md) — MCP server · ★ 103 repo stars
- [open-mcp-apps](https://affpapa.org/en/nevibecode/mcp/open-mcp-apps.md) — MCP server · ★ 40 repo stars
- [open-memex](https://affpapa.org/en/nevibecode/mcp/open-memex.md) — MCP server · ★ 6 repo stars
- [pluggy-open-finance](https://affpapa.org/en/nevibecode/skills/pluggy-open-finance.md) — skill · 594 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
