LegiScan MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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 collapse multi-step research workflows into single MCP tool calls
- Per-request batching and lookup caching for repeated bill and roll-call lookups
- 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
1. Create a free account at LegiScan
2. Register for API access at https://legiscan.com/legiscan
3. 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.json
- Windows: %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 |
| ------------------------------- | ------------------------------------------------------------------- |
| 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). |
Bills
| 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, A.B. 858). Best for exact bill lookup. |
| legiscan_get_roll_call | Get vote details with individual legislator votes |
People
| 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 |
Search
| Tool | Description |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| legiscan_search | Full-text search across legislation. Accepts bill-number variants like AB858, but use legiscan_find_bill_by_number for exact matches. |
Sessions
| Tool | Description |
| --------------------------- | -------------------------------------------- |
| legiscan_get_session_list | 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:
1. legiscan_get_session_list to identify the correct session.