AIDEVELOPER TOOLS

Insider Political Alpha MCP Server

Insider political trading signal detection — this MCP server applies six institution-grade statistical algorithms to congressional stock disclosures, SEC insider filings, campaign finance records, and federal contract data, and returns scored findings to any MCP-compatible AI client in real time. Built for quantitative researchers, compliance teams, and political intelligence analysts who need more than a raw data feed.

Try on Apify Store
$0.08per event
0
Users (30d)
0
Runs (30d)
90
Actively maintained
Maintenance Pulse
$0.08
Per event

Maintenance Pulse

90/100
Last Build
Today
Last Version
1d ago
Builds (30d)
8
Issue Response
N/A

Cost Estimate

How many results do you need?

detect-informed-tradings
Estimated cost:$8.00

Pricing

Pay Per Event model. You only pay for what you use.

EventDescriptionPrice
detect-informed-tradingBivariate Hawkes process cross-excitation$0.08
compute-abnormal-returnsModified Fama-French with political factor$0.06
map-information-flowTransfer entropy directed graph$0.06
analyze-donation-tradeCross-recurrence quantification analysis$0.08
detect-contract-anticipationDifference-in-differences on pre-award CARs$0.08
identify-information-brokersBetweenness centrality in legislator-company network$0.06
profile-legislator-alphaComposite informed trading signal per legislator$0.10
generate-alpha-signal-reportFull informed trading signal detection report$0.15

Example: 100 events = $8.00 · 1,000 events = $80.00

Connect to your AI agent

Add this MCP server to Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.

MCP Endpoint
https://ryanclinton--insider-political-alpha-mcp.apify.actor/mcp
Claude Desktop Config
{
  "mcpServers": {
    "insider-political-alpha-mcp": {
      "url": "https://ryanclinton--insider-political-alpha-mcp.apify.actor/mcp"
    }
  }
}

Documentation

Insider political trading signal detection — this MCP server applies six institution-grade statistical algorithms to congressional stock disclosures, SEC insider filings, campaign finance records, and federal contract data, and returns scored findings to any MCP-compatible AI client in real time. Built for quantitative researchers, compliance teams, and political intelligence analysts who need more than a raw data feed.

The server runs in Apify Standby mode and exposes eight tools over the MCP protocol at the /mcp endpoint. Each tool call dispatches 3-10 Apify data actors in parallel, assembles the results, and runs one or more detection algorithms — bivariate Hawkes process, Fama-French event study, Ziv-Merhav transfer entropy, Cross-Recurrence Quantification Analysis, Difference-in-Differences, or betweenness centrality — before returning a structured JSON response with a composite 0-100 alpha score, risk level, and plain-English findings. No Bloomberg subscription, no Capitol Trades account, no manual data joining required.

What data can you extract?

Data PointSourceExample
📊 Temporal coincidence scoreBivariate Hawkes process74 / 100 (excitation fraction 0.37)
📈 Cumulative Abnormal Return (CAR)Fama-French + political factor+8.3% over [-5, +30] day window
🔗 Information flow network edgesZiv-Merhav transfer entropy"Energy bills → XOM trades (TE=0.81)"
💸 Donation-trade coordination scoreCross-Recurrence QuantificationDET=0.62, LAM=0.54, score=58/100
🏛️ Contract anticipation DiD estimatorDifference-in-Differencesdelta=+$42,000 excess buying pre-award
🕸️ Information broker betweennessBrandes centrality algorithm0.412 (top 3% of legislator network)
⚠️ Composite alpha scoreAll six algorithms combined81 / 100, risk level: CRITICAL
📋 Flagged trade-event pairsHawkes excitation kernellag=3.0 days, excitation contrib=0.847
📉 Political beta t-statisticOLS regression, political factort=2.84 (significant, p < 0.05)
🏢 Top information brokersBipartite projection + BFSlegislator name, score, connected companies
📜 Raw congressional tradesCongress Stock Trackermember, ticker, type, amount, date
💰 Campaign donation recordsFEC Campaign Financecontributor, recipient, amount, cycle

Why use Insider Political Alpha MCP Server?

Manually cross-referencing congressional stock disclosures against Federal Register rulemaking activity, FEC donation timelines, and USAspending contract awards takes weeks per legislator. Free tools like CapitolTrades show raw transactions with no statistical testing. Paid platforms like Quiver Quant cost $50-200/month and offer no custom algorithm access or programmatic API.

This MCP server automates the entire pipeline: data collection across 13 sources runs in parallel, six detection algorithms execute on the assembled dataset, and results arrive as structured JSON with scored findings and human-readable alerts — all via a single tool call from Claude, Cursor, or any MCP-compatible client.

  • Scheduling — run periodic scans daily or weekly to track legislative sessions and earnings windows
  • API access — trigger analyses from Python, JavaScript, or any HTTP client using the Apify API
  • Parallel data collection — up to 10 actors run simultaneously per tool call, reducing latency
  • Monitoring — get Slack or email alerts when runs fail or produce CRITICAL-level signals
  • Integrations — push flagged signals to Zapier, Make, Google Sheets, HubSpot, or webhooks

Features

  • Bivariate Hawkes process with MLE fitting — 200-iteration gradient descent estimates cross-excitation alpha_12 and decay beta_12 between political event and trade sequences; reports excitation fraction, branching ratio, and a stationarity check
  • Fama-French event study with political factor — extends a three-factor model (market, SMB, HML) with a political indicator variable; computes Cumulative Abnormal Return over a [-5, +30] day window; t-statistic above 2.0 triggers a significance flag
  • Ziv-Merhav transfer entropy network — discretizes return series into three-bin symbol sequences using tertile thresholds; parses one series using a dictionary built from the other; builds directed edges weighted by normalized cross-parsing complexity; ranks primary information flow channels
  • Cross-Recurrence Quantification Analysis (CRQA) — phase-space embeds donation and trade amount series with dimension=2 and delay=1; computes cross-recurrence matrix using epsilon at the 10th percentile of distance distribution; outputs DET, LAM, Shannon entropy, and Coordination Score = DET x LAM x (1 - entropy/max_entropy)
  • Difference-in-Differences contract anticipation — partitions legislators into treatment (named committee members) and control groups; measures excess signed trade value in a 60-day pre-award window; includes a parallel trends validation test
  • Betweenness centrality brokerage detection — Brandes BFS algorithm on a projected unipartite legislator graph built from congressional trading and FEC donation bipartite edges; normalizes by (n-1)(n-2)/2; Broker Score multiplies centrality by abnormal return correlation
  • Composite alpha scoring with five risk levels — weighted ensemble across all algorithms (temporal coincidence 30%, information flow 20%, brokerage 20%, donation-trade CRQA 15%, contract anticipation 15%); outputs CRITICAL / HIGH / ELEVATED / MODERATE / LOW
  • Parallel actor orchestrationrunActorsParallel dispatches up to 10 Apify actors concurrently, each with a 120-second independent timeout and 256 MB memory allocation
  • 8 MCP tools registered — each tool charges independently via pay-per-event and includes a spending limit guard before any actor calls are made
  • 13 upstream data sources — Congress Stock Tracker, SEC Insider Trading, FEC Campaign Finance, Federal Register Search, Congress Bill Search, USAspending, SAM.gov, Finnhub, FRED (DTB3, SP500, VIXCLS), EDGAR Filing Search, EDGAR Analyzer, OpenCorporates, Company Deep Research

Use cases for informed trading signal detection

Quantitative research and alpha generation

Quant funds and individual investors tracking congressional alpha can call detect_informed_trading or profile_legislator_alpha as part of a systematic screening workflow. The Hawkes excitation fraction and Fama-French t-statistic provide statistically grounded signals useful for building political factor models. The full parameter output — alpha_12, beta_12, CAR, t-stat — can be piped directly into downstream econometric pipelines in Python or R.

Compliance and ethics monitoring

Legislative ethics offices, law firms, and corporate compliance teams can run generate_alpha_signal_report for broad-spectrum STOCK Act screening. CRITICAL-level composite scores identify situations warranting deeper review. Every response includes a full audit trail of data counts, algorithm parameters, and finding strings for documentation purposes.

Investigative journalism and political research

Journalists and think tanks investigating insider trading allegations can call profile_legislator_alpha to assemble a complete statistical dossier on a named legislator — covering trade timing, abnormal returns, donation patterns, and network position — in a single tool call. Structured JSON output integrates directly into document management and evidence workflows.

Government contract intelligence

Defense contractors, lobbyists, and federal market analysts can call detect_contract_anticipation to test whether committee members with jurisdiction over specific procurement categories showed excess buying behavior in the 60-day window before award announcements. The DiD estimator quantifies the treatment effect with a parallel trends validation.

Political risk and ESG analysis

Asset managers with ESG mandates and political risk desks can use map_information_flow to identify which regulatory agencies or legislative committees generate the highest-entropy information channels into specific sectors. This supports constructing political risk overlays on sector allocations without manual event-study coding.

Academic and policy research

Economists studying market microstructure and political economy can access the raw Hawkes parameters, transfer entropy edge weights, CRQA metrics, and DiD estimators directly in every response for use in downstream statistical analysis. The full intermediate parameter set is always returned, not just summary flags.

How to use the Insider Political Alpha MCP Server

  1. Connect your MCP client — Add https://insider-political-alpha-mcp.apify.actor/mcp to Claude Desktop, Cursor, or any MCP-compatible client configuration. Include your Apify API token as the bearer token in the Authorization header.
  2. Choose a tool — Start with profile_legislator_alpha for a named legislator, generate_alpha_signal_report for broad sector screening, or detect_contract_anticipation for a specific procurement query.
  3. Wait for parallel data collection — The server dispatches multiple actors simultaneously. Most tool calls complete in 2-5 minutes depending on data volume from upstream sources.
  4. Read the scored output — Results arrive as structured JSON with a composite score, risk level, component scores, and plain-English findings. Export or forward to your analysis pipeline as needed.

Input parameters

This MCP server accepts no actor-level input. It runs in Apify Standby mode and receives all inputs through MCP tool calls. The input schema is intentionally empty. Tool inputs are described per-tool in the reference table below.

Tool input reference

ToolParameterTypeRequiredDescription
detect_informed_tradinglegislatorstringNoFilter by legislator name
detect_informed_tradingcompanystringNoCompany name or ticker
detect_informed_tradingquerystringNoGeneral search term
compute_abnormal_returnscompanystringYesCompany name or ticker to analyze
compute_abnormal_returnstickerstringNoStock ticker symbol
compute_abnormal_returnslegislatorstringNoFilter political events by legislator
map_information_flowquerystringNoSearch query to filter events
map_information_flowlegislatorstringNoFocus on specific legislator
analyze_donation_trade_correlationlegislatorstringNoLegislator to analyze
analyze_donation_trade_correlationcompanystringNoCompany or donor to analyze
analyze_donation_trade_correlationquerystringNoGeneral search term
detect_contract_anticipationcontract_querystringYesContract keyword, agency, or contractor name
detect_contract_anticipationcommittee_membersstring[]NoNames of treatment-group committee members
identify_information_brokersquerystringNoFilter by legislator, company, or sector
profile_legislator_alphalegislatorstringYesLegislator name to profile
profile_legislator_alphacompanystringNoFocus analysis on specific company
generate_alpha_signal_reportfocus_sectorstringNoSector focus (e.g. "defense", "healthcare")
generate_alpha_signal_reporttime_periodstringNoTime period description (e.g. "last 90 days")

Tool call examples

Profile a specific legislator (most common use case):

{
  "tool": "profile_legislator_alpha",
  "arguments": {
    "legislator": "Jane Harrington",
    "company": "Raytheon"
  }
}

Broad sector screening for alpha signals:

{
  "tool": "generate_alpha_signal_report",
  "arguments": {
    "focus_sector": "defense",
    "time_period": "last 90 days"
  }
}

Contract anticipation for a specific award:

{
  "tool": "detect_contract_anticipation",
  "arguments": {
    "contract_query": "Lockheed Martin F-35 depot maintenance",
    "committee_members": ["Jane Harrington", "Robert Kellner"]
  }
}

Tool tips

  • Start with generate_alpha_signal_report — the broad sweep surfaces the highest-scoring legislators and companies before you commit to deeper per-legislator analysis
  • Pair profile_legislator_alpha with a company name — specifying both legislator and company focuses the Fama-French event study on the stock most relevant to the investigation
  • Provide committee_members for detect_contract_anticipation — without named committee members, there is no treatment-control split and the DiD estimator will return a degenerate result
  • Use sector keywords for generate_alpha_signal_report — terms like "healthcare", "semiconductor", or "energy" propagate to all 10 upstream actor queries simultaneously
  • Set a spending limit before broad sweepsprofile_legislator_alpha and generate_alpha_signal_report each run 8-10 actors; configure a per-run budget in Apify Console before starting

Output example

{
  "legislator": "Jane Harrington",
  "company": "Raytheon Technologies",
  "compositeAlphaScore": 81,
  "riskLevel": "CRITICAL",
  "componentScores": {
    "temporalCoincidence": 74,
    "abnormalReturnSignal": 88,
    "informationFlow": 62,
    "donationTradeCorrelation": 71,
    "brokerageRank": 0.412
  },
  "findings": [
    "Observation window: 312 days, 18 political events, 9 trades",
    "Cross-excitation alpha_12=0.8231, decay beta_12=0.1142",
    "Excitation fraction: 37.4% of trading is politically excited",
    "ALERT: Very high political excitation — strong informed trading signal",
    "Political beta: 0.000412, t-stat: 2.841",
    "SIGNIFICANT: t-stat 2.84 > 2.0 — abnormal returns around political events",
    "Positive political beta: stocks rise around political events — potential informed buying",
    "Mean CAR over 4 event windows: +8.34%",
    "HIGH COORDINATION: Donation and trading patterns are strongly coupled"
  ],
  "dataCounts": {
    "congressionalTrades": 9,
    "federalRegisterEntries": 11,
    "congressBills": 7,
    "campaignDonations": 22,
    "stockPricePoints": 43,
    "insiderTrades": 8,
    "edgarFilings": 3
  },
  "rawTrades": [
    {
      "member": "Jane Harrington",
      "ticker": "RTX",
      "transactionType": "Purchase",
      "amount": 50000,
      "transactionDate": "2025-09-04"
    }
  ]
}

Output fields

FieldTypeDescription
compositeAlphaScorenumber0-100 weighted ensemble score across all six algorithms
riskLevelstringCRITICAL / HIGH / ELEVATED / MODERATE / LOW
componentScores.temporalCoincidencenumber0-100 score from Hawkes process
componentScores.abnormalReturnSignalnumber0-100 score from Fama-French t-statistic
componentScores.informationFlownumber0-100 score from transfer entropy network
componentScores.donationTradeCorrelationnumber0-100 score from CRQA coordination metric
componentScores.brokerageRanknumber0-1 betweenness centrality (normalized)
findingsstring[]Plain-English findings, alerts, and statistical summaries
hawkesParameters.crossExcitationnumberalpha_12: cross-excitation coefficient
hawkesParameters.crossDecaynumberbeta_12: exponential decay rate
hawkesParameters.excitationFractionnumberFraction of trading attributed to political events
hawkesParameters.logLikelihoodnumberFinal MLE log-likelihood value
flaggedPairs[]object[]Top 20 trade-event pairs sorted by excitation contribution
flaggedPairs[].lagDaysnumberDays between political event and trade
flaggedPairs[].excitationContribnumberHawkes kernel contribution at that lag
cumulativeAbnormalReturnnumberCAR over [-5, +30] window around political events
tStatisticnumbert-statistic for the political factor coefficient
significantbooleanTrue when t-stat exceeds 2.0
eventWindows[]object[]Per-event pre/post/abnormal return breakdown
informationFlow.topChannelsobject[]Highest-TE directed edges in the network
informationFlow.networkDensitynumberEdge density of the transfer entropy graph
crqaMetrics.determinismnumberDET: diagonal line fraction of recurrence matrix
crqaMetrics.laminaritynumberLAM: vertical line fraction of recurrence matrix
crqaMetrics.entropynumberShannon entropy of diagonal line length distribution
coordinationScorenumberDET x LAM x (1 - entropy/maxEntropy)
didEstimatornumberDiD delta: excess signed return for treatment group pre-award
parallelTrendsTestbooleanTrue when pre-award trends are sufficiently parallel
anticipationScorenumber0-100 normalized contract anticipation signal
topBrokers[]object[]Legislators ranked by betweenness centrality score
networkStatsobjectnodes, edges, density, connected components
dataCountsobjectRecord count returned by each upstream actor

How much does it cost to run informed trading signal detection?

Insider Political Alpha MCP Server uses pay-per-event pricing — you pay a fixed fee per tool call. Platform compute costs and upstream actor costs are included.

ToolActors calledApprox. cost per call
detect_informed_trading4~$0.08
compute_abnormal_returns4~$0.08
map_information_flow4~$0.08
analyze_donation_trade_correlation3~$0.06
detect_contract_anticipation4~$0.08
identify_information_brokers3~$0.06
profile_legislator_alpha8~$0.16
generate_alpha_signal_report10~$0.20

You can set a maximum spending limit per run to control costs. The server checks the spending limit before each tool call and returns a clear message if the limit has been reached.

Compare this to Quiver Quant Premium at $50/month or Capitol Trades Pro at $99/month — with this MCP server, most research sessions cost under $5 with no subscription commitment, full parameter access, and programmatic output.

Using the Insider Political Alpha MCP Server via API

Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

# Start the MCP server in Standby mode
run = client.actor("ryanclinton/insider-political-alpha-mcp").start(run_input={})

# Connect your MCP client to the actor Standby URL
# Format: https://insider-political-alpha-mcp.apify.actor/mcp?token=YOUR_API_TOKEN
print(f"MCP server started: run ID {run['id']}")
print("Connect to: https://insider-political-alpha-mcp.apify.actor/mcp")

JavaScript

import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_API_TOKEN" });

// Call a tool directly via HTTP MCP protocol
const response = await fetch(
  "https://insider-political-alpha-mcp.apify.actor/mcp?token=YOUR_API_TOKEN",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "tools/call",
      params: {
        name: "profile_legislator_alpha",
        arguments: {
          legislator: "Jane Harrington",
          company: "Raytheon"
        }
      }
    })
  }
);

const result = await response.json();
const output = JSON.parse(result.result?.content?.[0]?.text || "{}");
console.log(`Alpha score: ${output.compositeAlphaScore} — ${output.riskLevel}`);
console.log(`Findings: ${output.findings?.slice(0, 3).join("; ")}`);

cURL

# Call the MCP server directly via the Standby endpoint
curl -X POST "https://insider-political-alpha-mcp.apify.actor/mcp?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "generate_alpha_signal_report",
      "arguments": {
        "focus_sector": "defense",
        "time_period": "last 90 days"
      }
    }
  }'

# Or start a normal actor run (exits after health-check in non-Standby mode)
curl -X POST "https://api.apify.com/v2/acts/ryanclinton~insider-political-alpha-mcp/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

How Insider Political Alpha MCP Server works

Phase 1: Parallel data collection

When a tool call arrives, the server dispatches 3-10 Apify actors in parallel using Promise.all via runActorsParallel. Each actor call runs with a 120-second timeout and 256 MB memory allocation. Failures are caught individually — an empty array is returned for any timed-out or erroring source, and the analysis proceeds with the data that did arrive.

The 13 upstream actors cover: congressional stock disclosures (Congress Stock Tracker), SEC Form 4 insider filings (SEC Insider Trading), FEC contribution records (FEC Campaign Finance), Federal Register rulemaking entries (Federal Register Search), introduced bills (Congress Bill Search), contract awards (USAspending + SAM.gov), equity price series (Finnhub), macroeconomic factors (FRED: DTB3, SP500, VIXCLS), EDGAR company filings (EDGAR Filing Search + EDGAR Analyzer), and corporate records (OpenCorporates).

Phase 2: Statistical signal detection

The assembled dataset passes through one or more of six algorithms implemented in scoring.ts:

Hawkes process — timestamps are extracted from heterogeneous fields across all data types (date, transactionDate, filingDate, publishedDate, actionDate), normalized to days from the earliest observation, and fit via 200-iteration MLE gradient descent at learning rate 0.001 with non-negativity constraints. The cross-excitation fraction F = (alpha_12 / beta_12) / total_intensity determines what proportion of trading is "politically excited." Trade-event pairs within a 60-day window with kernel contribution above 0.05 are surfaced as flagged pairs sorted by excitation contribution.

Fama-French event study — daily price returns are computed from Finnhub close prices; the risk-free rate is read from FRED DTB3 (defaulting to 5% annualized when unavailable). OLS regression with a political indicator variable estimates alpha, market beta, and the political beta coefficient. CAR accumulates over [-5, +30] day windows around each political event date. A t-statistic above 2.0 triggers the significance flag; positive political beta indicates potential informed buying.

Transfer entropy — time series are discretized into three-bin symbol sequences using tertile thresholds. The Ziv-Merhav cross-parsing complexity estimator builds a full substring dictionary (up to length 10) from one series and greedily parses the other. Lower phrase count relative to series length indicates higher shared information. Normalized TE values form directed edge weights; edges are ranked to surface primary information flow channels.

CRQA — donation and trade amount series are z-score normalized, then phase-space embedded with dimension=2 and delay=1 using Takens delay embedding. The cross-recurrence matrix CR(i,j) = Theta(epsilon - ||x_i - y_j||) is built using epsilon at the 10th percentile of all pairwise distances. DET counts recurrence points on diagonal lines of length >= 2 as a fraction of total recurrence. LAM counts points on vertical lines. Shannon entropy of diagonal line length distribution is computed. Coordination Score = DET x LAM x (1 - entropy/max_entropy).

Difference-in-Differences — trades are partitioned into treatment (named committee members) and control groups by string-matching committee_members against legislator name fields across data sources. Mean signed trade value (positive for purchases, negative for sales) is computed in 60-day pre-award and 30-day post-award windows. DiD estimator delta = treatment_delta - control_delta. Parallel trends test checks whether pre-award trend divergence is below 10% of the control group mean.

Betweenness centrality — a bipartite graph is constructed from legislator-company trading edges and donor-recipient donation edges. The graph projects to a unipartite legislator network via shared-company adjacency. Brandes' BFS-based betweenness algorithm computes exact centrality for all nodes with normalization by (n-1)(n-2)/2. Broker Score = betweenness x (1 + abnormal_return_correlation).

Phase 3: Composite scoring and output assembly

For profile_legislator_alpha and generate_alpha_signal_report, component scores are combined using fixed weights: temporal coincidence 30%, information flow 20%, brokerage 20%, donation-trade CRQA 15%, contract anticipation 15%. Risk thresholds: CRITICAL >= 80, HIGH >= 60, ELEVATED >= 40, MODERATE >= 20, LOW < 20. All intermediate algorithm parameters, data counts, and findings strings are returned for full auditability.

Tips for best results

  1. Name legislators precisely. The Congress Stock Tracker and FEC actors match by name string. Use the full name as it appears in official disclosures — "Robert M. Kellner" not "Kellner" — to maximize record retrieval and avoid false negatives.

  2. Pair sector keywords with generate_alpha_signal_report. The focus_sector parameter propagates to all 10 upstream actor queries simultaneously, keeping data topically coherent and improving signal-to-noise in Hawkes and CRQA algorithms.

  3. Check the branching ratio before acting on a high Hawkes score. An excitation fraction above 0.4 triggers an ALERT, but a branching ratio >= 1 indicates an explosive Hawkes process where parameter estimates may be unreliable due to sparse data. The findings array contains a WARNING message in this case.

  4. Read component scores, not just the composite. A legislator with a 75 composite driven entirely by betweenness centrality has a different risk profile than one with a 75 driven by a significant t-statistic. Component scores guide which evidence is actionable.

  5. Always provide committee_members for contract anticipation. Without named treatment group members, the DiD estimator treats all congressional traders as the control group and returns an anticipation score near zero.

  6. Set a per-session spending limit. profile_legislator_alpha and generate_alpha_signal_report launch 8-10 upstream actors each. Configure a run spending limit in Apify Console before starting a broad sweep.

  7. Follow up detect_informed_trading with compute_abnormal_returns. If the Hawkes score is elevated, the Fama-French event study provides independent confirmation — or disconfirmation — via a separate statistical pathway.

Combine with other Apify actors

ActorHow to combine
Congress Stock TrackerUsed internally; call directly to retrieve raw trade disclosures before passing a curated dataset to the MCP tools
SEC Insider TradingUsed internally; extract Form 4 filings for a company independently to supplement congressional data in custom analyses
FEC Campaign FinanceUsed internally; retrieve PAC or corporate donor networks directly to pre-filter CRQA input before calling the MCP tool
Company Deep ResearchRun after detect_informed_trading to build a full company intelligence profile around any flagged tickers
EDGAR Filing SearchRun alongside compute_abnormal_returns to correlate 10-K/10-Q filing dates with political event windows
USAspending SearchQuery directly for historical contract award data to validate and enrich detect_contract_anticipation findings
WHOIS Domain LookupIdentify ownership patterns for shell entities or LLCs that surface in information broker network edges

Limitations

  • Data latency from upstream sources. Congressional stock disclosures carry a 30-45 day STOCK Act disclosure window. FEC records update on quarterly filing cycles. Analyses reflect reported public data, not real-time positions.
  • Name matching is string-based. Legislator and company names are matched by substring inclusion across upstream actor response fields. Ambiguous names, nicknames, or initials reduce retrieval and weaken statistical estimates.
  • Sparse data degrades algorithm reliability. The Hawkes process requires at least 2 political events and 2 trades; CRQA requires at least 5 data points per series. With fewer observations, algorithms return zero scores and surface a data insufficiency finding rather than a false positive.
  • No real-time price data. Stock price series come from Finnhub's historical endpoint. Intraday or tick-level data is not available in this pipeline.
  • Correlation is not causation. High temporal coincidence scores and significant Fama-French t-statistics are statistical associations, not legal proof of informed trading. Findings require independent corroboration before any legal or compliance conclusion is drawn.
  • Betweenness centrality requires a minimum network size. With fewer than 10 legislators in the retrieved dataset, the projected graph is too sparse for meaningful centrality scores. Broad queries without a legislator filter produce richer network results.
  • FRED factor proxies are simplified. The Fama-French implementation uses DTB3 as the risk-free rate and SP500 as the market factor. SMB and HML betas are set to zero in the current implementation — the model is effectively a CAPM plus political factor regression.
  • Standby mode is required. This server only functions in Apify Standby mode. Normal actor runs exit after a brief health-check response. Use an MCP-compatible client or call the /mcp endpoint directly.
  • Upstream actor timeouts. Each upstream source has a 120-second timeout. If a source is slow or unavailable, it returns an empty array and the analysis proceeds with reduced data, visible in the dataCounts field.

Integrations

  • Zapier — trigger a generate_alpha_signal_report call on a weekly schedule and route CRITICAL-level signals to a Slack channel or compliance inbox
  • Make — build a workflow that calls profile_legislator_alpha for each name in a watchlist and logs composite scores to Airtable
  • Google Sheets — export flagged trade-event pairs and component scores to a tracking spreadsheet refreshed after each analysis run
  • Apify API — start and manage Standby runs programmatically; poll actor run status and retrieve output via the datasets endpoint
  • Webhooks — fire a webhook when a run completes so downstream compliance workflows consume results without polling
  • LangChain / LlamaIndex — register the MCP server as a tool provider in a LangChain agent to enable multi-step informed trading research within an AI reasoning loop

Troubleshooting

  • All component scores return zero. This means upstream actors returned empty datasets. Check the dataCounts field — if all counts are zero, the query is too narrow or an upstream actor timed out. Broaden the search term or remove filters and retry.

  • Hawkes branching ratio >= 1 warning appears in findings. The Hawkes process requires stationarity (branching ratio < 1). This warning means data is sparse relative to the observation window. Retrieve more data by broadening the query, or treat the temporal coincidence score as unreliable for this particular run.

  • detect_contract_anticipation returns anticipationScore: 0. This occurs when no contract award date is parseable from USAspending or SAM.gov results, or when committee_members is empty. Verify the contract_query returns records by calling the USAspending actor directly, and always provide at least one committee member name.

  • Tool call returns a spending limit error message. Each tool checks Actor.charge() before running upstream actors. If eventChargeLimitReached is true in the response, increase the spending limit for the run in Apify Console under Actor Settings > Monetization, then retry.

  • MCP client cannot connect to the server. Confirm the actor is running in Standby mode — check the run log for "MCP Server listening on port" output. Normal (non-Standby) runs exit after one second with a health-check message. The MCP endpoint is POST /mcp on the actor's Standby URL.

Responsible use

  • This server only accesses publicly available government disclosure data from official U.S. sources: congress.gov STOCK Act filings, FEC.gov, the Federal Register, USAspending.gov, SAM.gov, and SEC EDGAR.
  • Statistical outputs are research tools. They do not constitute legal conclusions, investment advice, or admissible evidence without independent verification by qualified professionals.
  • Comply with applicable securities laws, journalist shield laws, and data protection regulations when using or publishing findings derived from this tool.
  • Do not use findings to harass, defame, or make unsubstantiated public accusations against individuals named in disclosure records.
  • For guidance on public data access and web scraping legality, see Apify's guide.

FAQ

What is an MCP server and how does Insider Political Alpha MCP Server connect to my AI client? An MCP (Model Context Protocol) server exposes tools that AI clients like Claude Desktop or Cursor can call during a conversation. This actor runs in Apify Standby mode and listens at a persistent /mcp HTTP endpoint. Add the Standby URL with your Apify API token as the bearer in your client configuration, and the eight tools become available as callable functions immediately.

How many actors does each informed trading signal detection tool call? Between 3 and 10, depending on the tool. detect_informed_trading, compute_abnormal_returns, map_information_flow, and detect_contract_anticipation each run 4 actors in parallel. analyze_donation_trade_correlation and identify_information_brokers run 3. profile_legislator_alpha runs 8, and generate_alpha_signal_report runs all 10 sources simultaneously.

How accurate is the Hawkes process temporal coincidence score? The score reflects the MLE-fitted cross-excitation fraction from the bivariate Hawkes process. It is most reliable when both series contain at least 10 observations over a 60-day observation window. With fewer data points, the findings array will surface a data insufficiency message and the score should not be interpreted as meaningful. A branching ratio >= 1 in the findings also signals unreliable parameter estimates.

Does this informed trading tool replace legal due diligence or compliance review? No. The algorithms produce statistical associations derived from public disclosure data. They identify patterns warranting further investigation, not legal conclusions. Any compliance action, regulatory referral, or publication requires independent verification by qualified legal counsel.

Is it legal to access congressional trading and FEC data for analysis? Yes. Congressional stock disclosures (STOCK Act filings), FEC campaign finance records, Federal Register entries, USAspending contract data, and SEC EDGAR filings are all public records published by the U.S. government with no access restrictions or terms of service prohibiting analysis. See Apify's guide to web scraping legality for broader context.

How is this different from Quiver Quant or Capitol Trades? Quiver Quant and Capitol Trades display raw congressional trade records in consumer dashboards without statistical testing. This MCP server applies six detection algorithms — Hawkes processes, Fama-French event studies, Ziv-Merhav transfer entropy, CRQA, DiD, and betweenness centrality — to produce scored signals with full intermediate parameters. It integrates campaign finance, federal contracts, and SEC insider filings alongside congressional trades, and it is fully programmable via MCP protocol or the Apify API.

How long does a typical profile_legislator_alpha tool call take? Typically 2-5 minutes. The tool dispatches 8 actors in parallel, each with a 120-second timeout. Total wall-clock time is determined by the slowest upstream actor response. For sector-wide generate_alpha_signal_report calls with 10 parallel actors, expect 3-7 minutes.

Can I schedule this MCP server to run weekly sector reports automatically? Yes. Use Apify Scheduler to trigger a generate_alpha_signal_report call on a recurring schedule. Combine with Zapier or Make to route CRITICAL or HIGH risk signals to a monitoring dashboard or notification channel automatically.

What happens when an upstream actor returns no data for my query? The server catches empty dataset responses, logs a warning, and proceeds with the remaining data sources. Scoring algorithms return zero scores for empty inputs and surface a data insufficiency finding. The dataCounts field in every response shows exactly how many records each upstream actor returned, making data gaps visible.

Can I use this to monitor a watchlist of legislators on an ongoing basis? Not natively within a single call. Call profile_legislator_alpha once per legislator from a client loop or from a Make/Zapier workflow that iterates over your watchlist. Each call is charged independently.

How does the Fama-French political beta differ from a simple correlation between stock prices and event dates? The political beta is estimated by OLS regression that simultaneously controls for market risk (market factor), size (SMB proxy), and value (HML proxy). A positive political beta after removing common factor exposures indicates returns around political events are abnormal relative to what the factor model predicts — a statistically stronger and more specific signal than raw price correlation with event dates.

Can I access the raw Hawkes parameters and CRQA metrics for my own downstream analysis? Yes. Every tool response includes the full parameter set: Hawkes alpha_12, beta_12, alpha_22, beta_22, excitation fraction, log-likelihood; CRQA DET, LAM, entropy, coordination score; transfer entropy edge weights; DiD pre/post returns for treatment and control groups; and betweenness centrality values. The output is structured JSON suitable for direct import into R, Python pandas, or any econometric pipeline.

Help us improve

If you encounter issues, you can help us debug faster by enabling run sharing in your Apify account:

  1. Go to Account Settings > Privacy
  2. Enable Share runs with public Actor creators

This lets us see your run details when something goes wrong, so we can fix issues faster. Your data is only visible to the actor developer, not publicly.

Support

Found a bug or have a feature request? Open an issue in the Issues tab on this actor's page. For custom scoring algorithm configurations, additional data source integrations, or enterprise deployments, reach out through the Apify platform.

How it works

01

Configure

Set your parameters in the Apify Console or pass them via API.

02

Run

Click Start, trigger via API, webhook, or set up a schedule.

03

Get results

Download as JSON, CSV, or Excel. Integrate with 1,000+ apps.

Use cases

Sales Teams

Build targeted lead lists with verified contact data.

Marketing

Research competitors and identify outreach opportunities.

Data Teams

Automate data collection pipelines with scheduled runs.

Developers

Integrate via REST API or use as an MCP tool in AI workflows.

Ready to try Insider Political Alpha MCP Server?

Start for free on Apify. No credit card required.

Open on Apify Store