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.

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

Member detail by id.

Parameters
NameTypeDescription
idreqnumber
includesoptstring
Try it
search_bills

Search bills.

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

Bill detail.

Parameters
NameTypeDescription
bill_idreqnumber
Try it
bill_stagesrequired: bill_id

All stages of a bill.

Parameters
NameTypeDescription
bill_idreqnumber
Try it
search_hansardrequired: query

Search debate contributions.

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

Recent recorded votes.

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)");