statefinance-mcp
Enables querying state-level campaign finance data, including donors, expenditures, committees, and candidates, from multiple state disclosure systems via a unified MCP interface.
README
statefinance-mcp
State-level campaign finance, as an MCP server. Donors, expenditures, committees, and candidates from state disclosure systems — the data the FEC doesn't cover and that no MCP server currently exposes — through one common schema. Oklahoma first; more states via adapters.
Why this exists
Federal campaign finance (FEC) is wrapped to death. State campaign finance — where most money-in-politics questions actually live — is fragmented across ~46 portals with no unified API, and the one historical normalizer (FollowTheMoney) is winding down. The hard, valuable part isn't the MCP plumbing; it's the normalization layer that maps a messy state portal into a clean, sourced schema. That's the product.
Quick start (offline, no keys)
The v1 demo runs on a committed synthetic Oklahoma extract (see the data note below), so a fresh checkout works with no network and no keys.
uv sync
uv run statefinance ingest ok # load the OK 2024 sample into the store
uv run statefinance top-donors "Tallchief for Oklahoma"
# Redbud Ranch LLC: $10,000
# Acme Energy, LLC: $5,000 (spelling variants combined)
# Patterson, John Q.: $1,500
uv run statefinance summary cycle 2024
# raised $30,650, spent $76,200, top recipient: Tallchief for Oklahoma
uv run statefinance donor-history "Patterson, John Q." # all of a donor's giving
uv run statefinance serve # run the MCP server (stdio)
Use it as an MCP server
{
"mcpServers": {
"statefinance": {
"command": "uv",
"args": ["run", "statefinance", "serve"],
"cwd": "/path/to/statefinance-mcp"
}
}
}
Tools
| Tool | What it does |
|---|---|
search_contributions |
Filter contributions by donor, recipient, candidate, amount/date range, state, cycle. Returns matches + full-match count and total. |
search_expenditures |
Filter expenditures by committee, payee, purpose, date, state, cycle. |
get_committee |
A committee plus its contribution and expenditure totals. |
get_candidate |
A candidate (by id or name), their committees, and money raised/spent. |
top_donors |
Top donors to a committee, grouped by a light-normalized donor key. |
donor_history |
Every contribution by a donor, with a per-recipient breakdown. |
summary |
Aggregate totals for a committee, candidate, or cycle. |
Every result carries each record's source_url + as_of — this is accountability
data, so a wrong number is worse than no number.
Design: one schema, many adapters
state portal ─▶ StateAdapter.fetch() ─▶ raw snapshot (data/raw/<state>/)
StateAdapter.normalize() ─▶ common schema ─▶ DuckDB store
│
MCP server (reads the store only)
- Ingestion and serving are decoupled. Ingest populates a local normalized store; the MCP server only reads it, so tool calls are fast and portals stay un-hammered.
- Adding a state is implement
fetch+normalize, ship a fixture, register — core, store, and tools untouched. See docs/adding-a-state.md (enforced by a test that adds a second state through the adapter contract alone). - Donor normalization is light and honest (trim/case/whitespace, org suffixes). Fuzzy entity resolution is explicitly deferred — see docs/donor-normalization.md.
⚠️ Data note
The committed Oklahoma sample is synthetic (fictional committees, candidates,
donors — clearly labeled), so the offline demo never asserts fabricated facts
about real people. Acquisition of real Oklahoma data and the ToS posture are
documented in docs/sources/oklahoma.md; live
ingestion is intentionally gated — enable ingest ok --live only after
confirming the portal's current export method and terms of service.
Development
uv run pytest # offline suite (committed synthetic extract)
uv run ruff check . # lint
If uv run statefinance ever reports No module named 'statefinance' (a known
editable-install quirk on some setups, e.g. paths with spaces), run with
PYTHONPATH=src uv run statefinance ....
See SPEC.md and BUILD_PLAN.md for the design.
License
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。