fec-mcp-server
Query FEC campaign finance data — search candidates, track donations, analyze spending, and monitor Super PAC activity via the OpenFEC API.
README
FEC MCP Server
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.
Features
- search_candidates: Search for federal candidates by name, filter by election year, office, state, or party
- get_committee_finances: Retrieve financial summaries including receipts, disbursements, cash on hand, and burn rate
- get_receipts: Get itemized contributions (Schedule A) with donor details
- get_disbursements: Get itemized expenditures (Schedule B) with recipient and purpose details
- Flagged-first notable analysis: Optional notable blocks for receipts/disbursements with reference-list + heuristic flag reasons
- get_independent_expenditures: Track Super PAC spending for or against candidates (Schedule E)
- get_committee_flags: Check for RFAIs, amendments, and compliance red flags
- search_donors: Search individual donors by name, employer, or occupation across all committees
- search_spending: Search campaign spending by description or recipient across all committees
All data comes directly from the official OpenFEC API.
Installation
Prerequisites
- Node.js 20 or later
- An FEC API key (free from api.open.fec.gov)
Install from npm
npm install -g fec-mcp-server
Install from source
git clone <repository-url>
cd fecmcp
npm install
npm run build
Configuration
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
Usage with Claude Desktop
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"
}
}
}
}
Tools
search_candidates
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
get_committee_finances
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:
- Total receipts and disbursements
- Cash on hand
- Debts owed
- Burn rate (spending/income ratio)
- Contribution breakdown (individual, PAC, party)
- Small donor percentage
Example:
Get the financial summary for committee C00401224
get_receipts
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 fortwo_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
get_disbursements
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 fortwo_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
get_independent_expenditures
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
get_committee_flags
Check a campaign committee for compliance red flags including RFAIs and amendments.
Parameters:
committee_id(required): FEC committee IDcycle(optional): Two-year election cycle
Returns:
- RFAI (Request for Additional Information) count and details
- Amendment count and details
- Recent compliance issues
Example:
Check committee C00401224 for any compliance flags
search_donors
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_spending
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
Development
Setup
npm install
Run tests
npm test # Watch mode
npm run test:run # Single run
npm run test:coverage # With coverage
Build
npm run build
Type checking
npm run typecheck
Live acceptance checks
npm run acceptance:fec-day
npm run acceptance:notable
API Rate Limits
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.
Docker
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
Releases
Glama checks expect a GitHub release. Create and publish a tag such as v1.0.0 after pushing changes.
License
MIT
Disclaimer
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.
Resources
- OpenFEC API Documentation
- FEC.gov
- Model Context Protocol
- Reference list attribution:
github/DGA-Research/FEC_Coder_Project_Streamlit(bundled snapshots underresources/reference-lists/)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。