fec-mcp-server
The FEC MCP Server provides tools to research and analyze U.S. federal campaign finance data from the FEC API:
Search Candidates (
search_candidates): Find federal candidates by name, election year, office (House/Senate/President), state, or party.Get Committee Finances (
get_committee_finances): Retrieve financial summaries including receipts, disbursements, cash on hand, debts, loans, and burn rate.Get Receipts (
get_receipts): Access itemized contributions (Schedule A) with donor details, PAC classification, and optional notable analysis.Get Disbursements (
get_disbursements): Retrieve itemized expenditures (Schedule B) filterable by amount or purpose, with optional notable analysis.Get Independent Expenditures (
get_independent_expenditures): Track Super PAC/outside group spending (Schedule E) for or against candidates, filterable by support/oppose indicator.Get Committee Flags (
get_committee_flags): Check committees for compliance red flags like RFAIs, amended filings, and late reports.Search Donors (
search_donors): Find individual donors across all FEC filings by name, employer, or occupation.Search Spending (
search_spending): Search campaign expenditures across all committees by description or recipient to identify spending patterns.
FEC MCP Server
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.
npm install -g fec-mcp-serverSet FEC_API_KEY in the MCP server environment. For example, this Claude Desktop configuration starts the installed command-line server.
{
"mcpServers": {
"fec": {
"command": "fec-mcp-server",
"env": {
"FEC_API_KEY": "your-api-key-here"
}
}
}
}You can also run the package through npx fec-mcp-server.
Related MCP server: @cyanheads/openfec-mcp-server
Tools
The server exposes eight tools.
search_candidatesfinds federal candidate records and principal committee IDs.get_committee_financesreturns cycle totals and latest final-report balances.get_receiptsreturns itemized Schedule A receipts for one committee.get_disbursementsreturns itemized Schedule B disbursements for one committee.get_independent_expendituresreturns Schedule E spending by a committee or against or for a candidate.get_committee_flagslists RFAI and amended-filing records for one committee.search_donorssearches individual Schedule A records across committees.search_spendingsearches 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.
get_committee_finances uses /committee/{id}/totals/ for cycle receipts, disbursements, contribution categories, and loan values. It uses the latest final report for cash and debt balances. Every amount is labeled by its period model. get_committee_flags reports filing records. An RFAI or amendment is a review lead, not proof of a violation.
Docker
Build the command-line server image locally.
docker build -t fec-mcp-server .Run the image with an API key.
docker run --rm -i -e FEC_API_KEY=your-api-key-here fec-mcp-serverData freshness and use
OpenFEC updates its data nightly. Its API cache can delay a refreshed value for up to one hour. Treat a result as a dated API response, not a real-time ledger. The base limit for a registered API key is 1,000 requests per hour. See the OpenFEC documentation and the api.data.gov developer manual for current limits and API-key rules.
Attribute official records to the Federal Election Commission and OpenFEC. This package does not alter the source of record. Review the FEC Terms of Service and FEC Acceptable Use Policy before you use the API. The policy restricts commercial use of campaign-finance data. Federal law also restricts contributor-data use for commercial purposes and contribution solicitations. Keep API keys private. Keep contributor data within the approved research purpose.
Optional analyst enrichment
get_receipts and get_disbursements can add a flagged-notables block when you explicitly set include_notable: true. This block uses bundled third-party analyst reference data. It is not FEC data, a legal finding, or a factual classification. Treat each flag as a lead. Confirm it with the official filing fields and an independent source before you report it.
The four bundled CSV snapshots are derived from DGA-Research/FEC_Coder_Project_Streamlit under Databases/. The provenance manifest records the import commit, date, hashes, method, and recorded license status. The source has no recorded license in this package. Review rights before you redistribute or refresh the snapshots.
Development
npm install
npm run build
npm run typecheck
npm testLicense
MIT. See LICENSE.
Maintenance
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
- AlicenseNot gradedqualityDmaintenanceConnects the OpenFEC API to AI assistants for investigating US federal campaign finance through natural language conversations.1MIT
- AlicenseNot gradedqualityAmaintenanceAccess FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.2732Apache 2.0
- AlicenseBqualityBmaintenanceEnables 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.14MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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