Uk Parliament Erskinemay

io.github.nick-ma由 GitHub 帳號 nick-ma 發布v1.0.1更新於 Oct 27, 2026

MCP server for UK Parliament Erskine May API

概覽

AI 產生的概覽

唯讀的 MCP 伺服器,讓助理透過官方 API 查詢與檢索英國議會 Erskine May 議事規則內容。

可以做什麼
  • 依編號取得章(chapter)與部分(part),並列出所有部分
  • 依 id、步驟或參照取得節、節概覽與段落
  • 依起始字母瀏覽索引詞條,並依 id 取得單一詞條
  • 依關鍵字檢索索引詞條、節與段落,支援 skip/take 分頁
  • 回傳結構化回應封裝,並保留上游 JSON 原始內容
適用情境
適合需要權威英國議會程序依據的情境,例如回答議事程序問題、為法律或議會研究整理節與段落,或為公民科技資料集補充 Erskine May 引用。
執行需求
以 stdio 在本機執行,通常透過 npx 啟動 npm 套件,需要 Node.js 以及連線至 Erskine May API 的網路。未宣告任何身分驗證。選用環境變數可設定上游基礎位址、請求逾時,以及 HTTP 代理模式下的本機連接埠。
安裝前請注意
所有工具都是針對公開議會 API 的唯讀查詢與檢索,查詢內容會傳送給該第三方服務。README 另記載 HTTP 代理模式,可在本機連接埠轉送任意上游路徑,其可觸及範圍超出所列工具。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Uk Parliament Erskinemay,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[MCP Compatible] [AI Agent Ready]

UK Parliament Erskine May MCP Server

Summary

This MCP server provides structured access to UK Parliament Erskine May content using the Model Context Protocol. It enables AI agents to query chapters, parts, sections, and index terms through API-backed tools for reliable data access. Developers can connect the MCP server via stdio transport to retrieve authoritative procedural guidance and references. The server exposes tools that map directly to the Erskine May API for search and lookup workflows.

Features

  • Retrieve chapters, parts, sections, and section overviews by identifier.
  • Browse and search index terms and paragraphs by keyword.
  • Support structured lookups with consistent response envelopes.
  • Preserve upstream JSON payloads for downstream tools and AI agents.

Available Tools

get_chapter_by_chapter_number

Returns a single chapter overview by chapter number.

Parameters:

  • chapterNumber (number, path) – Chapter number.

browse_index_terms

Returns a list of index terms by start letter.

Parameters:

  • startLetter (string, query)
  • skip (number, query)
  • take (number, query)

get_index_term_by_index_term_id

Returns an index term by id.

Parameters:

  • indexTermId (number, path) – Index term id.

list_parts

Returns a list of all parts.

get_part_by_part_number

Returns a part by part number.

Parameters:

  • partNumber (number, path) – Part number.

search_index_term_results_by_search_term

Returns a list of index terms which contain the search term.

Parameters:

  • searchTerm (string, path)
  • skip (number, query)
  • take (number, query)

get_paragraph_by_reference

Returns a section overview by reference.

Parameters:

  • reference (string, path)

search_paragraph_results_by_search_term

Returns a list of paragraphs which contain the search term.

Parameters:

  • searchTerm (string, path)
  • skip (number, query)
  • take (number, query)

search_section_results_by_search_term

Returns a list of sections which contain the search term.

Parameters:

  • searchTerm (string, path)
  • skip (number, query)
  • take (number, query)

get_section_by_section_id

Returns a section by section id.

Parameters:

  • sectionId (number, path)

get_section_overview_by_section_id_and_step

Returns a section overview by section id and step.

Parameters:

  • sectionId (number, path)
  • step (number, path)

Example Output

json
{  "status": 200,  "data": {    "sectionId": 12,    "title": "Order in debate",    "content": "..."  },  "upstream_path": "/api/Section/12",  "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-erskinemay mcp-server-uk-parliament-erskinemay

MCP Configuration

Example mcpServers configuration for stdio transport:

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

Example Usage

  • Fetch a chapter by chapter number.
  • Search sections for a keyword and paginate results.
  • Retrieve a section overview by id and step.
  • Browse index terms starting with a letter.

Use Cases

  • AI agents answering procedural questions with authoritative references.
  • Legal or parliamentary research tools mapping sections and paragraphs.
  • Civic tech workflows enriching datasets with Erskine May references.
  • Automation systems that index procedural content for retrieval.

Data Source

UK Parliament Erskine May API https://erskinemay-api.parliament.uk

Installation

Run directly using npx:

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

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

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

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

Published package command:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-erskinemay -- mcp-server-uk-parliament-erskinemay-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-erskinemay -- 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/Part"

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: get_chapter_by_chapter_number, browse_index_terms, get_index_term_by_index_term_id, list_parts, get_part_by_part_number, search_index_term_results_by_search_term, get_paragraph_by_reference, search_paragraph_results_by_search_term, search_section_results_by_search_term, get_section_by_section_id, get_section_overview_by_section_id_and_step

來源:servers/uk-parliament-erskinemay/README.md,提交 38e74c9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。