fec-mcp-server
FEC MCP Server
連邦選挙委員会(FEC)の選挙資金調査および透明性のためのModel Context Protocol(MCP)サーバーです。このサーバーは、候補者の検索、財務報告書の取得、公式FECデータに基づく寄付や支出の分析を行うためのツールを提供します。
機能
search_candidates: 名前、選挙年、オフィス、州、または政党で連邦候補者を検索
get_committee_finances: 受領額、支出額、手元資金、バーンレート(資金燃焼率)を含む財務概要を取得
get_receipts: 寄付者詳細を含む項目別の寄付(スケジュールA)を取得
get_disbursements: 受領者および目的の詳細を含む項目別の支出(スケジュールB)を取得
Flagged-first notable analysis: 参照リストとヒューリスティックなフラグ理由を含む、寄付/支出の注目すべきブロック(オプション)
get_independent_expenditures: 候補者を支持または反対するスーパーPACの支出(スケジュールE)を追跡
get_committee_flags: RFAI(追加情報要求)、修正案、および関連するコンプライアンス上の懸念事項を確認
search_donors: すべての委員会にわたって、名前、雇用主、または職業で個人の寄付者を検索
search_spending: すべての委員会にわたって、説明や受領者で選挙資金の支出を検索
すべてのデータは、公式の OpenFEC API から直接取得されます。
Related MCP server: @cyanheads/openfec-mcp-server
インストール
前提条件
Node.js 20以降
FEC APIキー(api.open.fec.gov から無料で取得可能)
npmからのインストール
npm install -g fec-mcp-serverソースからのインストール
git clone <repository-url>
cd fecmcp
npm install
npm run build設定
FEC APIキーを環境変数として設定します:
export FEC_API_KEY=your-api-key-hereまたは、プロジェクトのルートに .env ファイルを作成します:
FEC_API_KEY=your-api-key-hereClaude Desktopでの使用
Claude Desktopの設定ファイルにサーバーを追加します:
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"
}
}
}
}または、グローバルにインストールされている場合:
{
"mcpServers": {
"fec": {
"command": "fec-mcp-server",
"env": {
"FEC_API_KEY": "your-api-key-here"
}
}
}
}ツール
search_candidates
名前で候補者のFEC記録を検索します。
パラメータ:
q(必須): 検索する候補者名election_year(オプション): 選挙年でフィルタリング (例: 2024)office(オプション): オフィスでフィルタリング - H (下院), S (上院), P (大統領)state(オプション): 州でフィルタリング (2文字のコード)party(オプション): 政党コードでフィルタリング (例: "DEM", "REP")
例:
Search for candidates named "Smith" running for Senate in 2024get_committee_finances
選挙運動委員会の財務概要を取得します。
パラメータ:
committee_id(必須): FEC委員会ID (例: "C00401224")cycle(オプション): 2年間の選挙サイクル (例: 2024)
戻り値:
受領額および支出額の合計
手元資金
負債額
バーンレート(支出/収入比率)
寄付の内訳(個人、PAC、政党)
小口寄付者の割合
例:
Get the financial summary for committee C00401224get_receipts
委員会が受け取った項目別の寄付(スケジュールA)を取得します。
パラメータ:
committee_id(必須): FEC委員会IDmin_amount(オプション): 最小寄付額 (デフォルト: $1,000)two_year_transaction_period(オプション): 選挙サイクル (例: 2024)cycle(オプション):two_year_transaction_periodのエイリアス。受領額を財務サイクルと自動的に合わせますcontributor_type(オプション): "individual" または "committee"include_notable(オプション): フラグ付きの注目ブロックを含める (デフォルト:true)fuzzy_threshold(オプション): 参照リストフラグのあいまい一致しきい値 (デフォルト:90, 範囲:80-99)limit(オプション): 結果の数 (デフォルト: 20, 最大: 100)sort_by(オプション): "amount" または "date" (デフォルト: "amount")
例:
Show the top 10 contributions over $5,000 to committee C00401224get_disbursements
委員会が行った項目別の支出(スケジュールB)を取得します。
パラメータ:
committee_id(必須): FEC委員会IDmin_amount(オプション): 最小支出額 (デフォルト: $1,000)two_year_transaction_period(オプション): 選挙サイクルcycle(オプション):two_year_transaction_periodのエイリアス。支出を財務サイクルと自動的に合わせますpurpose(オプション): 目的のキーワードでフィルタリング (例: "MEDIA", "CONSULTING")include_notable(オプション): フラグ付きの注目ブロックを含める (デフォルト:true)fuzzy_threshold(オプション): 参照リストフラグのあいまい一致しきい値 (デフォルト:90, 範囲:80-99)limit(オプション): 結果の数 (デフォルト: 20, 最大: 100)sort_by(オプション): "amount" または "date" (デフォルト: "amount")
例:
Show media-related spending over $10,000 by committee C00401224get_independent_expenditures
独立支出(スケジュールE)を取得します。これは、PACやスーパーPACが候補者を支持または反対するために費やした資金です。
パラメータ:
candidate_id(オプション): ターゲットとなる候補者のFEC IDcommittee_id(オプション): 独立支出を確認する委員会のFEC IDsupport_oppose(オプション): "support" または "oppose" でフィルタリングmin_amount(オプション): 最小支出額cycle(オプション): 2年間の選挙サイクルlimit(オプション): 結果の数 (デフォルト: 20)
注: candidate_id または committee_id のいずれかが必須です。
例:
Show independent expenditures opposing candidate P00009423get_committee_flags
RFAIや修正案を含む、選挙運動委員会のコンプライアンス上の懸念事項を確認します。
パラメータ:
committee_id(必須): FEC委員会IDcycle(オプション): 2年間の選挙サイクル
戻り値:
RFAI(追加情報要求)の数と詳細
修正案の数と詳細
最近のコンプライアンス上の問題
例:
Check committee C00401224 for any compliance flagssearch_donors
名前、雇用主、または職業で、すべてのFEC提出書類にわたって個人の寄付者を検索します。
パラメータ:
contributor_name(オプション): 検索する寄付者名contributor_employer(オプション): 雇用主名 (例: "Goldman Sachs")contributor_occupation(オプション): 職業 (例: "Lobbyist")contributor_state(オプション): 2文字の州コードmin_amount(オプション): 最小寄付額 (デフォルト: $200)cycle(オプション): 2年間の選挙サイクルlimit(オプション): 結果の数 (デフォルト: 20)
注: contributor_name、contributor_employer、または contributor_occupation の少なくとも1つが必要です。
例:
Find contributions from employees of "Meta" in Californiasearch_spending
説明や受領者で、すべての委員会にわたって選挙資金の支出(スケジュールB)を検索します。
パラメータ:
description(オプション): 支出説明のキーワード (例: "travel", "consulting")recipient_name(オプション): 受領者/ベンダー名recipient_state(オプション): 2文字の州コードmin_amount(オプション): 最小額 (デフォルト: $500)cycle(オプション): 2年間の選挙サイクルlimit(オプション): 結果の数 (デフォルト: 20)
注: description または recipient_name の少なくとも1つが必要です。
例:
Find spending on "golf" or "resort" across all committees開発
セットアップ
npm installテストの実行
npm test # Single run
npm run test:coverage # With coverage
npm run test:e2e # Live API tests, requires FEC_API_KEYビルド
npm run build型チェック
npm run typecheckライブ受け入れチェック
npm run acceptance:fec-day
npm run acceptance:notableAPIレート制限
FEC APIは、APIキーを使用して1時間あたり1,000リクエストを許可しています。より高い制限(1時間あたり最大7,200リクエスト)については、FECにお問い合わせください。
タイムアウトとAPIレイテンシ
デフォルトのリクエストタイムアウトは30秒です。検索ツール(search_candidates、search_donors、search_spending)は、これらのFEC APIエンドポイントが広範なデータベーススキャンを実行し、本質的に低速であるため、60秒のタイムアウトを使用します。
デフォルトのタイムアウトをグローバルに上書きするには、FEC_API_TIMEOUT_MS 環境変数を設定します:
export FEC_API_TIMEOUT_MS=45000 # 45 secondsDocker
コンテナイメージをローカルでビルドします:
docker build -t fec-mcp-server .実行時にAPIキーを指定して実行します:
docker run --rm -i \
-e FEC_API_KEY=your-api-key-here \
fec-mcp-serverリリース
GlamaのチェックはGitHubリリースを想定しています。次のリポジトリ変更をマージした後、GitHubから、または以下を使用して v1.0.0 などのタグを作成して公開してください:
git tag v1.0.0
git push origin v1.0.0ライセンス
MIT
免責事項
このツールは、選挙資金の透明性に関する調査のために設計されています。中立かつ非党派的な方法で、公開されているFECデータへのアクセスを提供します。このツールおよびその出力は、特定の候補者や政党を促進または反対するために使用されるべきではありません。
リソース
参照リストの帰属:
github/DGA-Research/FEC_Coder_Project_Streamlit(resources/reference-lists/配下のスナップショット)
Available Tools
8 toolsget_committee_financesA
Retrieve comprehensive financial summary for a campaign committee from official FEC filings. Returns total receipts, disbursements, cash on hand, debts, loans (including candidate loans), and calculates burn rate (spending/income ratio). Includes Schedule C loans and Schedule D debts for complete financial picture. Essential for understanding campaign financial health and transparency research.
Inputs: committee_id (required), cycle.
get_committee_flagsA
Check a campaign committee for compliance red flags including RFAIs (Requests for Additional Information from the FEC) and amended filings. Essential for identifying campaign finance compliance issues that merit closer research review.
Inputs: committee_id (required), cycle.
get_disbursementsA
Retrieve itemized expenditures (Schedule B) made by a campaign committee. Shows payment recipients, amounts, and stated purposes. Supports filtering by amount for researching significant spending patterns and campaign finance transparency.
Inputs: committee_id (required), min_amount, two_year_transaction_period, cycle, +5 more.
get_independent_expendituresA
Retrieve independent expenditures (Schedule E) - money spent by PACs and Super PACs to support or oppose candidates without coordinating with campaigns. Critical for understanding outside money influence in elections. Can filter by candidate targeted, committee spending, or support/oppose indicator.
Inputs: candidate_id, committee_id, support_oppose, min_amount, +2 more.
get_receiptsA
Retrieve itemized contributions (Schedule A) received by a campaign committee. Shows individual and organizational donors, amounts, and contributor details. Automatically classifies PAC contributions by type (Corporate, Labor, Trade, Leadership PAC) for deeper analysis. Supports filtering by amount threshold for researching significant contributions and campaign finance patterns.
Inputs: committee_id (required), min_amount, two_year_transaction_period, cycle, +5 more.
search_candidatesA
Search FEC records for candidates by name. Returns candidate identifiers and their principal campaign committee IDs, which are required for retrieving detailed financial information. Useful for campaign finance research and transparency investigations.
Inputs: q (required), election_year, office, state, +1 more.
search_donorsB
Search for individual donors across all FEC filings by name, employer, or occupation. Essential for tracking donor patterns, identifying industry contributions, or researching specific individuals' political giving. Supports searching by employer (e.g., "Goldman Sachs") or occupation (e.g., "Lobbyist", "Government Affairs").
Inputs: contributor_name, contributor_employer, contributor_occupation, contributor_state, +3 more.
search_spendingB
Search campaign spending (Schedule B) across all committees by description or recipient. Use to find questionable expenditures like "steak dinner", "event tickets", "travel", "Disney", "golf", or payments to specific vendors. Essential for identifying spending patterns and potential misuse of campaign funds.
Inputs: description, recipient_name, recipient_state, min_amount, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct FEC data type or search entity: committee finances vs. compliance flags vs. specific schedules (disbursements, receipts, independent expenditures) vs. searches (candidates, donors, spending). No ambiguity.
All tools follow a consistent 'verb_noun' pattern with lowercase underscore separation: get_*, search_*. No mixing of conventions.
8 tools is a well-scoped count for campaign finance research. Covers committee summary, key schedules, and targeted searches without being overwhelming or too thin.
Covers core CRUD-like operations (retrieve summaries, itemized receipts/disbursements, independent expenditures, compliance flags) and search. Minor gap: no dedicated tool for committee details beyond finances, but searches provide identifiers. Solid for the domain.
Maintenance
Related MCP Connectors
Access FEC campaign finance data. Query data about candidates, money trails, and election filings.
FEC campaign finance data: candidate fundraising, donors, and spending
US political money data: campaign finance, lobbying, dark money, contracts and SEC filings.
OpenFEC MCP — Federal Election Commission campaign finance data
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects the OpenFEC API to AI assistants for investigating US federal campaign finance through natural language conversations.1MIT
- AlicenseNot gradedqualityBmaintenanceAccess FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.258 npm2Apache 2.0
- AlicenseBqualityDmaintenanceEnables querying state-level campaign finance data, including donors, expenditures, committees, and candidates, from multiple state disclosure systems via a unified MCP interface.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching political donations, donors, and lobbying data from any AI assistant using Federal Election Commission data.MIT