FEC MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
fec-mcp-server is a command-line Model Context Protocol server for federal campaign-finance research. It has no web interface. It queries the OpenFEC API and returns formatted text for an MCP client.
Install and configure
Install Node.js 20 or later. Get an API key from the OpenFEC developer site. Keep the key private.
Set FEC_API_KEY in the MCP server environment. For example, this Claude Desktop configuration starts the installed command-line server.
You can also run the package through npx fec-mcp-server.
Tools
The server exposes eight tools.
- search_candidates finds federal candidate records and principal committee IDs.
- get_committee_finances returns cycle totals and latest final-report balances.
- get_receipts returns itemized Schedule A receipts for one committee.
- get_disbursements returns itemized Schedule B disbursements for one committee.
- get_independent_expenditures returns Schedule E spending by a committee or against or for a candidate.
- get_committee_flags lists RFAI and amended-filing records for one committee.
- search_donors searches individual Schedule A records across committees.
- search_spending searches Schedule B records across committees.
Resolve a candidate or committee before you request committee-level data. Keep cycle and two_year_transaction_period equal when you compare a financial summary with receipts or disbursements.
Output and result limits
Each transaction or search query returns one OpenFEC page. The displayed "showing" value is the number of rows in that response. The accompanying count comes from OpenFEC pagination. It does not mean that the tool returned every matching filing.
OpenFEC limits each API call to 100 results per page. The tools that accept limit accept values from 1 through 100. Their default is 20. Large OpenFEC result counts can be approximate. Narrow the query before you draw a conclusion.
Continue a result set
These tools support continuation: search_candidates, get_receipts, get_disbursements, get_independent_expenditures, search_donors, and search_spending. When OpenFEC supplies continuation state, the result includes a paste-ready value such as {"continuation":"fecp1..."}. Pass the token as the tool's continuation field in the next call.
Continuation tokens are unsigned, stateless, opaque cursors. The server binds each token to the effective filters and the tool that created it. If you change a filter or use the token with another tool, the server rejects the request before it calls OpenFEC. Candidate continuation uses OpenFEC page numbers. Transaction continuation uses OpenFEC keyset cursor values. A final nonempty keyset page can include another token. Continue until the footer says Continuation: none; the terminal response can contain no records. Candidate page contents are not guaranteed to remain stable across OpenFEC refreshes.
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 supplies a value). The response preserves source record IDs and URLs returned by OpenFEC. Treat those IDs and URLs as upstream evidence, not as values created by this package.