Uk Parliament Treaties

io.github.nick-maPublished by GitHub account nick-mav1.0.1Updated Oct 24, 2026

MCP server for UK Parliament Treaties API

VerifiedSTDIODesktop onlyKnowledge & MemoryData & Analytics

Overview

AI-generated overview

Lets an assistant query UK Parliament treaty data, including treaties, business items, government organisations and series memberships.

What you can do
Wraps the UK Parliament Treaties API in read-only tools: list_treaties searches by house, series, parliamentary process status, debate scheduling, motions and committee concerns; get_treaty_by_id and get_business_item_by_id fetch single records; list_business_items_by_treaty_id returns items linked to a treaty; list_government_organisations and list_series_memberships return reference lists. Responses keep the upstream payload in a standard envelope with the upstream path and retrieval time.
When to use it
Useful for research, civic-tech or reporting work that tracks UK treaty scrutiny, parliamentary process status, or which government body is associated with a treaty. It is a read-only public-data source, so it fits assistants that summarise or monitor treaty activity rather than act on it.
Requirements
Runs locally over stdio, typically via npx with the npm package @darkhorseone/mcp-server-uk-parliament-treaties, so Node.js and network access to the Treaties API are needed. Optional environment variables include UPSTREAM_BASE_URL and REQUEST_TIMEOUT_MS; an HTTP proxy mode uses UKP_HTTP_PORT. No accounts or API keys are declared.
Before you install
All exposed tools are read-only lookups against a public API, so no data is written, sent or deleted. Requests go to the external UK Parliament Treaties API, so queries leave the machine. Treat returned treaty metadata as public reference material rather than authoritative legal advice.

Installation

In SourceWeft

  1. Open Uk Parliament Treaties in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[MCP Compatible] [AI Agent Ready]

UK Parliament Treaties MCP Server

Summary

This MCP server provides structured access to UK Parliament Treaties data using the Model Context Protocol. It enables AI agents to retrieve treaties, business items, and government organisations through API-backed tools and data access. Developers can integrate the MCP server via stdio transport to query treaty metadata, series memberships, and parliamentary process status. The server exposes tools that map directly to the Treaties API for reliable automation and AI agents workflows.

Features

  • Search treaties with filters for house, series, and parliamentary process status.
  • Retrieve treaty and business item details by ID.
  • Access government organisations and series memberships.
  • Preserve upstream payloads in a standardized envelope for downstream tools.

Available Tools

get_business_item_by_id

Returns business item by ID.

Parameters:

  • id (string, path)

list_government_organisations

Returns all government organisations.

list_series_memberships

Returns all series memberships.

list_treaties

Returns a list of treaties.

Parameters:

  • SearchText (string, query)
  • GovernmentOrganisationId (number, query)
  • Series (string, query) – CountrySeriesMembership | EuropeanUnionSeriesMembership | MiscellaneousSeriesMembership
  • ParliamentaryProcess (string, query) – NotConcluded | Concluded
  • DebateScheduled (boolean, query)
  • MotionsTabledAboutATreaty (boolean, query)
  • CommitteeRaisedConcerns (boolean, query)
  • House (string, query) – Commons | Lords
  • Skip (number, query)
  • Take (number, query)

get_treaty_by_id

Returns a treaty by ID.

Parameters:

  • id (string, path)

list_business_items_by_treaty_id

Returns business items belonging to the treaty with ID.

Parameters:

  • id (string, path)

Example Output

json
{  "status": 200,  "data": {    "items": [      {        "treatyId": "CP123",        "title": "Example Treaty",        "house": "Commons"      }    ],    "totalResults": 1  },  "upstream_path": "/api/Treaty",  "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-treaties mcp-server-uk-parliament-treaties

MCP Configuration

Example mcpServers configuration for stdio transport:

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

Example Usage

  • Search treaties by house and parliamentary process status.
  • Fetch a treaty by ID and review its metadata.
  • Retrieve business items linked to a treaty.
  • List government organisations associated with treaties.

Use Cases

  • AI agents summarizing treaty status and parliamentary scrutiny.
  • Research tools tracking treaty processes and schedules.
  • Civic tech platforms monitoring treaties by government body.
  • Automation workflows exporting treaty metadata for analysis.

Data Source

UK Parliament Treaties API https://treaties-api.parliament.uk

Installation

Run directly using npx:

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

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

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

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

Published package command:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-treaties -- mcp-server-uk-parliament-treaties-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-treaties -- node ./dist/http.js

Health check:

bash
curl http://127.0.0.1:8787/healthz

Proxy pattern:

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

Example:

bash
curl "http://127.0.0.1:8787/proxy/api/Treaty?House=Commons&Take=10"

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: get_business_item_by_id, list_government_organisations, list_series_memberships, list_treaties, get_treaty_by_id, list_business_items_by_treaty_id

Source: servers/uk-parliament-treaties/README.md at commit 38e74c9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.