The LegiScan MCP Server provides structured access to the LegiScan API for legislative data from all 50 US states and Congress through 10 optimized MCP tools.
Core Capabilities:
Legislative Search: Full-text search across bills with relevance scoring, pagination, and state/year/session filtering
Bill Information: Retrieve comprehensive bill data including sponsors, history, votes, texts, amendments, and supplements
Bill Lookup: Find bills by number with automatic format normalization (AB 858, AB858, AB-858)
Vote Tracking: Access roll call vote details with individual legislator positions (Yea/Nay/NV/Absent)
Legislator Search: Find legislators by name (partial matching supported) to get their unique people_id
Legislator Details: Get information including party, role, district, and third-party IDs (VoteSmart, OpenSecrets, Ballotpedia, FollowTheMoney)
Voting Records: Retrieve how a legislator voted across multiple bills in a single optimized call
Primary Authorship: Filter bills where a legislator is the primary author, excluding co-sponsored bills
Session Participants: List all active legislators in a legislative session
Session Management: Browse available legislative sessions by state
Key Advantages:
API Efficiency: Composite tools batch multiple API calls for 90%+ reduction in API usage (e.g., 1 call instead of ~80 for votes)
Input Validation: Automatic state code validation and bill number normalization
Research Workflows: Optimized for opposition research, bill tracking, and scorecard generation
Integration: Compatible with MCP-capable agents like Claude Desktop, Codex CLI, and Claude Code
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LegiScan MCP Serverfind recent climate change bills in California"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LegiScan MCP Server
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.
Features
10 Streamlined MCP Tools optimized for legislative research workflows
Composite tools that batch multiple API calls (90%+ reduction in API usage)
Full TypeScript type definitions for all API responses
Bill number normalization (handles AB 858, AB858, AB-858 formats)
Input validation guardrails for state codes, legislator name queries, and large bill batches
Installation
From npm (Recommended)
From Source
Setup
1. Get a LegiScan API Key
Create a free account at LegiScan
Register for API access at https://legiscan.com/legiscan
Copy your API key
2. Add to Your MCP-Capable Agent
Add this server to whatever MCP host your terminal agent uses.
Claude Desktop config paths:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
For other MCP clients (Codex CLI, Claude Code, etc.), add the same mcpServers.legiscan entry in that client's MCP config file.
Using npx (Recommended)
Using local installation
Available Tools
Composite Tools (High-Level Research)
Tool | Description |
| Find a legislator's people_id by name. Supports partial matching. |
| Get how a legislator voted on multiple bills in one call. |
| Get only bills where legislator is primary author (not co-sponsor). |
Bills
Tool | Description |
| Get detailed bill info (sponsors, history, votes, texts) |
| Find bill by number (handles AB 858, AB858, AB-858) |
| Get vote details with individual legislator votes |
People
Tool | Description |
| Get legislator info with third-party IDs (VoteSmart, OpenSecrets, etc.) |
| Get all legislators active in a session |
Search
Tool | Description |
| Full-text search across legislation |
Sessions
Tool | Description |
| List available legislative sessions by state |
Researcher Workflow (Terminal Agent)
1. Start with a scoped request
Give your agent a goal, state, timeframe, and output format.
Example prompt:
2. Ask the agent to follow a tool sequence
For high-quality results, tell the agent to do this order:
legiscan_get_session_listto identify the correct session.legiscan_searchorlegiscan_find_bill_by_numberto locate target bills.legiscan_get_billfor sponsor/history/vote references.legiscan_get_roll_callfor individual vote details.legiscan_get_persononly when legislator enrichment is needed.
3. Reuse composite tools for analyst workflows
These cut tool-call volume and simplify instructions to your agent:
legiscan_find_legislator: getpeople_idfrom 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.
Prompt Templates
A) Opposition research on one legislator
B) Bill tracking brief for an issue area
C) Scorecard support workflow
API Call Reduction
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 |
Research Tips
State codes are validated as two-letter strings and uppercased automatically (
ca→CA). Invalid codes likeZZpass local validation but return an API error from LegiScan.Always pin state and session in your prompt to reduce ambiguous results.
Ask the agent to show
bill_id,roll_call_id, andpeople_idin intermediate output so you can audit traceability.For legislator search, provide at least a first and last name (name input must be at least 2 characters).
legiscan_get_legislator_votesaccepts up to 100bill_idsper request; split larger jobs into chunks.Ask for final outputs in a table/CSV-ready shape if you plan downstream analysis.
Development
Testing Modes
npm test/npm run test:unit: Fast deterministic tests with mocked network calls.npm run test:live: Real LegiScan API integration tests. RequiresLEGISCAN_API_KEY.
API Limits
Free public API keys have a 30,000 queries per month limit
Composite tools batch requests (10 concurrent max) to avoid rate limits
The composite tools help you stay within limits by reducing total API calls
License
MIT - see LICENSE for details.