Skip to main content
Glama
fec-mcp-server

fec-mcp-server

by sh-patterson

FEC MCP Server

Ein Model Context Protocol (MCP)-Server für die Recherche und Transparenz von Wahlkampfgeldern der Federal Election Commission (FEC). Dieser Server bietet Tools zur Suche nach Kandidaten, zum Abrufen von Finanzberichten sowie zur Analyse von Beiträgen und Ausgaben aus offiziellen FEC-Daten.

Funktionen

  • search_candidates: Suche nach Bundeskandidaten nach Name, gefiltert nach Wahljahr, Amt, Bundesstaat oder Partei

  • get_committee_finances: Abrufen von Finanzübersichten, einschließlich Einnahmen, Ausgaben, Barmitteln und Burn-Rate

  • get_receipts: Abrufen von detaillierten Beiträgen (Schedule A) mit Spenderdetails

  • get_disbursements: Abrufen von detaillierten Ausgaben (Schedule B) mit Empfänger- und Zweckdetails

  • Flagged-first notable analysis: Optionale bemerkenswerte Blöcke für Einnahmen/Ausgaben mit Referenzliste + heuristischen Flag-Gründen

  • get_independent_expenditures: Verfolgung von Super-PAC-Ausgaben für oder gegen Kandidaten (Schedule E)

  • get_committee_flags: Überprüfung auf RFAIs, Änderungen und damit verbundene Compliance-Warnsignale

  • search_donors: Suche nach einzelnen Spendern nach Name, Arbeitgeber oder Beruf über alle Komitees hinweg

  • search_spending: Suche nach Wahlkampfausgaben nach Beschreibung oder Empfänger über alle Komitees hinweg

Alle Daten stammen direkt von der offiziellen OpenFEC API.

Related MCP server: @cyanheads/openfec-mcp-server

Installation

Voraussetzungen

  • Node.js 20 oder neuer

  • Ein FEC-API-Schlüssel (kostenlos erhältlich unter api.open.fec.gov)

Installation über npm

npm install -g fec-mcp-server

Installation aus dem Quellcode

git clone <repository-url>
cd fecmcp
npm install
npm run build

Konfiguration

Setzen Sie Ihren FEC-API-Schlüssel als Umgebungsvariable:

export FEC_API_KEY=your-api-key-here

Oder erstellen Sie eine .env-Datei im Stammverzeichnis Ihres Projekts:

FEC_API_KEY=your-api-key-here

Verwendung mit Claude Desktop

Fügen Sie den Server zu Ihrer Claude Desktop-Konfigurationsdatei hinzu:

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

Oder falls global installiert:

{
  "mcpServers": {
    "fec": {
      "command": "fec-mcp-server",
      "env": {
        "FEC_API_KEY": "your-api-key-here"
      }
    }
  }
}

Tools

Durchsuchen Sie FEC-Datensätze nach Kandidaten anhand ihres Namens.

Parameter:

  • q (erforderlich): Zu suchender Kandidatenname

  • election_year (optional): Filtern nach Wahljahr (z. B. 2024)

  • office (optional): Filtern nach Amt - H (Repräsentantenhaus), S (Senat), P (Präsident)

  • state (optional): Filtern nach Bundesstaat (2-Buchstaben-Code)

  • party (optional): Filtern nach Parteicode (z. B. "DEM", "REP")

Beispiel:

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

get_committee_finances

Finanzübersicht für ein Wahlkampfkomitee abrufen.

Parameter:

  • committee_id (erforderlich): FEC-Komitee-ID (z. B. "C00401224")

  • cycle (optional): Zweijähriger Wahlzyklus (z. B. 2024)

Rückgabewerte:

  • Gesamteinnahmen und -ausgaben

  • Barmittel

  • Schulden

  • Burn-Rate (Verhältnis von Ausgaben zu Einnahmen)

  • Aufschlüsselung der Beiträge (Einzelpersonen, PAC, Partei)

  • Prozentsatz der Kleinspender

Beispiel:

Get the financial summary for committee C00401224

get_receipts

Abrufen von detaillierten Beiträgen (Schedule A), die von einem Komitee erhalten wurden.

Parameter:

  • committee_id (erforderlich): FEC-Komitee-ID

  • min_amount (optional): Mindestbetrag des Beitrags (Standard: $1.000)

  • two_year_transaction_period (optional): Wahlzyklus (z. B. 2024)

  • cycle (optional): Alias für two_year_transaction_period; gleicht Einnahmen automatisch mit der Nutzung des Finanzzyklus ab

  • contributor_type (optional): "individual" oder "committee"

  • include_notable (optional): Beinhaltet den "Flagged-first notable"-Block (Standard: true)

  • fuzzy_threshold (optional): Schwellenwert für die Fuzzy-Suche bei Referenzlisten-Flags (Standard: 90, Bereich: 80-99)

  • limit (optional): Anzahl der Ergebnisse (Standard: 20, max: 100)

  • sort_by (optional): "amount" oder "date" (Standard: "amount")

Beispiel:

Show the top 10 contributions over $5,000 to committee C00401224

get_disbursements

Abrufen von detaillierten Ausgaben (Schedule B), die von einem Komitee getätigt wurden.

Parameter:

  • committee_id (erforderlich): FEC-Komitee-ID

  • min_amount (optional): Mindestbetrag der Ausgabe (Standard: $1.000)

  • two_year_transaction_period (optional): Wahlzyklus

  • cycle (optional): Alias für two_year_transaction_period; gleicht Ausgaben automatisch mit der Nutzung des Finanzzyklus ab

  • purpose (optional): Filtern nach Zweck-Schlüsselwort (z. B. "MEDIA", "CONSULTING")

  • include_notable (optional): Beinhaltet den "Flagged-first notable"-Block (Standard: true)

  • fuzzy_threshold (optional): Schwellenwert für die Fuzzy-Suche bei Referenzlisten-Flags (Standard: 90, Bereich: 80-99)

  • limit (optional): Anzahl der Ergebnisse (Standard: 20, max: 100)

  • sort_by (optional): "amount" oder "date" (Standard: "amount")

Beispiel:

Show media-related spending over $10,000 by committee C00401224

get_independent_expenditures

Abrufen von unabhängigen Ausgaben (Schedule E) – Geld, das von PACs und Super PACs ausgegeben wurde, um Kandidaten zu unterstützen oder abzulehnen.

Parameter:

  • candidate_id (optional): FEC-Kandidaten-ID, um Ausgaben zu sehen, die auf sie abzielen

  • committee_id (optional): FEC-Komitee-ID, um deren unabhängige Ausgaben zu sehen

  • support_oppose (optional): Filtern nach "support" oder "oppose"

  • min_amount (optional): Mindestbetrag der Ausgabe

  • cycle (optional): Zweijähriger Wahlzyklus

  • limit (optional): Anzahl der Ergebnisse (Standard: 20)

Hinweis: Entweder candidate_id oder committee_id ist erforderlich.

Beispiel:

Show independent expenditures opposing candidate P00009423

get_committee_flags

Überprüfen Sie ein Wahlkampfkomitee auf Compliance-Warnsignale, einschließlich RFAIs und Änderungen.

Parameter:

  • committee_id (erforderlich): FEC-Komitee-ID

  • cycle (optional): Zweijähriger Wahlzyklus

Rückgabewerte:

  • RFAI-Anzahl (Request for Additional Information) und Details

  • Anzahl und Details der Änderungen

  • Aktuelle Compliance-Probleme

Beispiel:

Check committee C00401224 for any compliance flags

Suche nach einzelnen Spendern in allen FEC-Einreichungen nach Name, Arbeitgeber oder Beruf.

Parameter:

  • contributor_name (optional): Zu suchender Spendername

  • contributor_employer (optional): Arbeitgebername (z. B. "Goldman Sachs")

  • contributor_occupation (optional): Beruf (z. B. "Lobbyist")

  • contributor_state (optional): 2-Buchstaben-Code des Bundesstaates

  • min_amount (optional): Mindestbetrag des Beitrags (Standard: $200)

  • cycle (optional): Zweijähriger Wahlzyklus

  • limit (optional): Anzahl der Ergebnisse (Standard: 20)

Hinweis: Mindestens einer der Parameter contributor_name, contributor_employer oder contributor_occupation ist erforderlich.

Beispiel:

Find contributions from employees of "Meta" in California

Suche nach Wahlkampfausgaben (Schedule B) über alle Komitees hinweg nach Beschreibung oder Empfänger.

Parameter:

  • description (optional): Schlüsselwort in der Ausgabenbeschreibung (z. B. "travel", "consulting")

  • recipient_name (optional): Name des Empfängers/Anbieters

  • recipient_state (optional): 2-Buchstaben-Code des Bundesstaates

  • min_amount (optional): Mindestbetrag (Standard: $500)

  • cycle (optional): Zweijähriger Wahlzyklus

  • limit (optional): Anzahl der Ergebnisse (Standard: 20)

Hinweis: Mindestens einer der Parameter description oder recipient_name ist erforderlich.

Beispiel:

Find spending on "golf" or "resort" across all committees

Entwicklung

Einrichtung

npm install

Tests ausführen

npm test               # Single run
npm run test:coverage  # With coverage
npm run test:e2e       # Live API tests, requires FEC_API_KEY

Build

npm run build

Typüberprüfung

npm run typecheck

Live-Akzeptanzprüfungen

npm run acceptance:fec-day
npm run acceptance:notable

API-Ratenbegrenzungen

Die FEC-API erlaubt 1.000 Anfragen pro Stunde mit einem API-Schlüssel. Für höhere Limits (bis zu 7.200 Anfragen/Stunde) kontaktieren Sie die FEC.

Timeouts & API-Latenz

Das Standard-Timeout für Anfragen beträgt 30 Sekunden. Die Such-Tools (search_candidates, search_donors, search_spending) verwenden ein 60-Sekunden-Timeout, da diese FEC-API-Endpunkte umfangreiche Datenbankscans durchführen und von Natur aus langsamer sind.

Um das Standard-Timeout global zu überschreiben, setzen Sie die Umgebungsvariable FEC_API_TIMEOUT_MS:

export FEC_API_TIMEOUT_MS=45000  # 45 seconds

Docker

Erstellen Sie das Container-Image lokal:

docker build -t fec-mcp-server .

Führen Sie es mit Ihrem zur Laufzeit bereitgestellten API-Schlüssel aus:

docker run --rm -i \
  -e FEC_API_KEY=your-api-key-here \
  fec-mcp-server

Releases

Glama-Prüfungen erwarten ein GitHub-Release. Erstellen und veröffentlichen Sie nach dem Zusammenführen Ihrer nächsten Repo-Änderungen ein Tag wie v1.0.0 über GitHub oder mit:

git tag v1.0.0
git push origin v1.0.0

Lizenz

MIT

Haftungsausschluss

Dieses Tool wurde für die Forschung zur Transparenz von Wahlkampfgeldern entwickelt. Es bietet Zugriff auf öffentliche FEC-Daten auf neutrale, überparteiliche Weise. Das Tool und seine Ergebnisse sollten nicht dazu verwendet werden, einen Kandidaten oder eine politische Partei zu fördern oder abzulehnen.

Ressourcen

Available Tools

8 tools
get_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

    A4/5.0

    Scored across 8 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    All tools follow a consistent 'verb_noun' pattern with lowercase underscore separation: get_*, search_*. No mixing of conventions.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      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