agent-fecfile

FEC Filing Plugin for Claude Code
A Claude Code plugin for analyzing Federal Election Commission (FEC) campaign finance filings. Includes an Agent Skill and an MCP server for API access.
This plugin enables AI agents to fetch, parse, and analyze FEC filings directly within agent sessions. Parsing and filtering happen outside the model context, allowing agents to programmatically reduce large filings before analysis, saving tokens and enabling efficient queries against filings of any size.
The plugin includes detailed field mappings for common form types and schedules, helping agents accurately interpret campaign finance data like contributions, disbursements, and committee information.
Features
- Fetch and analyze FEC filings by filing ID (Agent Skill)
- Search for committees and filings via the FEC API (MCP server)
- Support for major form types (F1, F2, F3, F99)
- Detailed field mappings for contributions, disbursements, and schedules
- Auto-installing dependencies via uv
Requirements
- Claude Desktop or Claude Code: This tool works in the Claude Desktop App using the "Code" tab, which gives the AI a space to run scripts. Alternatively, advanced users can use the terminal-based Claude Code CLI.
- Python & uv: This tool runs on Python. You must install
uv globally from their website (using their standard install commands). This ensures your system can find it automatically and allows Claude Desktop to run scripts in the background.
- An FEC API key: (Optional but recommended) This lets you search for committees and filings. You can get a free one from the FEC Developers page.
Installation
Step 1: Install the Plugin (Recommended)
You can install this plugin either through Claude Desktop's Code tab, or directly in your terminal if you use Claude Code.
# First, tell Claude where to find this plugin
claude plugin marketplace add hodgesmr/agent-fecfile
# Next, install the plugin
claude plugin install fecfile@agent-fecfile
Note: You may need to restart the app or start a new Code session for the new features to fully load.
Updating:
If you need to update to a newer version in the future, run these commands:
claude plugin marketplace update agent-fecfile
claude plugin update fecfile@agent-fecfile
Advanced Installation (For Developers)
For agent runtimes that support Agent Skills and MCP but not Claude Code plugins (like Codex CLI):
- Clone the repository:
git clone --branch latest [email protected]:hodgesmr/agent-fecfile.git ~/agent-fecfile
- Install the Agent Skill by symlinking to your runtime's skills directory:
# Codex CLI Global install
ln -sfn ~/agent-fecfile/skills/fecfile ~/.codex/skills/fecfile
- Configure the MCP server using your runtime's MCP configuration:
# Codex CLI
codex mcp add fec-api -- uv run ~/agent-fecfile/mcp-server/server.py
[!IMPORTANT]
The MCP server loads the FEC API key from the system keyring on first tool use. You should expect to see a system prompt to authorize Python's access to the key the first time you use search_committees or get_filings.
Updating:
cd ~/agent-fecfile && git fetch --tags --force && git checkout latest
Usage
Once installed, ask your agent to analyze FEC filings.
[!TIP]
For best results, use the most capable AI models available (like Claude Opus). More capable models produce better analysis and more accurate field interpretations.
Basic Usage (With A Filing ID)
If you already have an FEC filing ID, you can work with it directly, without needing an API key:
❯ What are the largest expenditures in filing 1896830?
⏺ FEC Filing 1896830 - Largest Expenditures
| # | Recipient | Amount | Date | Purpose |
|-----|----------------------------|-----------|------------|------------------|
| 1 | Trump National Doral Hotel | $1,013.61 | 2025-05-19 | RNC training |
| 2 | Uber.com | $19.77 | 2025-05-06 | Travel - Cabfare |
| | TOTAL (itemized) | $1,033.38 | | |
Note
Only 2 expenditures are itemized on Schedule B. The filing shows $21,283.49 in total
disbursements, meaning most spending (~$20,250) was below the $200 itemization
threshold and appears only in summary totals.
The largest single itemized expense was for RNC training at Trump National Doral Hotel
in May 2025.
❯ Show me a table of the contribution counts and totals, by state, in fec filing 1896830