npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@darkhorseone/mcp-server-uk-parliament-questions-statements

v1.0.1

Published

MCP server for UK Parliament Questions and Statements API

Readme

MCP Compatible AI Agent Ready

UK Parliament Questions and Statements MCP Server

Summary

This MCP server provides structured access to UK Parliament Questions and Statements data using the Model Context Protocol. It enables AI agents to retrieve daily reports, written questions, and written statements through API-backed tools and data access. Developers can integrate the MCP server via stdio transport to search questions, filter by session status, and fetch statement details. The server exposes tools that map directly to the Questions and Statements API for reliable automation and AI agents workflows.

Features

  • List daily reports with date and house filters.
  • Search written questions with answering, member, and session filters.
  • Retrieve written questions and statements by id or date/uin.
  • Preserve upstream payloads in a standardized envelope for downstream tools.

Available Tools

list_daily_reports

Returns a list of daily reports.

Parameters:

  • dateFrom (string, query)
  • dateTo (string, query)
  • house (string, query) – Bicameral | Commons | Lords
  • skip (number, query)
  • take (number, query)

list_written_questions

Returns a list of written questions.

Parameters:

  • askingMemberId (number, query)
  • answeringMemberId (number, query)
  • tabledWhenFrom (string, query)
  • tabledWhenTo (string, query)
  • dateForAnswerWhenFrom (string, query)
  • dateForAnswerWhenTo (string, query)
  • answered (string, query) – Any | Answered | Unanswered
  • answeredWhenFrom (string, query)
  • answeredWhenTo (string, query)
  • questionStatus (string, query) – NotAnswered | AnsweredOnly | AllQuestions
  • includeWithdrawn (boolean, query)
  • expandMember (boolean, query)
  • correctedWhenFrom (string, query)
  • correctedWhenTo (string, query)
  • sessionStatus (string, query) – Current | Any
  • searchTerm (string, query)
  • uIN (string, query)
  • answeringBodies (array:number, query)
  • members (array:number, query)
  • house (string, query) – Bicameral | Commons | Lords
  • skip (number, query)
  • take (number, query)

get_written_question_by_id

Returns a written question.

Parameters:

  • id (number, path)
  • expandMember (boolean, query)
  • sessionStatus (string, query) – Current | Any

get_written_question_by_date_and_uin

Returns a written question.

Parameters:

  • date (string, path)
  • uin (string, path)
  • expandMember (boolean, query)
  • sessionStatus (string, query) – Current | Any

list_written_statements

Returns a list of written statements.

Parameters:

  • madeWhenFrom (string, query)
  • madeWhenTo (string, query)
  • sessionStatus (string, query) – Current | Any
  • searchTerm (string, query)
  • uIN (string, query)
  • answeringBodies (array:number, query)
  • members (array:number, query)
  • house (string, query) – Bicameral | Commons | Lords
  • skip (number, query)
  • take (number, query)
  • expandMember (boolean, query)

get_written_statement_by_id

Returns a written statement.

Parameters:

  • id (number, path)
  • expandMember (boolean, query)
  • sessionStatus (string, query) – Current | Any

get_written_statement_by_date_and_uin

Returns a written statement.

Parameters:

  • date (string, path)
  • uin (string, path)
  • expandMember (boolean, query)
  • sessionStatus (string, query) – Current | Any

Example Output

{
  "status": 200,
  "data": {
    "items": [
      {
        "id": 12345,
        "uin": "12345",
        "title": "Example written question",
        "house": "Commons"
      }
    ],
    "totalResults": 1
  },
  "upstream_path": "/api/writtenquestions/questions",
  "retrieved_at": "2026-03-11T10:00:00.000Z"
}

Quick Start

Run the MCP server using npx:

npx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements mcp-server-uk-parliament-questions-statements

MCP Configuration

Example mcpServers configuration for stdio transport:

{
  "mcpServers": {
    "uk-parliament-questions-statements": {
      "command": "npx",
      "args": ["-y", "-p", "@darkhorseone/mcp-server-uk-parliament-questions-statements", "mcp-server-uk-parliament-questions-statements"],
      "env": {
        "UPSTREAM_BASE_URL": "https://questions-statements-api.parliament.uk",
        "REQUEST_TIMEOUT_MS": "10000"
      }
    }
  }
}

Example Usage

  • List daily reports for the Commons over a date range.
  • Search written questions by member and session status.
  • Retrieve a written statement by id or date/uin.
  • Filter questions by answered status and house.

Use Cases

  • AI agents summarizing written questions and statements.
  • Research tools tracking parliamentary questions over time.
  • Civic tech platforms monitoring statements by department.
  • Automation workflows exporting daily report data.

Data Source

UK Parliament Questions and Statements API https://questions-statements-api.parliament.uk

Installation

Run directly using npx:

npx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements mcp-server-uk-parliament-questions-statements

Or install via pnpm from the repository root:

pnpm install

Run (HTTP proxy server)

Build first, then start:

pnpm --filter @darkhorseone/mcp-server-uk-parliament-questions-statements run build
pnpm --filter @darkhorseone/mcp-server-uk-parliament-questions-statements run start:http

Set a custom HTTP port with the UKP_HTTP_PORT environment variable (default: 8787):

UKP_HTTP_PORT=8787 pnpm --filter @darkhorseone/mcp-server-uk-parliament-questions-statements run start:http

Published package command:

npx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements -- mcp-server-uk-parliament-questions-statements-http

If your shell cannot resolve the bin ("command not found"), run the HTTP entrypoint directly:

npx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements -- node ./dist/http.js

Health check:

curl http://127.0.0.1:8787/healthz

Proxy pattern:

GET /proxy/<upstream-path>?<query>

Example:

curl "http://127.0.0.1:8787/proxy/api/writtenquestions/questions?searchTerm=health&take=10"

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: list_daily_reports, list_written_questions, get_written_question_by_id, get_written_question_by_date_and_uin, list_written_statements, get_written_statement_by_id, get_written_statement_by_date_and_uin