race_matchup
Pack: us-race-matchups · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/race_matchup for the schema, then POST the same URL with its arguments for the data.
One US House district or Senate seat: who the incumbent is, every FEC-registered candidate by party with money raised/spent/cash on hand, which candidates won their primary, primary and general election dates. Primary vote counts come from Wikipedia (non-official, labelled as such, cites the state election authority); money and incumbency are FEC. A district that does not exist returns an error naming the districts that do.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
state | string | yes | US state: postal code (“IA”) or full name (“Iowa”). |
office | string | yes | ”house” or “senate”. |
district | string | no | House district number (1, “01”) or “at-large”. Required for house, ignored for senate. |
cycle | number | no | Election year, even. Default 2026. |
special | boolean | no | Senate only: read the special-election primary page (Ohio and Florida in 2026). |
Example call
Arguments
{
"state": "IA",
"office": "house",
"district": 1
}
curl
curl -X POST https://gateway.pipeworx.io/us-race-matchups/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"race_matchup","arguments":{"state":"IA","office":"house","district":1}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('race_matchup', {
"state": "IA",
"office": "house",
"district": 1
});
More examples
{
"state": "Iowa",
"office": "senate"
}
Response shape
| Field | Type | Description |
|---|---|---|
race | string | |
cycle | number | |
election_dates | object | |
incumbent | array | null | |
incumbent_note | string | null | |
candidates_total | number | |
candidates_money_note | string | null | |
candidates | array | |
candidates_note | string | null | |
primary_results | array | |
primary_results_note | string | null | |
primary_results_source | object | |
won_primary_note | string | |
source | string | |
data_as_of | string | null | |
data_as_of_note | string |
Full JSON Schema
{
"type": "object",
"properties": {
"race": {
"type": "string"
},
"cycle": {
"type": "number"
},
"election_dates": {
"type": "object",
"properties": {
"primary": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"party": {
"type": [
"string",
"null"
]
},
"notes": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
}
},
"runoff": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"general": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
},
"incumbent": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"party": {
"type": [
"string",
"null"
]
},
"candidate_id": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
}
},
"incumbent_note": {
"type": [
"string",
"null"
]
},
"candidates_total": {
"type": "number"
},
"candidates_money_note": {
"type": [
"string",
"null"
]
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"candidate_id": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"party": {
"type": [
"string",
"null"
]
},
"incumbent_status": {
"type": [
"string",
"null"
]
},
"won_primary": {
"type": [
"boolean",
"null"
]
},
"campaign_committee": {
"type": [
"string",
"null"
]
},
"financials_on_file": {
"type": "boolean"
},
"total_receipts": {
"type": [
"number",
"null"
]
},
"total_disbursements": {
"type": [
"number",
"null"
]
},
"cash_on_hand": {
"type": [
"number",
"null"
]
},
"money_through": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
}
},
"candidates_note": {
"type": [
"string",
"null"
]
},
"primary_results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contest": {
"type": "string"
},
"kind": {
"type": "string"
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"party": {
"type": [
"string",
"null"
]
},
"votes": {
"type": [
"number",
"null"
]
},
"vote_share_pct": {
"type": [
"number",
"null"
]
},
"advanced": {
"type": "boolean"
},
"incumbent": {
"type": "boolean"
}
},
"additionalProperties": true
}
},
"total_votes": {
"type": [
"number",
"null"
]
},
"cited_publisher": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
}
},
"primary_results_note": {
"type": [
"string",
"null"
]
},
"primary_results_source": {
"type": "object",
"additionalProperties": true
},
"won_primary_note": {
"type": "string"
},
"source": {
"type": "string"
},
"data_as_of": {
"type": [
"string",
"null"
]
},
"data_as_of_note": {
"type": "string"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the us-race-matchups pack
{
"mcpServers": {
"us-race-matchups": {
"url": "https://gateway.pipeworx.io/us-race-matchups/mcp"
}
}
}
See Getting Started for client-specific install steps.