Uk Parliament Bills

io.github.nick-ma由 GitHub 账号 nick-ma 发布v1.0.2更新于 Oct 25, 2026

MCP server for UK Parliament Bills API

概览

AI 生成的概览

让助手通过公开的议案 API 检索和阅读英国议会议案数据,包括议案、阶段、修正案、出版物、会期和 RSS 订阅源。

可以做什么
按会期、议院、议员、状态等条件搜索和获取议案、议案类型与阶段参考,并按 ID 获取单个议案及其当前阶段和新闻文章。列出议案的各个阶段与阶段详情,搜索或获取某阶段的修正案和 ping-pong 事项。列出议案与阶段的出版物、出版物类型,并获取或下载出版物文档。按议院和日期范围搜索会期。以原始文本返回全部、公共、私人或指定议案的 RSS 订阅源。
适用场景
适合立法研究、公民科技或监测类工作流,助手需要总结议案进展、跟踪修正案与阶段,或从英国议会议案 API 获取出版物和 RSS 订阅源时使用。
运行要求
通过 stdio 在本地运行,通常用 npx 启动已发布的 npm 包,因此需要 Node.js。它会通过网络调用公开的英国议会议案 API;README 中展示了可选的 UPSTREAM_BASE_URL 和 REQUEST_TIMEOUT_MS 设置。未声明需要身份验证。
安装前请注意
对公开 API 的只读查询,但响应直接来自上游服务,准确性取决于该服务。README 还记录了 HTTP 代理模式,可转发任意上游路径并设置端口;请仅在本机运行,并注意它会开放网络监听。下载出版物文档会从上游服务拉取文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Uk Parliament Bills,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[MCP Compatible] [AI Agent Ready]

UK Parliament Bills MCP Server

Summary

This MCP server provides structured access to UK Parliament Bills data using the Model Context Protocol. It enables AI agents to query bills, stages, publications, amendments, and RSS feeds through reliable tools and an API-backed data source. Developers can integrate the MCP server into local workflows or automation pipelines using stdio transport, while preserving upstream API responses. The server exposes tools for search, lookup, and publication retrieval, optimized for AI agents and MCP-compatible clients.

Features

  • Search and retrieve Bills, stages, publications, and sittings from the UK Parliament Bills API.
  • Access amendments and ping-pong items with structured parameters and enum validation.
  • Provide RSS feeds for all, public, or private bills as raw text payloads.
  • Preserve upstream JSON payloads in a consistent response envelope for downstream tools and AI agents.

Available Tools

search_bill_stage_amendments

Returns a list of amendments for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • SearchTerm (string, query) – Optional text search.
  • AmendmentNumber (string, query) – Optional amendment number.
  • Decision (string, query) – Optional decision enum.
  • MemberId (number, query) – Optional member ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill_stage_amendment

Returns a specific amendment for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • amendmentId (number, path) – Amendment ID.

list_bill_news_articles

Returns news articles for a Bill.

Parameters:

  • billId (number, path) – Bill ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_bill_types

Returns a list of Bill types.

Parameters:

  • Category (string, query) – Optional category enum.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

search_bills

Returns a list of Bills matching filters.

Parameters:

  • SearchTerm (string, query) – Optional text search.
  • Session (number, query) – Optional session number.
  • CurrentHouse (string, query) – Optional house enum.
  • OriginatingHouse (string, query) – Optional house enum.
  • MemberId (number, query) – Optional member ID.
  • DepartmentId (number, query) – Optional department ID.
  • BillStage (array:number, query) – Optional bill stage IDs.
  • BillStagesExcluded (array:number, query) – Optional excluded stage IDs.
  • IsDefeated (boolean, query) – Optional defeated filter.
  • IsWithdrawn (boolean, query) – Optional withdrawn filter.
  • BillType (array:number, query) – Optional bill type IDs.
  • SortOrder (string, query) – Optional sort order enum.
  • BillIds (array:number, query) – Optional bill IDs.
  • IsInAmendableStage (boolean, query) – Optional amendable stage filter.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill

Returns a Bill.

Parameters:

  • billId (number, path) – Bill ID.

get_bill_stage_details

Returns a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.

list_bill_stages

Returns all Bill stages for a Bill.

Parameters:

  • billId (number, path) – Bill ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_publication_document

Returns information on a publication document.

Parameters:

  • publicationId (number, path) – Publication ID.
  • documentId (number, path) – Document ID.

download_publication_document

Returns a publication document payload.

Parameters:

  • publicationId (number, path) – Publication ID.
  • documentId (number, path) – Document ID.

search_bill_stage_ping_pong_items

Returns a list of motions or amendments for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • SearchTerm (string, query) – Optional text search.
  • AmendmentNumber (string, query) – Optional amendment number.
  • Decision (string, query) – Optional decision enum.
  • MemberId (number, query) – Optional member ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill_stage_ping_pong_item

Returns an amendment or motion detail.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • pingPongItemId (number, path) – Ping pong item ID.

list_publication_types

Returns a list of publication types.

Parameters:

  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_bill_publications

Returns Bill publications.

Parameters:

  • billId (number, path) – Bill ID.

list_bill_stage_publications

Returns publications for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • stageId (number, path) – Stage ID.

get_rss_all_bills

Returns an RSS feed for all Bills.

get_rss_public_bills

Returns an RSS feed for public Bills.

get_rss_private_bills

Returns an RSS feed for private Bills.

get_rss_bill_by_id

Returns an RSS feed for a specific Bill.

Parameters:

  • id (number, path) – Bill ID.

search_sittings

Returns a list of sittings.

Parameters:

  • House (string, query) – Optional house enum.
  • DateFrom (string, query) – Optional start date.
  • DateTo (string, query) – Optional end date.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_stage_references

Returns a list of Bill stages.

Parameters:

  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

Example Output

json
{  "status": 200,  "data": {    "items": [      {        "billId": 1,        "title": "Energy Security Bill",        "currentStage": "Commons Committee",        "currentHouse": "Commons",        "lastUpdated": "2026-03-11T10:00:00Z"      }    ],    "totalResults": 1  },  "upstream_path": "/api/v1/Bills",  "retrieved_at": "2026-03-11T10:00:00.000Z"}

Quick Start

Run the MCP server using npx:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills mcp-server-uk-parliament-bills

MCP Configuration

Example mcpServers configuration for stdio transport:

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

Example Usage

  • List the latest UK Parliament Bills.
  • Fetch a specific Bill by ID and return the current stage.
  • Retrieve publications for a Bill and download a document.
  • Get the RSS feed for public Bills for downstream tools.

Use Cases

  • AI agents summarizing legislative progress and bill status.
  • Developer tools that monitor bill updates via the API and RSS.
  • Civic technology platforms tracking amendments and parliamentary stages.
  • Automation workflows that enrich datasets with UK Parliament Bills metadata.

Data Source

UK Parliament Bills API https://bills-api.parliament.uk

Installation

Run directly using npx:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills mcp-server-uk-parliament-bills

Or install via pnpm from the repository root:

bash
pnpm install

Run (HTTP proxy server)

Build first, then start:

bash
pnpm --filter @darkhorseone/mcp-server-uk-parliament-bills run buildpnpm --filter @darkhorseone/mcp-server-uk-parliament-bills run start:http

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

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

Published package command:

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

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

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

Health check:

bash
curl http://127.0.0.1:3000/healthz

Proxy pattern:

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

Example:

bash
curl "http://127.0.0.1:3000/proxy/api/v1/Bills?SearchTerm=energy&SortOrder=TitleAscending"

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: search_bill_stage_amendments, get_bill_stage_amendment, list_bill_news_articles, list_bill_types, search_bills, get_bill, get_bill_stage_details, list_bill_stages, get_publication_document, download_publication_document, search_bill_stage_ping_pong_items, get_bill_stage_ping_pong_item, list_publication_types, list_bill_publications, list_bill_stage_publications, get_rss_all_bills, get_rss_public_bills, get_rss_private_bills, get_rss_bill_by_id, search_sittings, list_stage_references

来源:servers/uk-parliament-bills/README.md,提交 38e74c9

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。