Skip to main content
Glama
sh-patterson

fec-mcp-server

by sh-patterson

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

インストール

前提条件

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-here

Claude 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"
      }
    }
  }
}

ツール

名前で候補者のFEC記録を検索します。

パラメータ:

  • q (必須): 検索する候補者名

  • election_year (オプション): 選挙年でフィルタリング (例: 2024)

  • office (オプション): オフィスでフィルタリング - H (下院), S (上院), P (大統領)

  • state (オプション): 州でフィルタリング (2文字のコード)

  • party (オプション): 政党コードでフィルタリング (例: "DEM", "REP")

例:

Search for candidates named "Smith" running for Senate in 2024

get_committee_finances

選挙運動委員会の財務概要を取得します。

パラメータ:

  • committee_id (必須): FEC委員会ID (例: "C00401224")

  • cycle (オプション): 2年間の選挙サイクル (例: 2024)

戻り値:

  • 受領額および支出額の合計

  • 手元資金

  • 負債額

  • バーンレート(支出/収入比率)

  • 寄付の内訳(個人、PAC、政党)

  • 小口寄付者の割合

例:

Get the financial summary for committee C00401224

get_receipts

委員会が受け取った項目別の寄付(スケジュールA)を取得します。

パラメータ:

  • committee_id (必須): FEC委員会ID

  • min_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 C00401224

get_disbursements

委員会が行った項目別の支出(スケジュールB)を取得します。

パラメータ:

  • committee_id (必須): FEC委員会ID

  • min_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 C00401224

get_independent_expenditures

独立支出(スケジュールE)を取得します。これは、PACやスーパーPACが候補者を支持または反対するために費やした資金です。

パラメータ:

  • candidate_id (オプション): ターゲットとなる候補者のFEC ID

  • committee_id (オプション): 独立支出を確認する委員会のFEC ID

  • support_oppose (オプション): "support" または "oppose" でフィルタリング

  • min_amount (オプション): 最小支出額

  • cycle (オプション): 2年間の選挙サイクル

  • limit (オプション): 結果の数 (デフォルト: 20)

注: candidate_id または committee_id のいずれかが必須です。

例:

Show independent expenditures opposing candidate P00009423

get_committee_flags

RFAIや修正案を含む、選挙運動委員会のコンプライアンス上の懸念事項を確認します。

パラメータ:

  • committee_id (必須): FEC委員会ID

  • cycle (オプション): 2年間の選挙サイクル

戻り値:

  • RFAI(追加情報要求)の数と詳細

  • 修正案の数と詳細

  • 最近のコンプライアンス上の問題

例:

Check committee C00401224 for any compliance flags

名前、雇用主、または職業で、すべてのFEC提出書類にわたって個人の寄付者を検索します。

パラメータ:

  • contributor_name (オプション): 検索する寄付者名

  • contributor_employer (オプション): 雇用主名 (例: "Goldman Sachs")

  • contributor_occupation (オプション): 職業 (例: "Lobbyist")

  • contributor_state (オプション): 2文字の州コード

  • min_amount (オプション): 最小寄付額 (デフォルト: $200)

  • cycle (オプション): 2年間の選挙サイクル

  • limit (オプション): 結果の数 (デフォルト: 20)

注: contributor_namecontributor_employer、または contributor_occupation の少なくとも1つが必要です。

例:

Find contributions from employees of "Meta" in California

説明や受領者で、すべての委員会にわたって選挙資金の支出(スケジュール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:notable

APIレート制限

FEC APIは、APIキーを使用して1時間あたり1,000リクエストを許可しています。より高い制限(1時間あたり最大7,200リクエスト)については、FECにお問い合わせください。

タイムアウトとAPIレイテンシ

デフォルトのリクエストタイムアウトは30秒です。検索ツール(search_candidatessearch_donorssearch_spending)は、これらのFEC APIエンドポイントが広範なデータベーススキャンを実行し、本質的に低速であるため、60秒のタイムアウトを使用します。

デフォルトのタイムアウトをグローバルに上書きするには、FEC_API_TIMEOUT_MS 環境変数を設定します:

export FEC_API_TIMEOUT_MS=45000  # 45 seconds

Docker

コンテナイメージをローカルでビルドします:

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データへのアクセスを提供します。このツールおよびその出力は、特定の候補者や政党を促進または反対するために使用されるべきではありません。

リソース

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    Enables querying state-level campaign finance data, including donors, expenditures, committees, and candidates, from multiple state disclosure systems via a unified MCP interface.
    9
    MIT

View all related MCP servers

Related MCP Connectors

  • Access FEC campaign finance data. Query data about candidates, money trails, and election filings.

  • OpenFEC MCP — Federal Election Commission campaign finance data

  • Access US federal award, recipient, agency, and spending analytics data from USAspending.gov.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sh-patterson/fec-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server