NYS Open Legislation — Claude Code MCP server
NYS Open Legislation is an MCP server for Claude Code and Cursor that queries New York State bills, laws, and transcripts.
MIT ★ 5 updated 2026-11-16
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-mcpWhat NYS Open Legislation 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.
What it helps with
- find a bill by print number
- check floor calendars
- browse committee agendas
- retrieve hearing transcripts
Example prompts for the agent
- Find bill details
- Show the latest senate calendar
- List members of the judiciary committee
How to install NYS Open Legislation
Platform CLI
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-mcpReplace <…> with your own values
Platform CLI
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-mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about NYS Open Legislation
How to install NYS Open Legislation in Claude Code?
Run claude mcp add nys-openlegislation-mcp -e NYS_LEGISLATION_API_KEY=<NYS_LEGISLATION_API_KEY> -- npx -y @betanyc/nys-openlegislation-mcp.
What does NYS Open Legislation do?
It gives AI assistants direct access to New York State legislative records, bills, laws, and transcripts.
What is needed to run NYS Open Legislation?
Node.js 20 or newer is required, plus an NYS_LEGISLATION_API_KEY environment variable for live queries or a local corpus.