CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
cyanheads avatar

Openfec Mcp Server

cyanheads/openfec-mcp-server
19 toolsSTDIO, HTTPregistry active
Summary

Wraps the FEC's OpenFEC API with nine tools covering candidates, committees, contributions, disbursements, independent expenditures, filings, elections, legal documents, and the FEC calendar. You can search itemized Schedule A contributions with filters for employer, occupation, state, and amount range, or pull aggregated breakdowns by size bracket. The disbursements tool works the same way for Schedule B spending. Independent expenditures show support or oppose positions per candidate. Five resources expose candidate profiles, committee details, and election races at the presidential, senate, and house district level. Two prompts frame campaign finance analysis and money trail investigations. Requires an FEC API key. Available via stdio, streamable HTTP, or a hosted instance at openfec.caseyjhand.com/mcp.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

Tools

Public tool metadata for what this MCP can expose to an agent.

9 tools
openfec_search_candidatesFind federal candidates by name, state, office, party, or cycle. Retrieve a specific candidate by FEC ID with financial totals. Candidate IDs start with H (House), S (Senate), or P (President) followed by digits.14 params

Find federal candidates by name, state, office, party, or cycle. Retrieve a specific candidate by FEC ID with financial totals. Candidate IDs start with H (House), S (Senate), or P (President) followed by digits.

Parameters* required
candidate_idstring
FEC candidate ID (e.g., P00003392, H2CO07170). When provided, returns a single candidate with full detail.
candidate_statusstring
Candidate status: C=present, F=future, N=not yet, P=prior.one of C · F · N · P
cyclenumber
Two-year election cycle (even year, e.g., 2024).
districtstring
Two-digit district number for House candidates.
election_yearnumber
Specific election year the candidate ran in.
has_raised_fundsboolean
Only candidates whose committee has received receipts.
include_totalsboolean
Include financial totals (receipts, disbursements, cash on hand). Defaults to true when fetching by candidate_id.
incumbent_challengestring
Incumbent status: I=incumbent, C=challenger, O=open seat.one of I · C · O
officestring
Filter by office: H=House, S=Senate, P=President.one of H · S · P
pagenumber
Page number (1-indexed). Default 1.
partystring
Three-letter party code (e.g., DEM, REP, LIB).
per_pagenumber
Results per page. Default 20, max 100.
querystring
Full-text candidate name search.
statestring
Two-letter US state code (e.g., AZ, CA).
openfec_search_committeesFind political committees (campaign, PAC, Super PAC, party) by name, type, candidate affiliation, or state. Retrieve a specific committee by FEC ID. Committee IDs start with C followed by digits (e.g., C00358796).11 params

Find political committees (campaign, PAC, Super PAC, party) by name, type, candidate affiliation, or state. Retrieve a specific committee by FEC ID. Committee IDs start with C followed by digits (e.g., C00358796).

Parameters* required
candidate_idstring
Find committees linked to this candidate (authorized, leadership, joint fundraising).
committee_idstring
FEC committee ID (e.g., C00358796). Starts with 'C' followed by digits. Returns a single committee with full detail.
committee_typestring
Committee type code. Common: H (House), S (Senate), P (Presidential), O (Super PAC), N (PAC nonqualified), Q (PAC qualified), X (Party nonqualified), Y (Party qualified).
cyclenumber
Two-year election cycle (even year).
designationstring
Committee designation. A (authorized), B (lobbyist PAC), D (leadership PAC), J (joint fundraiser), P (principal campaign), U (unauthorized).
pagenumber
Page number (1-indexed). Default 1.
partystring
Three-letter party code (e.g., DEM, REP).
per_pagenumber
Results per page. Default 20, max 100.
querystring
Full-text committee name search.
statestring
Two-letter state code.
treasurer_namestring
Full-text treasurer name search.
openfec_search_contributionsSearch itemized individual contributions (Schedule A) or get aggregate breakdowns by size, state, employer, or occupation. Use to answer "who is funding this committee?" Itemized mode requires a committee_id. Aggregate by_size/by_state can use candidate_id instead.18 params

Search itemized individual contributions (Schedule A) or get aggregate breakdowns by size, state, employer, or occupation. Use to answer "who is funding this committee?" Itemized mode requires a committee_id. Aggregate by_size/by_state can use candidate_id instead.

Parameters* required
candidate_idstring
Candidate ID. Enables by_size and by_state aggregates without a committee_id.
committee_idstring
Receiving committee ID (e.g., C00703975).
contributor_citystring
Contributor city. Itemized only.
contributor_employerstring
Full-text employer search. Itemized only.
contributor_namestring
Full-text donor name search. Itemized only.
contributor_occupationstring
Full-text occupation search. Itemized only.
contributor_statestring
Two-letter state code (e.g., CA). Itemized only.
contributor_zipstring
ZIP code prefix (starts-with match). Itemized only.
cursorstring
Opaque pagination cursor from a previous response. Itemized mode only (keyset pagination).
cyclenumber
Two-year election cycle (e.g., 2024). Even years only. Defaults to current cycle for itemized mode.
is_individualboolean
Only individual contributions (excludes committee-to-committee transfers). Itemized only.
max_amountnumber
Maximum contribution amount in dollars. Itemized only.
max_datestring
Latest contribution date (YYYY-MM-DD). Itemized only.
min_amountnumber
Minimum contribution amount in dollars. Itemized only.
min_datestring
Earliest contribution date (YYYY-MM-DD). Itemized only.
modestring
Query mode. "itemized" returns individual contribution records (keyset pagination). "by_size" aggregates by contribution size bucket. "by_state" aggregates by contributor state. "by_employer" aggre...one of itemized · by_size · by_state · by_employer · by_occupationdefault: itemized
per_pagenumber
Results per page (max 100).default: 20
sortstring
Sort field. Itemized only.one of contribution_receipt_date · contribution_receipt_amount
openfec_search_disbursementsSearch itemized committee spending (Schedule B) or get aggregate breakdowns by purpose or recipient. All modes require a committee_id. Use to answer "what is this committee spending money on?" or "who is receiving payments from this committee?"16 params

Search itemized committee spending (Schedule B) or get aggregate breakdowns by purpose or recipient. All modes require a committee_id. Use to answer "what is this committee spending money on?" or "who is receiving payments from this committee?"

Parameters* required
committee_idstring
Spending committee ID (e.g., C00703975). Required for all modes.
cursorstring
Opaque pagination cursor from a previous response. Itemized mode only (keyset pagination).
cyclenumber
Two-year election cycle (e.g., 2024). Even years only.
disbursement_descriptionstring
Full-text description search (e.g., "media buy", "consulting"). Itemized only.
disbursement_purpose_categorystring
Purpose category code. Itemized only.
max_amountnumber
Maximum amount in dollars. Itemized only.
max_datestring
Latest disbursement date (YYYY-MM-DD). Itemized only.
min_amountnumber
Minimum amount in dollars. Itemized only.
min_datestring
Earliest disbursement date (YYYY-MM-DD). Itemized only.
modestring
Query mode. "itemized" returns individual disbursement records (keyset pagination). "by_purpose" aggregates by purpose category. "by_recipient" aggregates by recipient name. "by_recipient_id" aggre...one of itemized · by_purpose · by_recipient · by_recipient_iddefault: itemized
per_pagenumber
Results per page (max 100).default: 20
recipient_citystring
Recipient city. Itemized only.
recipient_committee_idstring
Recipient committee ID (for committee-to-committee transfers). Itemized only.
recipient_namestring
Full-text payee name search. Itemized only.
recipient_statestring
Recipient state. Itemized only.
sortstring
Sort field. Itemized only.one of disbursement_date · disbursement_amount
openfec_search_expendituresSearch independent expenditures (Schedule E) — outside spending supporting or opposing federal candidates. Covers Super PACs, party committees, and other groups. Use itemized mode for individual expenditure records, or by_candidate for aggregated totals per candidate.18 params

Search independent expenditures (Schedule E) — outside spending supporting or opposing federal candidates. Covers Super PACs, party committees, and other groups. Use itemized mode for individual expenditure records, or by_candidate for aggregated totals per candidate.

Parameters* required
candidate_idstring
Targeted candidate ID (e.g., P00003392).
candidate_officestring
Office of the targeted candidate: H=House, S=Senate, P=President.one of H · S · P
candidate_office_statestring
Two-letter state code of the targeted race.
candidate_partystring
Three-letter party code of the targeted candidate (e.g., DEM, REP).
committee_idstring
Spending committee ID (e.g., C00703975).
cursorstring
Opaque pagination cursor from a previous response. Itemized mode only (keyset pagination).
cyclenumber
Two-year election cycle (e.g., 2024). Even years only.
is_noticeboolean
Only 24/48-hour notice filings (near-election spending). Itemized only.
max_amountnumber
Maximum expenditure amount in dollars. Itemized only.
max_datestring
Latest expenditure date (YYYY-MM-DD). Itemized only.
min_amountnumber
Minimum expenditure amount in dollars. Itemized only.
min_datestring
Earliest expenditure date (YYYY-MM-DD). Itemized only.
modestring
Query mode. "itemized" returns individual expenditure records (keyset pagination). "by_candidate" returns aggregated totals per candidate by committee (page-based).one of itemized · by_candidatedefault: itemized
most_recentboolean
Only the most recent version of amended filings. Itemized only.default: true
payee_namestring
Full-text payee name search. Itemized only.
per_pagenumber
Results per page (max 100).default: 20
sortstring
Sort field. Itemized only.one of expenditure_date · expenditure_amount · office_total_ytd
support_opposestring
S = support, O = oppose. Filter by whether the expenditure supports or opposes the candidate.one of S · O
openfec_search_filingsSearch FEC filings and reports by committee, candidate, form type, or date range. Covers financial reports (F3/F3P/F3X), statements of candidacy (F2), organizational filings (F1), 24-hour IE notices (F24), and amendments.13 params

Search FEC filings and reports by committee, candidate, form type, or date range. Covers financial reports (F3/F3P/F3X), statements of candidacy (F2), organizational filings (F1), 24-hour IE notices (F24), and amendments.

Parameters* required
candidate_idstring
Associated candidate ID.
committee_idstring
Filing committee ID.
cyclenumber
Two-year election cycle (even year).
filer_namestring
Full-text filer name search.
form_typestring
FEC form type. Common: F3 (House/Senate quarterly), F3P (Presidential), F3X (PAC/party), F24 (24-hour IE notice), F1 (statement of organization), F2 (statement of candidacy), F5 (IE by persons).
is_amendedboolean
Filter to original or amended filings only.
max_receipt_datestring
Latest FEC receipt date (YYYY-MM-DD).
min_receipt_datestring
Earliest date FEC received the filing (YYYY-MM-DD).
most_recentboolean
Only the most recent version (filters out superseded amendments). Default true.
pagenumber
Page number (1-indexed). Default 1.
per_pagenumber
Results per page. Default 20, max 100.
report_typestring
Report type code. Common: Q1/Q2/Q3 (quarterly), YE (year-end), M3-M12 (monthly), 12G/12P/30G (pre/post election).
report_yearnumber
Filing year.
openfec_lookup_electionsLook up federal election races and candidate financial summaries. Find who's running in a race with fundraising totals, or get an aggregate race summary.7 params

Look up federal election races and candidate financial summaries. Find who's running in a race with fundraising totals, or get an aggregate race summary.

Parameters* required
cycleinteger
Election cycle year (even years only, e.g. 2024).
districtstring
Two-digit district number (e.g. "07"). Required for house unless zip is provided.
election_fullboolean
Expand to full election period (4yr president, 6yr senate, 2yr house). Default true. Ignored for ZIP-based searches.default: true
modestring
search = candidates in a race with financial totals. summary = aggregate race financial summary.one of search · summarydefault: search
officestring
Office sought: president, senate, or house.one of president · senate · house
statestring
Two-letter US state code (e.g., AZ, CA). Required for senate/house unless zip is provided.
zipstring
ZIP code — finds races covering this ZIP. Search mode only.
openfec_search_legalSearch FEC legal documents: advisory opinions, enforcement cases (MURs), alternative dispute resolutions, and administrative fines.13 params

Search FEC legal documents: advisory opinions, enforcement cases (MURs), alternative dispute resolutions, and administrative fines.

Parameters* required
ao_numberstring
Specific advisory opinion number (e.g. "2024-01").
case_numberstring
Specific MUR or ADR case number.
from_hitinteger
Offset for pagination (0-indexed). Default 0.default: 0
hits_returnedinteger
Results per page. Default 20, max 200.default: 20
max_datestring
Latest document date (YYYY-MM-DD).
max_penalty_amountnumber
Maximum penalty amount.
min_datestring
Earliest document date (YYYY-MM-DD).
min_penalty_amountnumber
Minimum penalty amount (enforcement cases).
querystring
Full-text search across legal documents.
regulatory_citationstring
CFR citation (e.g. "11 CFR 112.4").
respondentstring
Respondent name (enforcement cases).
statutory_citationstring
U.S.C. citation (e.g. "52 U.S.C. 30106").
typestring
Document type filter. Omit to search all types. admin_fines is slow without a query or respondent filter.one of advisory_opinions · murs · adrs · admin_fines · statutes
openfec_lookup_calendarLook up FEC calendar events, filing deadlines, and election dates.12 params

Look up FEC calendar events, filing deadlines, and election dates.

Parameters* required
categorystring
Calendar category ID for events mode. Common values: "32" (reporting deadlines), "33" (election dates), "34" (quarterly filings). Events mode only.
descriptionstring
Full-text event description search. Events mode.
election_yearinteger
Election year. Election dates mode.
max_datestring
Latest date (YYYY-MM-DD).
min_datestring
Earliest date (YYYY-MM-DD).
modestring
events = FEC calendar events. filing_deadlines = report due dates. election_dates = upcoming/past elections.one of events · filing_deadlines · election_datesdefault: events
officestring
Office sought (H=House, S=Senate, P=President). Election dates mode.one of H · S · P
pageinteger
Page number (1-indexed). Default 1.default: 1
per_pageinteger
Results per page. Default 20, max 100.default: 20
report_typestring
Report type code (e.g. "Q1", "Q2"). Filing deadlines mode only.
report_yearinteger
Report year. Filing deadlines mode.
statestring
Two-letter state code (e.g., AZ, CA). Primarily for election_dates mode.

@cyanheads/openfec-mcp-server

Access FEC campaign finance data on candidates, money trails, and election filings via MCP. STDIO or Streamable HTTP.

12 Tools • 5 Resources • 2 Prompts

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework

Public Hosted Server: https://openfec.caseyjhand.com/mcp


Overview

US federal campaign finance data from the FEC's OpenFEC API. Search candidates, committees, and filings, trace contributions (Schedule A), disbursements (Schedule B), and independent and coordinated party expenditures (Schedules E/F), and look up election races, legal documents, and filing deadlines. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.

Tools

ToolDescription
openfec_search_candidatesFind federal candidates by name, state, office, party, or cycle; fetch one by FEC ID with financial totals
openfec_search_committeesFind political committees by name, type, candidate affiliation, or state; fetch one by FEC ID
openfec_get_committee_totalsPre-aggregated financial totals for one committee by cycle, or ranked across committees of one entity type
openfec_search_contributionsItemized contributions (Schedule A), or aggregates by size, state, employer, or occupation
openfec_search_disbursementsItemized committee spending (Schedule B), or aggregates by purpose or recipient
openfec_search_expendituresIndependent expenditures (Schedule E) supporting or opposing candidates, itemized or totaled per candidate
openfec_search_coordinated_expendituresCoordinated party expenditures (Schedule F) made on behalf of a candidate
openfec_search_filingsFEC filings and reports by committee, candidate, form type, or date range
openfec_lookup_electionsCandidates in a federal race with their fundraising totals, or an aggregate race summary
openfec_search_legalAdvisory opinions, enforcement cases, alternative dispute resolutions, administrative fines, and statutes
openfec_get_legal_documentOne legal document in full, including the arrays search trims away, paged by entry when too large for one response
openfec_lookup_calendarFEC calendar events, filing deadlines, and election dates

Resources

ResourceDescription
openfec://candidate/{candidate_id}Candidate profile with financial totals and principal committees
openfec://committee/{committee_id}Committee profile with type, designation, and financial summary
openfec://election/{cycle}/{office}Presidential race with candidate financial totals
openfec://election/{cycle}/{office}/{state}Senate or at-large House race with candidate financial totals
openfec://election/{cycle}/{office}/{state}/{district}House district race with candidate financial totals

The same data is reachable through openfec_search_candidates, openfec_search_committees, and openfec_lookup_elections for tool-only clients.

Prompts

PromptDescription
openfec_money_trailTrace the money around a candidate: direct fundraising, PAC support, independent expenditures, and party spending
openfec_campaign_analysisStructured analysis of a candidate's financial position

Capability reference

openfec_search_candidates tool

  • query name search filtered by state, district, office, party, cycle, election_year, incumbent_challenge, candidate_status, and has_raised_funds, up to 100 per page; or a candidate_id lookup (H/S/P + eight letters or digits) returning one full record
  • include_totals (default on for an ID lookup) adds per-cycle totals rows and caps a search page at 35 candidates when cycle or election_year scopes the totals, 5 when they span every cycle; candidates the totals fetch didn't reach are listed in missing_totals
  • Typed errors: candidate_not_found, inputs_not_applicable_to_id_lookup

openfec_search_committees tool

  • query name search filtered by candidate_id, state, party, committee_type, designation, cycle, and treasurer_name, up to 100 per page; or a committee_id lookup (C + eight digits)
  • Typed errors: committee_not_found, inputs_not_applicable_to_id_lookup

openfec_get_committee_totals tool

  • mode: "single" (default) takes a committee_id and returns one row per two-year cycle; mode: "by_entity_type" ranks every committee of one entity_type (presidential, pac, party, pac-party, house-senate, ie-only), filterable by state, type, designation, organization type, and receipts/disbursements bounds; up to 100 per page
  • Rows carry receipts, disbursements, cash on hand, debts, and the itemized/unitemized split; the output mode says whether rows are cycles or committees
  • Typed errors: committee_id_required_for_single_mode, entity_type_required_for_group_mode, committee_totals_not_found

openfec_search_contributions tool

  • itemized (default) needs a committee_id and filters by contributor name, employer, occupation, city, state, ZIP, date and amount ranges, and is_individual, 30 rows per page; by_size / by_state take a committee_id or candidate_id, by_employer / by_occupation a committee_id
  • The output mode becomes by_size_candidate or by_state_candidate when scoped by candidate, a different row shape; itemized responses carry next_cursor, count, and count_is_approximate
  • Typed errors: itemized_requires_committee_id, aggregate_requires_committee_id

openfec_search_disbursements tool

  • committee_id required in every mode: itemized (default; recipient name, state, city, and committee ID, description, purpose category, date and amount ranges, 30 rows per page), by_purpose, by_recipient, by_recipient_id
  • Itemized responses carry next_cursor, count, and count_is_approximate; aggregate modes page by number

openfec_search_expenditures tool

  • itemized (default) filters by committee, candidate, support_oppose, payee, targeted office/state/district, party, is_notice (24/48-hour notices), dates, and amounts; most_recent defaults to true; 60 rows per page when scoped by committee_id, 30 otherwise
  • by_candidate totals need a candidate_id or a full race scope (candidate_office=P alone, S plus candidate_office_state, H plus state and candidate_office_district), or fail as by_candidate_requires_scope

openfec_search_coordinated_expenditures tool

  • Scope by spending party committee_id, benefiting candidate_id, cycle, payee, dates, and amounts; unscoped queries span all years
  • Page-based, 80 rows per page when scoped by committee_id and 25 otherwise; rows carry subordinate_committee_id, the committee the spending is attributed to

openfec_search_filings tool

  • Filters: committee_id, candidate_id, filer_name, form_type (F3, F3P, F3X, F24, F1, F2, F5), report_type, report_year, cycle, is_amended, and receipt date range; 65 rows per page
  • most_recent defaults to true, hiding superseded amendments; rows carry form and report type, financial totals, and pdf_url

openfec_lookup_elections tool

  • office and an even cycle are required; Senate also needs state and House state plus district, unless a zip scopes a search
  • mode: "search" (default) returns the race's candidates with totals and candidate_pcc_id / candidate_pcc_name, that cycle's principal campaign committee; mode: "summary" returns one aggregate race row
  • Typed errors: cycle_must_be_even, missing_state_for_office, missing_district_for_house, summary_does_not_support_zip

openfec_search_legal tool

  • type (advisory_opinions, murs, adrs, admin_fines, statutes), query, ao_number, case_number, respondent, citations, penalty bounds, or dates; at least one is required (missing_filter), and a date bound needs type plus a date_kind that type records
  • Citations, penalty bounds, respondent, ao_number, and case_number each filter only some types; one sent with a type it doesn't filter fails as filter_not_valid_for_type, and with type omitted the search returns only the types they all apply to, with a total over those types. On MURs and ADRs a citation can't be combined with case_number, respondent, a penalty bound, or an open/close date bound, which upstream would ignore; the two citation fields together match either one
  • Citations take the form upstream parses — 52 U.S.C. 30104 or 11 CFR 110.1 (USC, C.F.R., §, and suffixes like 30104(g) are fine); a bare 30106 or 110.1 fails as invalid_citation instead of silently returning unfiltered results. One citation per field: upstream applies only the first citation in a value, so 52 U.S.C. 30104, 52 U.S.C. 30118 fails the same way
  • Offset paging via from_hit / hits_returned, up to 200 per type within a 10,000-result window
  • Results are trimmed: documents becomes document_count and document_categories, dispositions becomes disposition_count and disposition_categories, highlights stop at 3 with their <em> match markup removed and render one per line, and commission_votes shrink to a date and a 200-character action; openfec_get_legal_document returns the full record
  • Each response stays under 100,000 bytes: whole results are admitted one type at a time until the next would not fit, and a page that held some back reports truncated, shown, and nextFromHit — the from_hit that continues each type, passed back with that type

openfec_get_legal_document tool

  • doc_type is the plural of a search result's document_type (mur → murs); no is that result's no field
  • Returns the untrimmed record, including documents, commission_votes, and dispositions; fails as legal_document_not_found
  • A record over 100,000 bytes returns its scalar fields, the arrays that fit (smallest first), and withheld — each held-back array with its entry count and size; re-call with array and offset for that array's entries while they fit, plus next_offset. An array the record lacks fails as array_not_in_record

openfec_lookup_calendar tool

  • events (default; category, one of 18 codes, and description), filing_deadlines (report_type, report_year), or election_dates (state, office, district, election_year); min_date / max_date apply in every mode, up to 100 per page
  • A district filter never matches an at-large race; pair it with state

openfec://candidate/{candidate_id} resource

  • Candidate record merged with its financial totals and principal_committees (current designation P, not scoped to a cycle)
  • candidate_id comes from openfec_search_candidates; fails as candidate_not_found

openfec://committee/{committee_id} resource

  • Committee record merged with its financial totals, which are absent for a committee that files no Form 3/3X/3P
  • committee_id comes from openfec_search_committees; fails as committee_not_found

openfec://election/{cycle}/{office} resource

  • Presidential races (office P), with totals for the full election period
  • First page only: a longer race carries truncation_notice pointing to openfec_lookup_elections, and an empty one empty_result_notice

openfec://election/{cycle}/{office}/{state} resource

  • Senate races, or an at-large House race in a single-district state (office S or H)
  • Same first-page limit and notices as the presidential template

openfec://election/{cycle}/{office}/{state}/{district} resource

  • House district races (office H)
  • Same first-page limit and notices as the presidential template

openfec_money_trail prompt

  • Arguments: candidate_name or candidate_id (one required), optional cycle
  • Seven steps: identify the candidate, resolve the cycle's principal committee via candidate_pcc_id, then direct fundraising, independent expenditures, coordinated party spending, disbursements, and a synthesis

openfec_campaign_analysis prompt

  • Arguments: candidate_name or candidate_id (one required), optional cycle
  • Seven steps: candidate overview, principal committee and per-cycle trajectory, fundraising mix, burn rate, competitive position, outside money, and an assessment

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

OpenFEC-specific:

  • Type-safe client for the OpenFEC REST API with retry and a configurable timeout; error messages have the API key stripped and HTTP failures carry recovery hints
  • Cycles are even years covering two calendar years (2024 = Jan 2023 – Dec 2024); itemized Schedule A/B/E default to the current cycle when cycle is omitted, and election_full (default true) widens a race total to the full election period (4yr president, 6yr senate, 2yr house)
  • Itemized contributions and disbursements scope to a committee_id, not a candidate_id. Committee designation and principal_committees reflect current designation only, so for a cycle's principal committee read candidate_pcc_id from openfec_lookup_elections
  • Itemized Schedule A/B/E page with an opaque next_cursor, valid only for an otherwise-identical call; other tools page by number, and legal search by offset

Agent-friendly output:

  • Effective-query echo: every tool response carries search_criteria with the post-default filters, and an empty result carries a notice on how to broaden it
  • Response budget of 100,000 bytes per surface: high-volume tools cap rows per page and report truncated, shown, and cap when a page falls below the requested per_page (page-based tools also echo the applied size in pagination.per_page); legal search holds back whole results and reports nextFromHit, and a large legal document pages its arrays by offset; a single-committee query lifts that committee into one top-level committee field instead of repeating it per row
  • Typed contracts: multi-mode tools echo the resolved mode and reject a filter the mode can't apply (itemized_only_filters_in_aggregate_mode, inputs_not_applicable_to_mode) instead of dropping it; every failure carries a typed reason and recovery text, and estimated totals are flagged count_is_approximate

Getting started

Public Hosted Instance

A public instance is available at https://openfec.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

{
  "mcpServers": {
    "openfec-mcp-server": {
      "type": "streamable-http",
      "url": "https://openfec.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file.

{
  "mcpServers": {
    "openfec-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/openfec-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "FEC_API_KEY": "your-api-key"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "openfec-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/openfec-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "FEC_API_KEY": "your-api-key"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "openfec-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "-e", "FEC_API_KEY=your-api-key", "ghcr.io/cyanheads/openfec-mcp-server:latest"]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 FEC_API_KEY=your-key bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • Optional: a free OpenFEC API key raises the rate limit from 30 to 1,000 requests per hour over the default DEMO_KEY.

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/openfec-mcp-server.git
  1. Navigate into the directory:
cd openfec-mcp-server
  1. Install dependencies:
bun install
  1. Configure environment:
cp .env.example .env
# edit .env and set FEC_API_KEY (optional)

Configuration

VariableDescriptionDefault
FEC_API_KEYOpenFEC API key from api.data.gov. DEMO_KEY allows 30 req/hr; your own key allows 1,000.DEMO_KEY
FEC_BASE_URLOpenFEC API base URL.https://api.open.fec.gov/v1
FEC_MAX_RETRIESRetry attempts for failed API requests.3
FEC_REQUEST_TIMEOUTPer-request timeout, in ms.30000
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto. Overrides the stateless mode the server declares.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the full list of optional overrides.

Running the server

Local development

  • Build and run:

    bun run rebuild
    bun run start:stdio   # or start:http
    
  • Run checks and tests:

    bun run devcheck      # Lint, format, typecheck, security audit
    bun run test          # Vitest test suite
    bun run lint:mcp      # Validate MCP definitions against spec
    

Docker

docker build -t openfec-mcp-server .
docker run --rm -e FEC_API_KEY=your-key -p 3010:3010 openfec-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/openfec-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools/resources/prompts and inits the OpenFEC service.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts), with shared validators and formatters in definitions/utils/.
src/mcp-server/resourcesResource definitions (*.resource.ts). Candidate, committee, and three election-race templates.
src/mcp-server/promptsPrompt definitions (*.prompt.ts). Money trail and campaign analysis.
src/services/openfecOpenFEC API client and domain types.
tests/Unit and integration tests, mirroring the src/ structure.
scripts/Build, clean, devcheck, tree, changelog, and lint scripts.
docs/Design notes and the OpenFEC OpenAPI spec.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools and resources in the barrels at src/mcp-server/*/definitions/index.ts
  • Wrap the OpenFEC API: validate raw → normalize to domain type → return the output schema; never fabricate fields the upstream response omitted

Contributing

Issues are welcome. Run checks and tests before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

Configuration

FEC_API_KEY

OpenFEC API key — optional (falls back to DEMO_KEY: 30 req/hr). Own key: 1000 req/hr. Free signup at api.data.gov.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Categories
Data & Analytics
Registryactive
Package@cyanheads/openfec-mcp-server
TransportSTDIO, HTTP
UpdatedJun 8, 2026
View on GitHub

More from cyanheads

  • Openfoodfacts Mcp Server1
  • Openlibrary Mcp Server1
  • Openstates Mcp Server1
  • Orcid Mcp Server1
  • Reliefweb Mcp Server1
  • Smithsonian Mcp Server1
  • Wikidata Mcp Server1
  • Wsdot Mcp Server1
  • Noaa Cdo Mcp Server2
  • Nominatim Mcp Server2
  • Openstreetmap Mcp Server2
  • Arxiv Mcp Server1
  • Gbif Biodiversity Mcp Server1
  • Gbif Mcp Server1
  • Osv Advisory Mcp Server1
  • Pentest Mcp Server1
  • Socrata Mcp Server1
  • Who Gho Mcp Server1
  • Aviation Weather Mcp Server
  • Cyanheads Mcp Server
  • Ensembl Mcp Server
  • Eur Lex Mcp Server
  • Exchange Rates Mcp Server
  • Fema Mcp Server

Related Data & Analytics MCP Servers

View all →
cyanheads avatar
Socrata Mcp Server

cyanheads/socrata-mcp-server

Search and query government open-data portals (Socrata SODA API).
1
drivenrajat avatar
F1 Data Server

drivenrajat/f1

Access Formula 1 race data, telemetry, lap times, standings, and analytics powered by FastF1
1
estaite-solutions avatar
Estaite Mcp

estaite-solutions/estaite-mcp

Current US rental market data for AI agents: 1,500+ submarkets, monthly rent + vacancy + trends.
1
euleriantechnologies avatar
Eulerian Marketing Platform Mcp

euleriantechnologies/eulerian-marketing-platform-mcp

Provides access to the Eulerian Marketing Platform: analytics, attribution & data activation.
1
expenselm avatar
Expenselm Mcp Server

expenselm/expenselm-mcp-server

An MCP server that provides access to your expense data on ExpenseLM.
1
fetter-io avatar
Fetter MCP

fetter-io/fetter-mcp

Real-time Python package and vulnerability data for AI coding agents.
1