
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
- Node.js (v16 or higher)
- An OpenFEC API Key (Get one here)
Installation
- Clone the repository:
git clone https://github.com/psalzman/mcp-openfec
cd mcp-openfec
- Install dependencies:
npm install
- Create a
.envfile in the root directory and add your OpenFEC API key:
OPENFEC_API_KEY=your_api_key_here
- Build the server:
npm run build
Configuration
To use this MCP server with Claude Desktop:
-
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
- macOS:
-
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:
- Replace
/absolute/path/to/mcp-openfecwith the actual path where you cloned the repository - Use absolute paths, not relative paths
- Set
disabledtofalseto enable the server - Keep
autoApproveas an empty array for security - Add your OpenFEC API key in the
envsection
Available Tools
get_candidate: Get detailed information about a candidateget_candidate_financials: Get financial data for a candidatesearch_candidates: Search for candidates by name or other criteriaget_committee: Get detailed information about a committeeget_candidate_contributions: Get individual contributions for a candidateget_filings: Retrieve official FEC filingsget_independent_expenditures: Get independent expendituresget_electioneering: Get electioneering communicationsget_party_coordinated_expenditures: Get party coordinated expendituresget_communication_costs: Get corporate/union communication costsget_audit_cases: Get FEC audit cases and findingsget_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:
- Make changes to the TypeScript files in the
srcdirectory - Rebuild the server:
npm run build
License
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 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": []
}
}
}