SuperAPI AI Directory

fec-mcp-server

Query FEC campaign finance data via the OpenFEC API: search candidates, track donations, analyze spending and monitor Super PAC activity.

Open website

About this tool

fec-mcp-server is a command-line Model Context Protocol (MCP) server for federal campaign finance research. It has no web interface; it queries the OpenFEC API and returns results formatted as text to MCP clients.

Purpose

The server is intended for users who need programmatic access to U.S. federal campaign finance data, such as researchers, journalists, or developers, to search for candidates, track donations, analyze spending, and monitor Super PAC activity.

Main capabilities

The server exposes eight tools:

  • search_candidates: Find federal candidate records and principal committee IDs.
  • get_committee_finances: Return cycle totals and the latest final report balances.
  • get_receipts: Return a committee's itemized Schedule A receipts.
  • get_disbursements: Return a committee's itemized Schedule B disbursements.
  • get_independent_expenditures: Return a committee's Schedule E expenditures, or expenditures for/against a candidate.
  • get_committee_flags: List a committee's RFAI and amended filing records.
  • search_donors: Search individual Schedule A records across committees.
  • search_spending: Search Schedule B records across committees.

Usage

Install Node.js 20 or later. Obtain an API key from the OpenFEC developer website and keep it secret. Set FEC_API_KEY in the MCP server environment. For example, a Claude Desktop configuration can launch the installed command-line server. The package can also be run via npx fec-mcp-server.

Before requesting committee-level data, first resolve the candidate or committee. When comparing financial summaries with receipts or disbursements, keep cycle and two_year_transaction_period consistent.

Each transaction or search query returns one page of OpenFEC results. The displayed "showing" value is the number of rows in that response. The accompanying counts come from OpenFEC pagination and do not mean the tool returned all matching filings. OpenFEC limits each API call to a maximum of 100 results per page. Tools that accept limit accept values from 1 to 100, with a default of 20. Large OpenFEC result counts may be imprecise, and queries should be narrowed before drawing conclusions.

The following tools support continuation: search_candidates, get_receipts, get_disbursements, get_independent_expenditures, search_donors, and search_spending. When OpenFEC provides continuation state, the results include a value that can be pasted directly, such as {"continuation":"fecp1..."}. In the next call, pass that token as the tool's continuation field. Continuation tokens are stateless, opaque cursors, and the server binds each token to the effective filters and the tool that created it. If you change filters or use the token with another tool, the server rejects the request before calling OpenFEC. Candidate continuation uses OpenFEC page numbers, while transaction continuation uses OpenFEC keyset cursor values. A final non-empty keyset page may contain another token. Continue until the footer shows Continuation: none; a terminal response may contain no records. Candidate page contents are not guaranteed to remain stable after an OpenFEC refresh.

The footer reports the OpenFEC count status as exact, approximate, or unspecified. Exact counts are marked exact (N records). Approximate counts are marked approximate (N reported records). Missing or unclassified counts are marked unspecified (or unspecified (N reported records) when OpenFEC provides a value). Responses preserve the source record IDs and URLs returned by OpenFEC. Treat these IDs and URLs as upstream evidence, not as values created by this package.

get_committee_finances uses /committee/{id}/totals/ to obtain cycle receipts, disbursements, contribution categories, and loan values. It uses the latest final report to obtain cash and debt balances. Each amount is labeled according to its cycle model. get_committee_flags reports filing recordsRecord. RFAI or amendments are review leads, not evidence of violations.

Applicable scenarios

Suitable for command-line or MCP client environments that need to query federal campaign finance data, for example integrated for use in Claude Desktop.

Limitations

OpenFEC updates data nightly. Its API cache may delay refreshed values by up to one hour. Treat results as dated API responses, not a real-time ledger. The base rate limit for registered API keys is 1,000 requests per hour. For current limits and API key rules, see the OpenFEC documentation and the api.data.gov developer handbook.

Attribute official records to the Federal Election Commission and OpenFEC. This package does not change the source of records. Before using the API, review the FEC Terms of Service and the FEC Acceptable Use Policy. That policy restricts commercial use of campaign finance data. Federal law also restricts the use of contributor data for commercial purposes and for donation solicitation. Keep API keys private. Keep contributor data within approved research purposes.

Optional analyst enhancements

get_receipts and get_disbursements can add a flagged-notables block when include_notable: true is explicitly set. That block uses bundled third-party analyst reference data. It is not FEC data, legal findings, or factual classification. Treat each flag as a lead. Before reporting, confirm with official filing fields and independent sources.

The four bundled CSV snapshots are derived from Databases/ under DGA-Research/FEC_Coder_Project_Streamlit. The source manifest records the import commit, date, hash, method, and recorded license status. Sources in this package have no recorded license. Review rights before redistributing or refreshing the snapshots.

License

MIT. See LICENSE.