{"_id":"@darkhorseone/mcp-server-uk-parliament-treaties","_rev":"2-d4b2f5a4c9e1ee0a788339d6d702456a","name":"@darkhorseone/mcp-server-uk-parliament-treaties","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@darkhorseone/mcp-server-uk-parliament-treaties","version":"1.0.0","author":{"name":"DarkhorseOne Limited"},"license":"MIT","_id":"@darkhorseone/mcp-server-uk-parliament-treaties@1.0.0","maintainers":[{"name":"nick-ma","email":"honeyday.mj@gmail.com"}],"homepage":"https://github.com/DarkhorseOne/mcp-servers","bugs":{"url":"https://github.com/DarkhorseOne/mcp-servers/issues"},"bin":{"mcp-server-uk-parliament-treaties":"dist/index.js","mcp-server-uk-parliament-treaties-http":"dist/http.js"},"dist":{"shasum":"7895c1c87bc4d29d691440b2c9e257f06affb09b","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-treaties/-/mcp-server-uk-parliament-treaties-1.0.0.tgz","fileCount":7,"integrity":"sha512-IdWZuk2CteGkgLZDG1TfSy0Q5M56zMUHaoU45T2kpWy/S7eiPYXRNkCGBfNyMIxIWvhjUdnB99YpM8sTO84lIA==","signatures":[{"sig":"MEQCIDVrmsvwt3JSZGOIJ96iw0+GiGE6oJCyAey063Y8TnaQAiBspU5/22rpS10VBxXU5i0pkRjxG4ZPw/FUMF4qQwlrQA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26798},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"55b64f5df709c14a988e8f5ba6b545ea9760a2a5","scripts":{"dev":"tsx src/index.ts","lint":"pnpm run typecheck","test":"vitest run","build":"tsup src/index.ts src/http.ts --format esm --dts --clean","prepack":"pnpm run build && pnpm run check:tarball:shebang","typecheck":"tsc --noEmit -p tsconfig.json","start:http":"node dist/http.js","inspect:npm":"npx -y @modelcontextprotocol/inspector npx -y -p @darkhorseone/mcp-server-uk-parliament-treaties mcp-server-uk-parliament-treaties","inspect:local":"pnpm run build && npx -y @modelcontextprotocol/inspector node ./dist/index.js","prepublishOnly":"pnpm run check:tarball:shebang","check:tarball:shebang":"node ./scripts/add-shebang.mjs && node ./scripts/verify-tarball-shebang.mjs"},"_npmUser":{"name":"nick-ma","email":"honeyday.mj@gmail.com"},"repository":{"url":"git+https://github.com/DarkhorseOne/mcp-servers.git","type":"git"},"_npmVersion":"11.10.0","description":"MCP server for UK Parliament Treaties API","directories":{},"_nodeVersion":"25.4.0","dependencies":{"zod":"^4.3.6","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","tsup":"^8.3.5","vitest":"^3.2.4","typescript":"^5.9.2","@types/node":"^24.3.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-uk-parliament-treaties_1.0.0_1773236777730_0.7711668875868163","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@darkhorseone/mcp-server-uk-parliament-treaties","version":"1.0.1","description":"MCP server for UK Parliament Treaties API","license":"MIT","author":{"name":"DarkhorseOne Limited"},"homepage":"https://github.com/DarkhorseOne/mcp-servers","mcpName":"io.github.nick-ma/uk-parliament-treaties","repository":{"type":"git","url":"git+https://github.com/DarkhorseOne/mcp-servers.git"},"type":"module","bin":{"mcp-server-uk-parliament-treaties":"dist/index.js","mcp-server-uk-parliament-treaties-http":"dist/http.js"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsup src/index.ts src/http.ts --format esm --dts --clean","check:tarball:shebang":"node ./scripts/add-shebang.mjs && node ./scripts/verify-tarball-shebang.mjs","prepack":"pnpm run build && pnpm run check:tarball:shebang","prepublishOnly":"pnpm run check:tarball:shebang","typecheck":"tsc --noEmit -p tsconfig.json","lint":"pnpm run typecheck","test":"vitest run","dev":"tsx src/index.ts","start:http":"node dist/http.js","inspect:local":"pnpm run build && npx -y @modelcontextprotocol/inspector node ./dist/index.js","inspect:npm":"npx -y @modelcontextprotocol/inspector npx -y -p @darkhorseone/mcp-server-uk-parliament-treaties mcp-server-uk-parliament-treaties"},"dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","zod":"^4.3.6"},"devDependencies":{"@types/node":"^24.3.0","tsup":"^8.3.5","tsx":"^4.20.5","typescript":"^5.9.2","vitest":"^3.2.4"},"gitHead":"9183280f70f15cdbe601f078992ceb65b075dea2","_id":"@darkhorseone/mcp-server-uk-parliament-treaties@1.0.1","bugs":{"url":"https://github.com/DarkhorseOne/mcp-servers/issues"},"_nodeVersion":"25.4.0","_npmVersion":"11.10.0","dist":{"integrity":"sha512-U9IqX1VJ8hbzauDfdbSXtSkK6r2IAaN8YCAHIbM3EAL/z9k4502/9iH4pVVrFqW0l5NFv5foWAFnNxnAdLHong==","shasum":"59df4f4a11cc4a62ebbd9ad4e3b4df60ef5e16ef","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-treaties/-/mcp-server-uk-parliament-treaties-1.0.1.tgz","fileCount":7,"unpackedSize":28401,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICoVzCSQDGj+QN87Dh2Utbwu14uF4PbIzvo/HTQ91FeCAiBZAtyxC/V/EN4QBab8veFEMIHc58y57aakbJydtx0kCw=="}]},"_npmUser":{"name":"nick-ma","email":"honeyday.mj@gmail.com"},"directories":{},"maintainers":[{"name":"nick-ma","email":"honeyday.mj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-uk-parliament-treaties_1.0.1_1773359991038_0.5769349828940071"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T13:46:17.595Z","modified":"2026-03-12T23:59:51.350Z","1.0.0":"2026-03-11T13:46:17.895Z","1.0.1":"2026-03-12T23:59:51.217Z"},"bugs":{"url":"https://github.com/DarkhorseOne/mcp-servers/issues"},"author":{"name":"DarkhorseOne Limited"},"license":"MIT","homepage":"https://github.com/DarkhorseOne/mcp-servers","repository":{"type":"git","url":"git+https://github.com/DarkhorseOne/mcp-servers.git"},"description":"MCP server for UK Parliament Treaties API","maintainers":[{"name":"nick-ma","email":"honeyday.mj@gmail.com"}],"readme":"![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-blue)\n![AI Agent Ready](https://img.shields.io/badge/AI-Agent%20Ready-green)\n\n# UK Parliament Treaties MCP Server\n\n# Summary\nThis MCP server provides structured access to UK Parliament Treaties data using the Model Context Protocol.\nIt enables AI agents to retrieve treaties, business items, and government organisations through API-backed tools and data access.\nDevelopers can integrate the MCP server via stdio transport to query treaty metadata, series memberships, and parliamentary process status.\nThe server exposes tools that map directly to the Treaties API for reliable automation and AI agents workflows.\n\n## Features\n- Search treaties with filters for house, series, and parliamentary process status.\n- Retrieve treaty and business item details by ID.\n- Access government organisations and series memberships.\n- Preserve upstream payloads in a standardized envelope for downstream tools.\n\n## Available Tools\n### get_business_item_by_id\nReturns business item by ID.\n\nParameters:\n- id (string, path)\n\n### list_government_organisations\nReturns all government organisations.\n\n### list_series_memberships\nReturns all series memberships.\n\n### list_treaties\nReturns a list of treaties.\n\nParameters:\n- SearchText (string, query)\n- GovernmentOrganisationId (number, query)\n- Series (string, query) – CountrySeriesMembership | EuropeanUnionSeriesMembership | MiscellaneousSeriesMembership\n- ParliamentaryProcess (string, query) – NotConcluded | Concluded\n- DebateScheduled (boolean, query)\n- MotionsTabledAboutATreaty (boolean, query)\n- CommitteeRaisedConcerns (boolean, query)\n- House (string, query) – Commons | Lords\n- Skip (number, query)\n- Take (number, query)\n\n### get_treaty_by_id\nReturns a treaty by ID.\n\nParameters:\n- id (string, path)\n\n### list_business_items_by_treaty_id\nReturns business items belonging to the treaty with ID.\n\nParameters:\n- id (string, path)\n\n## Example Output\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"items\": [\n      {\n        \"treatyId\": \"CP123\",\n        \"title\": \"Example Treaty\",\n        \"house\": \"Commons\"\n      }\n    ],\n    \"totalResults\": 1\n  },\n  \"upstream_path\": \"/api/Treaty\",\n  \"retrieved_at\": \"2026-03-11T10:00:00.000Z\"\n}\n```\n\n## Quick Start\nRun the MCP server using npx:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-treaties mcp-server-uk-parliament-treaties\n```\n\n## MCP Configuration\nExample `mcpServers` configuration for stdio transport:\n\n```json\n{\n  \"mcpServers\": {\n    \"uk-parliament-treaties\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"-p\", \"@darkhorseone/mcp-server-uk-parliament-treaties\", \"mcp-server-uk-parliament-treaties\"],\n      \"env\": {\n        \"UPSTREAM_BASE_URL\": \"https://treaties-api.parliament.uk\",\n        \"REQUEST_TIMEOUT_MS\": \"10000\"\n      }\n    }\n  }\n}\n```\n\n## Example Usage\n- Search treaties by house and parliamentary process status.\n- Fetch a treaty by ID and review its metadata.\n- Retrieve business items linked to a treaty.\n- List government organisations associated with treaties.\n\n## Use Cases\n- AI agents summarizing treaty status and parliamentary scrutiny.\n- Research tools tracking treaty processes and schedules.\n- Civic tech platforms monitoring treaties by government body.\n- Automation workflows exporting treaty metadata for analysis.\n\n## Data Source\nUK Parliament Treaties API\nhttps://treaties-api.parliament.uk\n\n## Installation\nRun directly using npx:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-treaties mcp-server-uk-parliament-treaties\n```\n\nOr install via pnpm from the repository root:\n\n```bash\npnpm install\n```\n\n## Run (HTTP proxy server)\nBuild first, then start:\n\n```bash\npnpm --filter @darkhorseone/mcp-server-uk-parliament-treaties run build\npnpm --filter @darkhorseone/mcp-server-uk-parliament-treaties run start:http\n```\n\nSet a custom HTTP port with the `UKP_HTTP_PORT` environment variable (default: `8787`):\n\n```bash\nUKP_HTTP_PORT=8787 pnpm --filter @darkhorseone/mcp-server-uk-parliament-treaties run start:http\n```\n\nPublished package command:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-treaties -- mcp-server-uk-parliament-treaties-http\n```\n\nIf your shell cannot resolve the bin (\"command not found\"), run the HTTP entrypoint directly:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-treaties -- node ./dist/http.js\n```\n\nHealth check:\n\n```bash\ncurl http://127.0.0.1:8787/healthz\n```\n\nProxy pattern:\n\n```text\nGET /proxy/<upstream-path>?<query>\n```\n\nExample:\n\n```bash\ncurl \"http://127.0.0.1:8787/proxy/api/Treaty?House=Commons&Take=10\"\n```\n\n## License\nMIT License\n\n## MCP Metadata\nProtocol: Model Context Protocol\nTransport: stdio\nTools: get_business_item_by_id, list_government_organisations, list_series_memberships, list_treaties, get_treaty_by_id, list_business_items_by_treaty_id\n","readmeFilename":"README.md"}