PM

psalzman/mcp-openfec

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

2 stars 4 forks 品質 63 トレンド 8BSD-3-Clause

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

概要

A Model Context Protocol (MCP) server that provides access to Federal Election Commission (FEC) campaign finance data through the OpenFEC API. - 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 - Node.js (v16 or higher) - An OpenFEC API Key (Get one here) 3. Create a .env file in the root directory and add your OpenFEC API key: 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: Important configuration notes: 1. Replace /absolute/path/to/mcp-openfec with the actual path where you cloned the repository 2.

README

以下は原文 README の抜粋です。原文を見る。

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

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

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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