Skip to main content
Glama
MCP OpenFEC Server

MCP OpenFEC Server

by psalzman

MCP OpenFEC Server

A Model Context Protocol (MCP) server that provides access to Federal Election Commission (FEC) campaign finance data through the OpenFEC API.

Features

  • Search for candidates by name, state, or office

  • Get detailed candidate information and financial data

  • Access committee information

  • View individual contributions

  • Track independent expenditures

  • Access FEC filings and audit cases

  • Download bulk data

Related MCP server: FireHydrant MCP Server

Requirements

Installation

  1. Clone the repository:

git clone https://github.com/psalzman/mcp-openfec
cd mcp-openfec
  1. Install dependencies:

npm install
  1. Create a .env file in the root directory and add your OpenFEC API key:

OPENFEC_API_KEY=your_api_key_here
  1. Build the server:

npm run build

Configuration

To use this MCP server with Claude Desktop:

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add the following configuration to the file:

{
  "mcpServers": {
    "openfec": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-openfec/build/server.js"],
      "env": {
        "OPENFEC_API_KEY": "your_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Important configuration notes:

  1. Replace /absolute/path/to/mcp-openfec with the actual path where you cloned the repository

  2. Use absolute paths, not relative paths

  3. Set disabled to false to enable the server

  4. Keep autoApprove as an empty array for security

  5. Add your OpenFEC API key in the env section

Available Tools

  1. get_candidate: Get detailed information about a candidate

  2. get_candidate_financials: Get financial data for a candidate

  3. search_candidates: Search for candidates by name or other criteria

  4. get_committee: Get detailed information about a committee

  5. get_candidate_contributions: Get individual contributions for a candidate

  6. get_filings: Retrieve official FEC filings

  7. get_independent_expenditures: Get independent expenditures

  8. get_electioneering: Get electioneering communications

  9. get_party_coordinated_expenditures: Get party coordinated expenditures

  10. get_communication_costs: Get corporate/union communication costs

  11. get_audit_cases: Get FEC audit cases and findings

  12. get_bulk_downloads: Get links to bulk data downloads

Rate Limiting

The server implements rate limiting to comply with OpenFEC API guidelines:

  • 1000 requests per hour

  • Requests exceeding this limit will receive an error response

Development

To modify the server:

  1. Make changes to the TypeScript files in the src directory

  2. Rebuild the server:

npm run build

License

This project is licensed under the BSD 3-Clause License - a permissive open source license that ensures maximum freedom for users while maintaining attribution requirements. The license allows you to:

  • Use the code commercially

  • Modify the code

  • Distribute the code

  • Use the code privately

With three main conditions:

  1. You must include the original copyright notice

  2. You must include the license text in distributions

  3. You cannot use the names of contributors to endorse derived products without permission

The BSD 3-Clause License is widely used in academic and commercial settings, offering a good balance between permissiveness and protecting contributors.

Contributing

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin feature/my-new-feature)

  5. Create a new Pull Request

Copyright (c) 2025, Phillip Salzman & Foundry Peak, LLC. All rights reserved. Web: http://foundrypeak.com/

For licensing details, see the LICENSE file.

Available Tools

12 tools
get_audit_casesC

Get FEC audit cases and findings

Inputs: committee_id, audit_id, audit_year, finding_types.

get_bulk_downloadsB

Get links to bulk data downloads

Inputs: data_type (required), election_year.

get_candidateC

Get detailed information about a candidate

Inputs: candidate_id (required), election_year.

get_candidate_contributionsC

Get individual contributions for a candidate

Inputs: candidate_id (required), election_year, sort.

get_candidate_financialsC

Get financial data for a candidate

Inputs: candidate_id (required), election_year (required).

get_committeeC

Get detailed information about a committee

Inputs: committee_id (required).

get_communication_costsC

Get corporate/union communication costs

Inputs: committee_id, candidate_id, min_date, max_date, +3 more.

get_electioneeringC

Get electioneering communications

Inputs: committee_id, candidate_id, min_date, max_date, +3 more.

get_filingsC

Retrieve official FEC filings with filters

Inputs: committee_id, candidate_id, form_type, min_receipt_date, +3 more.

get_independent_expendituresC

Get independent expenditures supporting or opposing candidates

Inputs: candidate_id, committee_id, support_oppose_indicator, min_date, +4 more.

get_party_coordinated_expendituresD

Get party coordinated expenditures

Inputs: committee_id, candidate_id, min_date, max_date, +3 more.

search_candidatesC

Search for candidates by name or other criteria

Inputs: name (required), state, office, election_year.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific FEC data types like candidates, committees, contributions, expenditures, filings, and downloads. There is no overlap in functionality—tools like get_candidate, get_committee, and get_filings serve separate resources, and even related tools like get_candidate_contributions and get_candidate_financials focus on different aspects of candidate data.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, starting with 'get_' or 'search_' followed by a specific noun phrase (e.g., get_candidate, search_candidates, get_audit_cases). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming style.

    Tool Count5/5

    With 12 tools, the server is well-scoped for accessing U.S. Federal Election Commission data, covering key areas like candidates, committees, financials, expenditures, and filings. Each tool serves a distinct data retrieval function, avoiding bloat while providing comprehensive coverage for the domain.

    Completeness4/5

    The tool set offers strong coverage for retrieving FEC data, including candidates, committees, financials, expenditures, filings, and bulk downloads. A minor gap exists in update or management operations (e.g., no create or modify tools), but this is reasonable for a read-only data access server focused on public records, and agents can work effectively with the provided retrieval functions.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers