OpenStates

liveGovernmentLegislature

Bills, legislators, votes in all 50 US states. Closes the federal-vs-state gap left by congress / propublica-congress.

4tools
0msauth
free tier50 calls/day

Tools

search_billsrequired: jurisdiction

Search bills in any US statehouse. Pass jurisdiction as a 2-letter state code (e.g., "CA", "NY", "TX") or full name. Returns bill identifiers, titles, classifications, last action, sponsors, and OpenS

Parameters
NameTypeDescription
jurisdictionreqstring2-letter state code or name
queryoptstringFree-text search
sessionoptstringSession ID
classificationoptstringbill | resolution | etc.
sponsoroptstringSponsor name
sortoptstringSort order
per_pageoptnumber1-50
pageoptnumber1-based page
▶Try it
get_bill

Fetch a single bill with full detail: versions, sponsorships, related/companion bills, actions, and votes. Pass the OpenStates ID (e.g., "ocd-bill/abc...") or a state/session/identifier triple.

Parameters
NameTypeDescription
openstates_idoptstringOpenStates bill ID
jurisdictionoptstringState code
sessionoptstringSession ID
identifieroptstringBill identifier (e.g., "AB-123")
▶Try it
search_legislators

Find state legislators. Filter by jurisdiction, name, chamber (upper/lower), party, or district. Returns name, current/prior roles, party, contact details, OpenStates IDs.

Parameters
NameTypeDescription
jurisdictionoptstringState code or name
nameoptstringName fragment
org_classificationoptstringupper | lower | legislature
districtoptstringDistrict ID
partyoptstringParty name
per_pageoptnumber1-50
pageoptnumber1-based page
▶Try it
get_legislatorrequired: person_id

Fetch a single legislator by OpenStates person ID. Returns biographical info, current roles, prior offices, contact methods, sources.

Parameters
NameTypeDescription
person_idreqstringOpenStates person ID
▶Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/openstates/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/openstates/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_bills","arguments":{"jurisdiction": "example"}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("search_bills", {"jurisdiction":"example"});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("bills, legislators, votes in all 50 us states");