UK Parliament

liveLegislatureGovernmentEurope

Official Westminster APIs — Members, Bills, Hansard (debates). No auth.

7tools
0msauth
free tier50 calls/day

Tools

search_members

Search MPs and Lords by name / party / location / house.

Parameters
NameTypeDescription
nameoptstring—
locationoptstring—
partyoptstring—
houseoptnumber1=Commons, 2=Lords
is_currentoptboolean—
takeoptnumber—
skipoptnumber—
▶Try it
get_memberrequired: id

Member detail by member id.

Parameters
NameTypeDescription
idreqnumber—
includesoptstring—
▶Try it
search_bills

Search legislation before the UK Parliament through the official Bills API (bills-api.parliament.uk), matching bill titles and short titles and filtering by parliamentary session id, current stage id,

Parameters
NameTypeDescription
queryoptstring—
sessionoptnumber—
stageoptnumber—
member_idoptnumber—
current_houseoptnumber—
sortoptstring—
takeoptnumber—
skipoptnumber—
▶Try it
get_billrequired: bill_id

Fetch full detail for a UK Parliament bill by numeric bill_id — returns title, short title, sponsors, current stage, originating house, sessions, and summary description.

Parameters
NameTypeDescription
bill_idreqnumber—
▶Try it
bill_stagesrequired: bill_id

All stages of a bill (introduction, readings, committee, royal assent).

Parameters
NameTypeDescription
bill_idreqnumber—
▶Try it
search_hansardrequired: query

Search debate contributions in Hansard.

Parameters
NameTypeDescription
queryreqstring—
houseoptstring—
date_fromoptstring—
date_tooptstring—
member_idoptnumber—
takeoptnumber—
skipoptnumber—
▶Try it
recent_divisions

Recent divisions (recorded votes) in the UK Parliament, read from the official Hansard API at hansard-api.parliament.uk, filterable by house (Commons or Lords) and a start date, up to 25 per call. Ret

Parameters
NameTypeDescription
houseoptstring—
date_fromoptstring—
takeoptnumber—
▶Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/uk-parliament/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/uk-parliament/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_members","arguments":{}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("search_members", {});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("official westminster apis — members, bills, hansard (debates)");