loading…
Search for a command to run...
loading…
Access legislative data from all 50 US states and Congress — search bills, get full text, track votes, and look up legislators via the LegiScan API.
Access legislative data from all 50 US states and Congress — search bills, get full text, track votes, and look up legislators via the LegiScan API.
CI License: MIT Node TypeScript
A Model Context Protocol (MCP) server that gives terminal agents structured access to the LegiScan API for legislative data from all 50 US states and Congress.
Built for research workflows where you direct an agent (Codex, Claude Code, Claude Desktop, etc.) to gather bill history, sponsor context, and voting records quickly.
npm install -g legiscan-mcp-server
git clone https://github.com/sh-patterson/legiscan-mcp.git
cd legiscan-mcp
npm install
npm run build
Add this server to whatever MCP host your terminal agent uses.
Claude Desktop config paths:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonFor other MCP clients (Codex CLI, Claude Code, etc.), add the same mcpServers.legiscan entry in that client's MCP config file.
{
"mcpServers": {
"legiscan": {
"command": "npx",
"args": ["-y", "legiscan-mcp-server"],
"env": {
"LEGISCAN_API_KEY": "your_api_key_here"
}
}
}
}
{
"mcpServers": {
"legiscan": {
"command": "node",
"args": ["/path/to/legiscan-mcp-server/dist/index.js"],
"env": {
"LEGISCAN_API_KEY": "your_api_key_here"
}
}
}
}
| Tool | Description |
|---|---|
legiscan_find_legislator |
Find a legislator's people_id by name. Supports partial matching. |
legiscan_get_legislator_votes |
Get how a legislator voted on multiple bills in one call. |
legiscan_get_primary_authored |
Get only bills where legislator is primary author (not co-sponsor). |
| Tool | Description |
|---|---|
legiscan_get_bill |
Get detailed bill info (sponsors, history, votes, texts) |
legiscan_find_bill_by_number |
Find bill by number (handles AB 858, AB858, AB-858) |
legiscan_get_roll_call |
Get vote details with individual legislator votes |
| Tool | Description |
|---|---|
legiscan_get_person |
Get legislator info with third-party IDs (VoteSmart, OpenSecrets, etc.) |
legiscan_get_session_people |
Get all legislators active in a session |
| Tool | Description |
|---|---|
legiscan_search |
Full-text search across legislation |
| Tool | Description |
|---|---|
legiscan_get_session_list |
List available legislative sessions by state |
Give your agent a goal, state, timeframe, and output format.
Example prompt:
Use the LegiScan MCP tools to find major California housing bills in the current session.
Return: bill number, title, latest action date, top sponsors, and whether there was a close roll-call vote (margin <= 5).
For high-quality results, tell the agent to do this order:
legiscan_get_session_list to identify the correct session.legiscan_search or legiscan_find_bill_by_number to locate target bills.legiscan_get_bill for sponsor/history/vote references.legiscan_get_roll_call for individual vote details.legiscan_get_person only when legislator enrichment is needed.These cut tool-call volume and simplify instructions to your agent:
legiscan_find_legislator: get people_id from a name query.legiscan_get_primary_authored: separate primary-authored from co-sponsored bills.legiscan_get_legislator_votes: pull vote positions across many bills in one request.Use LegiScan MCP for Texas.
1) Find legislator "Jane Smith".
2) List all primary-authored bills in the current session.
3) For these bills, summarize topic area and latest status.
4) Then check votes on SB 12, HB 301, and SB 455, and show how the legislator voted.
Use LegiScan MCP to track "climate resilience" bills in New York.
Focus on current session only.
Return top 15 bills by relevance with bill number, title, last action, sponsor party, and any recorded roll calls.
For California session 2172, resolve bill numbers AB 858, SB 525, SB 616, SB 399.
For each bill, fetch details and any roll calls.
Then report vote positions for people_id values 21719, 23214, and 25359.
Output as a table suitable for CSV export.
The composite tools dramatically reduce API calls for common workflows:
| Workflow | Without Composites | With Composites |
|---|---|---|
| Get votes for 1 legislator on 10 bills | ~80 calls | 1 call |
| Filter primary authored from 150 sponsored | ~150 calls | 1 call |
| Find legislator by name | 2 calls | 1 call |
ca → CA). Invalid codes like ZZ pass local validation but return an API error from LegiScan.bill_id, roll_call_id, and people_id in intermediate output so you can audit traceability.legiscan_get_legislator_votes accepts up to 100 bill_ids per request; split larger jobs into chunks.npm run build # Compile TypeScript
npm run typecheck # Type-check src + tests
npm test # Run deterministic unit tests (no API key)
npm run test:live # Run live API integration tests (requires API key)
npm run lint # Check for lint errors
npm run format # Format code with Prettier
npm test / npm run test:unit: Fast deterministic tests with mocked network calls.npm run test:live: Real LegiScan API integration tests. Requires LEGISCAN_API_KEY.Build the container image locally:
docker build -t legiscan-mcp .
Run it with your API key provided at runtime:
docker run --rm -i \
-e LEGISCAN_API_KEY=your-api-key-here \
legiscan-mcp
Glama checks expect a GitHub release. Create and publish a tag such as v1.0.0 after pushing changes.
MIT - see LICENSE for details.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"sh-patterson-legiscan-mcp": {
"command": "npx",
"args": []
}
}
}