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-commonsvotes

v1.0.1

Published

MCP server for UK Parliament Commons Votes API

Readme

MCP Compatible AI Agent Ready

UK Parliament Commons Votes MCP Server

Summary

This MCP server provides structured access to UK Parliament Commons Votes data using the Model Context Protocol. It enables AI agents to retrieve divisions and voting records through API-backed tools, delivering reliable data access for automation and analysis. Developers can integrate the MCP server via stdio transport to access division details, member voting history, and search results. The server exposes tools that map directly to the Commons Votes API for fast, consistent querying by AI agents and developer tools.

Features

  • Fetch Commons division details by division id in JSON or XML.
  • Search divisions with filters for members, dates, and division numbers.
  • Retrieve member voting records and grouped-by-party summaries.
  • Preserve upstream responses in a consistent envelope for downstream tools and AI agents.

Available Tools

ukpcv_division_get_by_id

Return a Division.

Parameters:

  • divisionId (number, path) – Division id.
  • format (string, path) – xml or json.

ukpcv_divisions_grouped_by_party

Return Divisions results grouped by party.

Parameters:

  • format (string, path) – xml or json.
  • queryParameters.searchTerm (string, query)
  • queryParameters.memberId (number, query)
  • queryParameters.includeWhenMemberWasTeller (boolean, query)
  • queryParameters.startDate (string, query) – yyyy-MM-dd.
  • queryParameters.endDate (string, query) – yyyy-MM-dd.
  • queryParameters.divisionNumber (number, query)

ukpcv_divisions_member_voting

Return voting records for a Member.

Parameters:

  • format (string, path) – xml or json.
  • queryParameters.memberId (number, query) – required.
  • queryParameters.skip (number, query)
  • queryParameters.take (number, query)
  • queryParameters.searchTerm (string, query)
  • queryParameters.includeWhenMemberWasTeller (boolean, query)
  • queryParameters.startDate (string, query) – yyyy-MM-dd.
  • queryParameters.endDate (string, query) – yyyy-MM-dd.
  • queryParameters.divisionNumber (number, query)

ukpcv_divisions_search

Return a list of Divisions.

Parameters:

  • format (string, path) – json or xml.
  • queryParameters.skip (number, query)
  • queryParameters.take (number, query)
  • queryParameters.searchTerm (string, query)
  • queryParameters.memberId (number, query)
  • queryParameters.includeWhenMemberWasTeller (boolean, query)
  • queryParameters.startDate (string, query) – yyyy-MM-dd.
  • queryParameters.endDate (string, query) – yyyy-MM-dd.
  • queryParameters.divisionNumber (number, query)

ukpcv_divisions_search_total_results

Return total results count.

Parameters:

  • format (string, path) – json or xml.
  • queryParameters.searchTerm (string, query)
  • queryParameters.memberId (number, query)
  • queryParameters.includeWhenMemberWasTeller (boolean, query)
  • queryParameters.startDate (string, query) – yyyy-MM-dd.
  • queryParameters.endDate (string, query) – yyyy-MM-dd.
  • queryParameters.divisionNumber (number, query)

Example Output

{
  "status": 200,
  "data": {
    "items": [
      {
        "divisionId": 1234,
        "title": "Finance Bill - Third Reading",
        "divisionNumber": 15,
        "date": "2026-03-10"
      }
    ],
    "totalResults": 1
  },
  "upstream_path": "/data/divisions.json/search",
  "retrieved_at": "2026-03-11T10:00:00.000Z"
}

Quick Start

Run the MCP server using npx:

npx -y -p @darkhorseone/mcp-server-uk-parliament-commonsvotes mcp-server-uk-parliament-commonsvotes

MCP Configuration

Example mcpServers configuration for stdio transport:

{
  "mcpServers": {
    "uk-parliament-commonsvotes": {
      "command": "npx",
      "args": ["-y", "-p", "@darkhorseone/mcp-server-uk-parliament-commonsvotes", "mcp-server-uk-parliament-commonsvotes"],
      "env": {
        "UKPCV_API_BASE_URL": "https://commonsvotes-api.parliament.uk",
        "UKPCV_REQUEST_TIMEOUT_MS": "10000"
      }
    }
  }
}

Example Usage

  • Fetch a division by id in JSON format.
  • Search divisions for a member within a date range.
  • Retrieve a member's voting record and paging results.
  • Get total results for a search query before fetching pages.

Use Cases

  • AI agents summarizing Commons divisions and outcomes.
  • Political analysis tools tracking voting history by member.
  • Civic technology platforms monitoring division trends.
  • Automation workflows exporting division data for reporting.

Data Source

UK Parliament Commons Votes API https://commonsvotes-api.parliament.uk/

Installation

Run directly using npx:

npx -y -p @darkhorseone/mcp-server-uk-parliament-commonsvotes mcp-server-uk-parliament-commonsvotes

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-commonsvotes run build
pnpm --filter @darkhorseone/mcp-server-uk-parliament-commonsvotes run start:http

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

UKPCV_HTTP_PORT=8787 pnpm --filter @darkhorseone/mcp-server-uk-parliament-commonsvotes run start:http

Published package command:

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

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

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

Health check:

curl http://127.0.0.1:8787/healthz

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: ukpcv_division_get_by_id, ukpcv_divisions_grouped_by_party, ukpcv_divisions_member_voting, ukpcv_divisions_search, ukpcv_divisions_search_total_results