loading…
Search for a command to run...
loading…
Query FEC campaign finance data — search candidates, track donations, analyze spending, and monitor Super PAC activity via the OpenFEC API.
Query FEC campaign finance data — search candidates, track donations, analyze spending, and monitor Super PAC activity via the OpenFEC API.
A Model Context Protocol (MCP) server for Federal Election Commission (FEC) campaign finance research and transparency. This server provides tools to search candidates, retrieve financial reports, and analyze contributions and disbursements from official FEC data.
All data comes directly from the official OpenFEC API.
npm install -g fec-mcp-server
git clone <repository-url>
cd fecmcp
npm install
npm run build
Set your FEC API key as an environment variable:
export FEC_API_KEY=your-api-key-here
Or create a .env file in your project root:
FEC_API_KEY=your-api-key-here
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"fec": {
"command": "npx",
"args": ["fec-mcp-server"],
"env": {
"FEC_API_KEY": "your-api-key-here"
}
}
}
}
Or if installed globally:
{
"mcpServers": {
"fec": {
"command": "fec-mcp-server",
"env": {
"FEC_API_KEY": "your-api-key-here"
}
}
}
}
Search FEC records for candidates by name.
Parameters:
q (required): Candidate name to search forelection_year (optional): Filter by election year (e.g., 2024)office (optional): Filter by office - H (House), S (Senate), P (President)state (optional): Filter by state (2-letter code)party (optional): Filter by party code (e.g., "DEM", "REP")Example:
Search for candidates named "Smith" running for Senate in 2024
Retrieve financial summary for a campaign committee.
Parameters:
committee_id (required): FEC committee ID (e.g., "C00401224")cycle (optional): Two-year election cycle (e.g., 2024)Returns:
Example:
Get the financial summary for committee C00401224
Retrieve itemized contributions (Schedule A) received by a committee.
Parameters:
committee_id (required): FEC committee IDmin_amount (optional): Minimum contribution amount (default: $1,000)two_year_transaction_period (optional): Election cycle (e.g., 2024)cycle (optional): Alias for two_year_transaction_period; auto-aligns receipts with finance cycle usagecontributor_type (optional): "individual" or "committee"include_notable (optional): Include flagged-first notable block (default: true)fuzzy_threshold (optional): Fuzzy matching threshold for reference-list flags (default: 90, range: 80-99)limit (optional): Number of results (default: 20, max: 100)sort_by (optional): "amount" or "date" (default: "amount")Example:
Show the top 10 contributions over $5,000 to committee C00401224
Retrieve itemized expenditures (Schedule B) made by a committee.
Parameters:
committee_id (required): FEC committee IDmin_amount (optional): Minimum disbursement amount (default: $1,000)two_year_transaction_period (optional): Election cyclecycle (optional): Alias for two_year_transaction_period; auto-aligns disbursements with finance cycle usagepurpose (optional): Filter by purpose keyword (e.g., "MEDIA", "CONSULTING")include_notable (optional): Include flagged-first notable block (default: true)fuzzy_threshold (optional): Fuzzy matching threshold for reference-list flags (default: 90, range: 80-99)limit (optional): Number of results (default: 20, max: 100)sort_by (optional): "amount" or "date" (default: "amount")Example:
Show media-related spending over $10,000 by committee C00401224
Retrieve independent expenditures (Schedule E) - money spent by PACs and Super PACs to support or oppose candidates.
Parameters:
candidate_id (optional): FEC candidate ID to see spending targeting themcommittee_id (optional): FEC committee ID to see their independent spendingsupport_oppose (optional): Filter by "support" or "oppose"min_amount (optional): Minimum expenditure amountcycle (optional): Two-year election cyclelimit (optional): Number of results (default: 20)Note: Either candidate_id or committee_id is required.
Example:
Show independent expenditures opposing candidate P00009423
Check a campaign committee for compliance red flags including RFAIs and amendments.
Parameters:
committee_id (required): FEC committee IDcycle (optional): Two-year election cycleReturns:
Example:
Check committee C00401224 for any compliance flags
Search for individual donors across all FEC filings by name, employer, or occupation.
Parameters:
contributor_name (optional): Donor name to searchcontributor_employer (optional): Employer name (e.g., "Goldman Sachs")contributor_occupation (optional): Occupation (e.g., "Lobbyist")contributor_state (optional): Two-letter state codemin_amount (optional): Minimum contribution amount (default: $200)cycle (optional): Two-year election cyclelimit (optional): Number of results (default: 20)Note: At least one of contributor_name, contributor_employer, or contributor_occupation is required.
Example:
Find contributions from employees of "Meta" in California
Search campaign spending (Schedule B) across all committees by description or recipient.
Parameters:
description (optional): Keyword in spending description (e.g., "travel", "consulting")recipient_name (optional): Recipient/vendor namerecipient_state (optional): Two-letter state codemin_amount (optional): Minimum amount (default: $500)cycle (optional): Two-year election cyclelimit (optional): Number of results (default: 20)Note: At least one of description or recipient_name is required.
Example:
Find spending on "golf" or "resort" across all committees
npm install
npm test # Watch mode
npm run test:run # Single run
npm run test:coverage # With coverage
npm run build
npm run typecheck
npm run acceptance:fec-day
npm run acceptance:notable
The FEC API allows 1,000 requests per hour with an API key. For higher limits (up to 7,200 requests/hour), contact the FEC.
The default request timeout is 30 seconds. The search tools (search_candidates, search_donors, search_spending) use a 60-second timeout because these FEC API endpoints perform broad database scans and are inherently slower.
To override the default timeout globally, set the FEC_API_TIMEOUT_MS environment variable:
export FEC_API_TIMEOUT_MS=45000 # 45 seconds
Build the container image locally:
docker build -t fec-mcp-server .
Run it with your API key provided at runtime:
docker run --rm -i \
-e FEC_API_KEY=your-api-key-here \
fec-mcp-server
Glama checks expect a GitHub release. After merging your next repo changes, create and publish a tag such as v1.0.0 from GitHub or with:
git tag v1.0.0
git push origin v1.0.0
MIT
This tool is designed for campaign finance transparency research. It provides access to public FEC data in a neutral, non-partisan manner. The tool and its outputs should not be used to promote or oppose any candidate or political party.
github/DGA-Research/FEC_Coder_Project_Streamlit (bundled snapshots under resources/reference-lists/)Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"fec-mcp-server": {
"command": "npx",
"args": []
}
}
}