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.
Metadata
Release files for netfile-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netfile_mcp-0.1.0.tar.gz | 14.7 kB | Without provenance | Details for netfile_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netfile_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for netfile_mcp-0.1.0-py3-none-any.whl |
Total release size: 28.6 kB
Release files / netfile_mcp-0.1.0.tar.gz
| Download URL | netfile_mcp-0.1.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45dfba7265d5251e2751954ad85acd3d6fe42c15ee0b1a6676a5c6600e0d16ff
|
|
BLAKE2b-256 checksum How to use checksums |
580190aa29b278d3ffa12ee52529d0e7669bdf541268318edf598d237b3dac35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / netfile_mcp-0.1.0-py3-none-any.whl
| Download URL | netfile_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88a4761d2e84f1bc7ab30d5ef127fbeacbbcc5f3a742217cbbc774c607b505be
|
|
BLAKE2b-256 checksum How to use checksums |
15d3221e1b3cc21e5d7b082285c04b4cd04058d95a0ab7d348d84bcfd0344d88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for netfile-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.