us-lobbying-mcp-server
Optional DuckDB-backed local SQL workspace. When enabled, the server stages acquired lobbying filings and selected records into queryable canvas tables, exposing companion tools to run read-only SQL queries and page through complete result sets, inspect staged table schemas, row counts, lifecycle and provenance, and drop staged tables.
Public Hosted Server: https://us-lobbying.caseyjhand.com/mcp
Overview
US federal lobbying disclosures from the Senate's LDA API and foreign-agent registrations from the Department of Justice's FARA records. Search filings, resolve client relationships, inspect lobbyist and contribution disclosures, and analyze reported amounts with optional local SQL. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above; no API key required.
Tools
Tool | Description |
| Search registrations and activity reports, retaining original and amended filings |
| Resolve client relationships, then analyze explicitly selected IDs and years |
| Analyze reported amounts on filings mentioning an issue, or on a registrant's filings across every issue |
| Find lobbyists and retrieve filing-specific activity and covered-position evidence |
| Retrieve LD-203 reports with complete contribution lists, PAC disclosures, and certifications |
| Search FARA registrants, foreign principals, or short-form registrants, or retrieve a registration's chosen live detail collection |
| Look up official codes, identifiers, methodology, and source limitations |
| Materialize a read-only SQL result and page its complete rows |
| Inspect staged table schemas, counts, lifecycle, and provenance |
| Remove a staged table; opt-in |
Related MCP server: civic-awareness-mcp
Capability reference
uslobbying_search_filings tool
Supply at least one upstream filter:
filing_uuid,filing_year(1999–current UTC year), client/registrant/lobbyist ID or name,filing_type,filing_period,specific_issues,posted_after/posted_before,amount_min/amount_max,client_state,client_country,foreign_entity_name, orforeign_entity_country. Dates are realYYYY-MM-DDcalendar dates; amounts are exact decimal USD strings with at most two fractional digits and use native filing-filter semantics. Text is trimmed and blanks omitted. State and country codes are uppercased and checked against LDA's two-letter codes (uslobbying_list_referencetopicsstatesandcountries, LDA entries only; FARA country labels are not valid filter values), so an unknown code failsinvalid_filterbefore any request. Filters combine conjunctively; optionalissue_codeapplies locally and cannot narrow upstream requests.Pass a
filing_uuidfrom lobbyist evidence or analytical selections to retrieve the complete filing, including nested source fields and document links.Returns whole
filingswithamendment_policy: "all_versions", separate nullable USD decimal-stringincome/expenses, document links, and nested disclosures. Activitydescriptionandlobbyistsare omitted unlessincludenamesactivity_descriptions/activity_lobbyists;filing_uuidreturns both.page_sizedefaults to 10 (cap 25). Shared delivery rules appear under Features.
uslobbying_get_client_profile tool
mode: "resolve"(default) requiresclient_name;mode: "profile"requires explicitclient_idsandyears(1999–current UTC year). Pass each candidate'sid, not its registrant-assignedclient_id. IDs identify relationships with registrants; candidates are never automatically merged into a corporate identity.Profile returns
status: "collecting"until acquisition completes, then typedannual_ledgers,selections,firms,clients,issue_codes,targeted_entities,selected_filings,activities, andraw_filingsacross output windows ofpage_sizerows (default 25, cap 250; resolve mode caps at 25).row_set_totals/row_set_offsetsdescribe each list's delivery. Activitydescriptionandlobbyistsappear in those rows only whenincludenamesactivity_descriptions/activity_lobbyists; totals and SQL datasets are unaffected.Optional nonempty, unique
row_setsselects which of those lists to deliver inline. Omission delivers every set;raw_filingsalways means every acquired version, including selected versions. Selection never limits acquisition, analysis, complete-set totals or SQL staging. Omitted sets remain available by restarting the same scope with another selection or querying staged tables. On a continuation, omitrow_setsor list the first call's sets in any order; any other selection failscursor_invalid, including listing every set after a first call that omittedrow_sets. Offsets andoutput_completefollow the selected stream; notices remain deliverable for every selection.Empty client/year partitions produce factual notices naming the selected ID and year; zero rows do not establish whether an ID is valid. Notices share bounded delivery windows and count in
total_recordsand delivery counters, whilerow_set_totalscounts domain rows only. Follow every cursor.With
CANVAS_PROVIDER_TYPE=duckdb, the first completed-acquisition delivery window returns adatasetcontaining all acquired filings, selected filings, and selected activities. Its exact replay retains the dataset; later windows retaincanvas_id,describe_tool,query_tooland table guidance without repeating schemas. Optional inputcanvas_idreuses an existing canvas; an expired token failscanvas_not_found.
uslobbying_get_issue_spending tool
Requires explicit
yearsand eitherissue_codeorregistrant_id; optionalclient_id/registrant_idnarrow upstream acquisition. All versions are acquired before latest-period selection and local issue filtering; broad scans can take hours.With
registrant_idand noissue_code, ledgers cover every selected filing of that registrant across all issues, broken out per client relationship inclients, with a notice saying so;client_idalone is rejected.Returns the same collecting/final analytical lists, optional
row_setsselection,includeselector,page_size(default 25, cap 250) and dataset routing as profile mode, withattribution_basis: "whole_filing_mentions_issue". Whole-filing amounts overlap across issue buckets and are not allocated issue spending.
uslobbying_search_lobbyists tool
mode: "search"(default) requiresname,registrant_name, orregistrant_id;mode: "activity"requireslobbyist_idandfiling_year, with optionalclient_idandcovered_positions_only.Returns identity
lobbyistsor filing-scopedevidence, including the matching participant, matched activity, original indexes, and filing UUID/document. Evidence activities omitdescriptionandlobbyistsunless activity mode'sincludenamesactivity_descriptions/activity_lobbyists. Use the filing UUID withuslobbying_search_filingsfor the complete filing. Covered positions are disclosed text, not verified current employment.page_sizedefaults to 25: identity search caps at 25, activity evidence at 1,000.
uslobbying_get_contributions tool
Requires
filing_year(2008–current UTC year); optionalfiling_period(mid_year/year_end), registrant/lobbyist selectors,contribution_type,contributor,payee,honoree, inclusivecontribution_date_after/contribution_date_before, and inclusive local itemamount_min/amount_maxdecimal USD strings. Unknown item amounts cannot satisfy a bound. Contribution amount predicates run locally because native amount filters do not reliably select matching reports.Returns full parent
reports, completecontribution_items, andmatched_item_indexeswhere every child predicate matched the same item. Originals and amendments remain separate;report_count_in_batchanditem_count_in_batchare not donation totals.page_sizecounts whole reports, each with its complete contribution list: default 10, cap 25.
uslobbying_search_foreign_agents tool
mode: "search"(default) searches daily XML snapshots; chooseentity: "registrants"(default),"foreign_principals", or"short_forms"(the individuals filed under a registration, matched by first and last name; a hit is a name match, not an identity across registrations or with LDA lobbyists), optional literal token-ANDname_contains, and exactcountrylabels for principals only.statusisactive(default),terminated, orall; principal and short-form status is independent of registrant status (registrant_status).mode: "detail"requires a digit-stringregistration_numberand retrieves only the chosen live collection:foreign_principals(default),short_forms, ordocuments. Terminated principals and short forms carrytermination_date. Documents requirestatus: "all"(the effective default for documents); an empty collection does not prove a registration never existed.page_sizeis the number of whole records per window over pinned results (default 25, cap 1,000); follownext_cursor. Responses retain source fields, official links, and snapshot retrieval metadata where applicable.
uslobbying_list_reference tool
Start with
topic:issue_codes,filing_types,government_entities,contribution_types,countries,states,identifiers,methodology, orfara_rules; optionalfilterapplies literal case-insensitive token-AND matching.Returns attributed
entries,total_entries, andmatched_entriesin fixed windows of 125 entries (no count input); follownext_cursorfor the rest. LDA constants are cached for 24 hours. Countries retain separately attributed LDA codes and FARA labels, without a guessed ISO mapping; only the LDA codes are valid filing filters.
uslobbying_dataframe_query tool
Requires
canvas_idand either one read-only SELECT insql(optional freshregister_as) or a storedresult_tablewith optionaloffset.row_limitdefaults to 25; larger positive integers clamp to 100, then any lower provider ceiling, and the clamp is disclosed indelivery_limits. Each call returnsmin(row_limit, remaining)whole rows.New SQL materializes the complete result. Continue with
result_table/next_offset;row_countis exact androw_order: "sql_result"means rows follow the materialized result order set by a top-levelORDER BY(anORDER BYonly inside a CTE or subquery does not guarantee it). Anoffsetequal torow_countreturns no rows; a larger one failsinvalid_filter. Writes, multiple statements, external reads, and prohibited plan operators fail with typed reasons.Missing/expired tables fail
missing_table; SQL is unavailable without an enabled canvas.
uslobbying_dataframe_describe tool
Requires a returned
canvas_id; optionaltable_nameselects one table. Inspect authoritative columns and types before SQL.Returns exact row counts, grain, creation/expiry, source tool, acquisition provenance, and materializing SQL where applicable. It does not enumerate other canvases.
uslobbying_dataframe_drop tool
Requires
canvas_idandtable_name; idempotent, returningdropped: falsefor an absent table.Off unless
USLOBBYING_DATAFRAME_DROP_ENABLED=true; when disabled it is absent fromtools/list. This deletes local staged data only.
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
LDA/FARA-specific:
Shared source pacing: anonymous LDA access uses 15 requests/minute per originating IP; an optional registered token uses 120/minute. FARA requests start at least 4.1 seconds apart; separate processes must coordinate shared upstream budgets.
Analytical selection uses the latest posting within each registrant/client/year/period, quarterly from 2008 and semiannual through 2007; a relationship-year that filed both grains keeps its statutory grain and excludes the other as
off_cycle_period. Equal-latest candidates are marked ambiguous and excluded from sums; this is an analytical rule, not a verified legal amendment lineage.Income and expenses remain separate, missing amounts remain unknown, and expense methods retain separate ledgers. Disclosure records establish neither wrongdoing nor policy outcomes or influence.
FARA search uses complete official daily XML snapshots cached for 24 hours; chosen registration details use the live API. Name search cost is linear in the query. LDA pagination is live and does not promise an immutable historical snapshot.
Agent-friendly output:
Explicit completion: follow
next_cursoruntilcoverage.complete, then continue final windows untiloutput_complete. Filters may be omitted or repeated unchanged;page_sizecompares after clamping, while workload controls (max_pages, the cursor) do not change scope identity. LDAmax_pagesis the most upstream pages fetched per call (default one for discovery, five for analytics, cap five); upstream LDA pages are always 25 rows.Count-based delivery: every call returns exactly
min(page_size, remaining)whole records or rows, however large each is; nothing measures bytes, so output size is the caller'spage_size/row_limit. A page is short only at the end of the result or while acquisition is still collecting. Defaults and caps:Tool and mode
Unit
Default
Cap
uslobbying_search_filings,uslobbying_get_contributionsfiling, LD-203 report
10
25
uslobbying_search_lobbyistssearch,uslobbying_get_client_profileresolveidentity, candidate
25
25
uslobbying_search_lobbyistsactivityevidence row
25
1,000
uslobbying_get_client_profileprofile,uslobbying_get_issue_spendinganalytical row
25
250
uslobbying_search_foreign_agentsFARA record
25
1,000
uslobbying_list_referenceentry
fixed 125-entry window
—
uslobbying_dataframe_querySQL row (
row_limit)25
100, then any lower provider ceiling
Delivery controls: LDA, FARA and SQL responses expose
delivery_limitswith{requested,effective}pairs for controls clamped on this call; an empty map means none.USLOBBYING_CLAMP_LIMITS=falserejects over-cap values withinvalid_filterinstead. Exact cursor replay retains the original response and its disclosure. Zero, negative, fractional and nonfinite controls remain invalid.Activity text selector:
include(activity_descriptions,activity_lobbyists) restores the activitydescriptionandlobbyiststhat LDA tools omit by default. Totals, analysis and SQL datasets always cover the complete records.Source counts:
coverage.upstream_count, when known for every partition, sums each partition's latest observed envelope count. It can include duplicate source rows and differs fromunique_records; live pagination is not a frozen snapshot.Recoverable progress: cursors and retained scan data expire 24 hours after acquisition starts. The latest cursor replays its response; older or expired ones fail
cursor_invalid. In-memory restarts lose progress, filesystem storage keeps it until expiry, and the default 128 MiB acquisition budget favors narrow year/client/registrant scopes.Matching response surfaces:
structuredContentand the JSON text incontent[]carry the same fields, plus clickable official source links. Analyticaldatasetresponses name the staged tables and route to the describe/query tools.Published agent skill:
us-lobbying-guide(rootskills/, served to MCP clients asskill://us-lobbying-guide/SKILL.mdand shipped in the npm package, Docker image and.mcpbbundle) carries identifier sources, accounting gates and multi-step workflows.
Getting started
Connect to the hosted instance, no install:
claude mcp add --transport http us-lobbying-mcp-server https://us-lobbying.caseyjhand.com/mcpOr run it locally. Add the following to your MCP client configuration file.
{
"mcpServers": {
"us-lobbying-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/us-lobbying-mcp-server@latest"],
"env": { "MCP_TRANSPORT_TYPE": "stdio" }
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"us-lobbying-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/us-lobbying-mcp-server@latest"],
"env": { "MCP_TRANSPORT_TYPE": "stdio" }
}
}
}Or with Docker:
{
"mcpServers": {
"us-lobbying-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/us-lobbying-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.4 or higher (or Node.js v24+).
Anonymous access needs no account or key. Optional registered LDA tokens can be configured as
USLOBBYING_LDA_API_KEY.
Installation
Clone the repository:
git clone https://github.com/cyanheads/us-lobbying-mcp-server.gitNavigate into the directory:
cd us-lobbying-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env for optional overridesConfiguration
Variable | Description | Default |
| Optional registered LDA token for the authenticated request allowance. | — |
| Expose |
|
| Clamp an over-cap |
|
|
|
|
| Acquisition checkpoint storage; |
|
| Explicit writable directory when selecting filesystem storage. Checkpoints expire 24 hours after acquisition starts. | — |
| Transport: |
|
| HTTP bind address; Docker defaults to |
|
| HTTP server port. |
|
| MCP endpoint path. |
|
| Authentication: |
|
| Log level ( |
|
| Log failed tool arguments/results, redacted by key name and capped at |
|
| Enable OpenTelemetry instrumentation. |
|
| OTLP base URL for traces and metrics. | — |
| Opt-in OTLP log export endpoint. | — |
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run the production version:
bun run rebuild bun run start:http # or start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks bun run test # Runs test suite
Docker
docker build -t us-lobbying-mcp-server .
docker run -p 3010:3010 us-lobbying-mcp-serverThe image defaults to HTTP on port 3010. Enable SQL with -e CANVAS_PROVIDER_TYPE=duckdb; use one server process per storage/upstream budget because acquisition locks and pacing are process-local.
Project structure
Directory | Purpose |
|
|
| Server environment validation and shared tool deadlines. |
| Validated disclosure records, provenance, delivery contracts, and lossless formatting. |
| LDA, FARA, reference, and dataframe tools. |
| Fixed-host LDA client with shared pacing and validated pagination. |
| Daily XML snapshots and live per-registration detail collections. |
| Resumable acquisition, replay, storage admission, and count-bounded delivery windows. |
| Quarterly and semiannual version selection, exact accounting, and filing-specific evidence. |
| Complete analytical table staging and stable SQL result delivery. |
| Published agent skill served over MCP. |
| Build, devcheck, packaging, and release tooling. |
| Unit and integration tests mirroring the source structure. |
Development guide
See CLAUDE.md and AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister tools directly in the
createApp()array insrc/index.tsValidate complete upstream records, preserve sparse and unknown fields, and keep income, expenses, relationship IDs, and acquisition/output completion distinct
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Federal and state lobbying data: who lobbies for whom, spending, bills, agencies. From LDA filings.
Access U.S. congressional data (bills, votes, members, committees) via MCP.
US Senate Lobbying Disclosure (LDA) MCP.
US political money data: campaign finance, lobbying, dark money, contracts and SEC filings.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying U.S. legislative data from Congress.gov API using MCP resources for direct lookups and tools for searching and retrieving related data.8MIT
- AlicenseAqualityDmaintenanceProvides tools to search and retrieve US federal and state legislative data, including bills, votes, campaign contributions, and legislator information, with provenance tracking.81MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that searches official FEC PDF rulebooks for compliance and contribution limits, and provides real-time lookups against the OpenFEC API for candidates, committees, filings, and financial data.-
- AlicenseNot gradedqualityCmaintenanceEnables querying US Senate lobbying disclosure data via natural language or direct tool calls, as part of the Pipeworx MCP gateway.70 npmMIT