MCP server for querying California local campaign finance data via the NetFile Connect2 API
Project description
NetFile Campaign Finance MCP Server
An MCP (Model Context Protocol) server that provides access to California local campaign finance data via the NetFile Connect2 API. No authentication required — all data is public.
Covers ~220 agencies across California, including cities, counties, and special districts that use NetFile for campaign finance e-filing.
Installation
Claude Desktop / Claude Chat
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"netfile": {
"command": "uvx",
"args": ["netfile-mcp"]
}
}
}
Or install from source:
{
"mcpServers": {
"netfile": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp/netfile", "netfile-mcp"]
}
}
}
Claude Code
Add a .mcp.json to your project root:
{
"mcpServers": {
"netfile": {
"command": "uvx",
"args": ["netfile-mcp"]
}
}
}
pip install
pip install netfile-mcp
Available Tools
search_contributions
Search campaign finance contributions for any NetFile agency.
Search contributions in Richmond CA from 2024 onward
Parameters:
city— City or agency name (e.g. "Richmond", "San Francisco")agency_id— NetFile agency ID (alternative to city name)date_start/date_end— Date range filter (YYYY-MM-DD)amount_min/amount_max— Amount range filterquery— Free-text search (names, employers, etc.)transaction_type— FPPC type code (0=monetary, 1=non-monetary, etc.)include_expenditures— Also fetch expenditure recordslimit— Max results to return (default 100; summary stats always reflect full dataset)
lookup_city
Find a city's NetFile agency ID by name or shortcut code.
Look up San Francisco in NetFile
list_agencies
List all ~220 agencies that use NetFile.
get_committee_info
Get campaign committees registered with an agency (names, FPPC IDs).
list_transaction_types
Reference for FPPC transaction type codes.
Examples
"Who are the top donors to Richmond, CA city council candidates?"
→ Uses search_contributions with city="Richmond", then analyzes by contributor name.
"What California cities use NetFile for campaign finance?"
→ Uses list_agencies to see all available agencies.
"Show me contributions over $1,000 to Oakland committees since 2023"
→ Uses search_contributions with city="Oakland", amount_min=1000, date_start="2023-01-01".
Data Source
All data comes from the NetFile Connect2 public API. NetFile is the e-filing platform used by many California local agencies for campaign finance disclosure under the Political Reform Act (FPPC).
- No authentication required — the API is fully public
- No rate limit keys — built-in 0.5s delay between requests
- Retry logic — handles NetFile's intermittent HTTP 500 errors with exponential backoff
- Deduplication — automatically handles amended filing duplicates
Development
cd mcp/netfile
pip install -e .
pytest tests/ -v
License
MIT
Built by Richmond Common — local government accountability infrastructure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netfile_mcp-0.1.0.tar.gz.
File metadata
- Download URL: netfile_mcp-0.1.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45dfba7265d5251e2751954ad85acd3d6fe42c15ee0b1a6676a5c6600e0d16ff
|
|
| MD5 |
765b7bb3edaf0f3af441cd8b1d5c00e9
|
|
| BLAKE2b-256 |
580190aa29b278d3ffa12ee52529d0e7669bdf541268318edf598d237b3dac35
|
File details
Details for the file netfile_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: netfile_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a4761d2e84f1bc7ab30d5ef127fbeacbbcc5f3a742217cbbc774c607b505be
|
|
| MD5 |
90ef91cb59f5a52de381bfb5c6ff84b2
|
|
| BLAKE2b-256 |
15d3221e1b3cc21e5d7b082285c04b4cd04058d95a0ab7d348d84bcfd0344d88
|