{"_id":"@darkhorseone/mcp-server-uk-parliament-questions-statements","_rev":"2-9a22c26575e0de9b3daff366d22cdacc","name":"@darkhorseone/mcp-server-uk-parliament-questions-statements","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@darkhorseone/mcp-server-uk-parliament-questions-statements","version":"1.0.0","author":{"name":"DarkhorseOne Limited"},"license":"MIT","_id":"@darkhorseone/mcp-server-uk-parliament-questions-statements@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-questions-statements":"dist/index.js","mcp-server-uk-parliament-questions-statements-http":"dist/http.js"},"dist":{"shasum":"65731ca313ed1714fb96c0ae6f594cdb5958283f","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-questions-statements/-/mcp-server-uk-parliament-questions-statements-1.0.0.tgz","fileCount":7,"integrity":"sha512-CB7cInYtvBf5sza+8WzcVdgxOHtO8N2tdhdaB6YiZQ6SmSXRIYhEpQ5X0CyddWdeeBhPA48CnkoO8LbkKE0xmQ==","signatures":[{"sig":"MEUCIQCK6yWIyX9mdWa6wZNrbo0xMIB0hOEMXoaGu45NUhXV2gIgAUqM6PsajeWISHyVmqn5hd4V6ACf6/xpGfvhdlYYqH8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37239},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"9473d6c2c0d61fef45532ab27caae925238b8d95","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 && node ./scripts/add-shebang.mjs","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-questions-statements mcp-server-uk-parliament-questions-statements","inspect:local":"pnpm run build && npx -y @modelcontextprotocol/inspector node ./dist/index.js","prepublishOnly":"pnpm run check:tarball:shebang","check:tarball:shebang":"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 Questions and Statements 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-questions-statements_1.0.0_1773254015515_0.7571096320579014","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@darkhorseone/mcp-server-uk-parliament-questions-statements","version":"1.0.1","description":"MCP server for UK Parliament Questions and Statements API","license":"MIT","author":{"name":"DarkhorseOne Limited"},"homepage":"https://github.com/DarkhorseOne/mcp-servers","mcpName":"io.github.nick-ma/uk-parliament-questions-statements","repository":{"type":"git","url":"git+https://github.com/DarkhorseOne/mcp-servers.git"},"type":"module","bin":{"mcp-server-uk-parliament-questions-statements":"dist/index.js","mcp-server-uk-parliament-questions-statements-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 && node ./scripts/add-shebang.mjs","check:tarball:shebang":"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-questions-statements mcp-server-uk-parliament-questions-statements"},"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-questions-statements@1.0.1","bugs":{"url":"https://github.com/DarkhorseOne/mcp-servers/issues"},"_nodeVersion":"25.4.0","_npmVersion":"11.10.0","dist":{"integrity":"sha512-7rz9azStwDX0VycUR3GSVg6Murqc7gE/Y0Xs8CgauwsCEOwL4kFI3SiQInmgAO5+aGFVvp330SDsiGDdqKneeQ==","shasum":"cb4926cc268ae3ffd4791236dd20eddd4a53fde2","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-questions-statements/-/mcp-server-uk-parliament-questions-statements-1.0.1.tgz","fileCount":7,"unpackedSize":40113,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBJ+vVK/2EMIGVJdhZRUCptrHXXOYmpB1eB9g2PYyTnoAiEAj0b3xyD5YXoKR9jdVmCJvz0S5l4EFT+5A5QKZlJZWB4="}]},"_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-questions-statements_1.0.1_1773360087713_0.5243291532992091"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T18:33:35.401Z","modified":"2026-03-13T00:01:28.326Z","1.0.0":"2026-03-11T18:33:35.691Z","1.0.1":"2026-03-13T00:01:27.862Z"},"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 Questions and Statements 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 Questions and Statements MCP Server\n\n# Summary\nThis MCP server provides structured access to UK Parliament Questions and Statements data using the Model Context Protocol.\nIt enables AI agents to retrieve daily reports, written questions, and written statements through API-backed tools and data access.\nDevelopers can integrate the MCP server via stdio transport to search questions, filter by session status, and fetch statement details.\nThe server exposes tools that map directly to the Questions and Statements API for reliable automation and AI agents workflows.\n\n## Features\n- List daily reports with date and house filters.\n- Search written questions with answering, member, and session filters.\n- Retrieve written questions and statements by id or date/uin.\n- Preserve upstream payloads in a standardized envelope for downstream tools.\n\n## Available Tools\n### list_daily_reports\nReturns a list of daily reports.\n\nParameters:\n- dateFrom (string, query)\n- dateTo (string, query)\n- house (string, query) – Bicameral | Commons | Lords\n- skip (number, query)\n- take (number, query)\n\n### list_written_questions\nReturns a list of written questions.\n\nParameters:\n- askingMemberId (number, query)\n- answeringMemberId (number, query)\n- tabledWhenFrom (string, query)\n- tabledWhenTo (string, query)\n- dateForAnswerWhenFrom (string, query)\n- dateForAnswerWhenTo (string, query)\n- answered (string, query) – Any | Answered | Unanswered\n- answeredWhenFrom (string, query)\n- answeredWhenTo (string, query)\n- questionStatus (string, query) – NotAnswered | AnsweredOnly | AllQuestions\n- includeWithdrawn (boolean, query)\n- expandMember (boolean, query)\n- correctedWhenFrom (string, query)\n- correctedWhenTo (string, query)\n- sessionStatus (string, query) – Current | Any\n- searchTerm (string, query)\n- uIN (string, query)\n- answeringBodies (array:number, query)\n- members (array:number, query)\n- house (string, query) – Bicameral | Commons | Lords\n- skip (number, query)\n- take (number, query)\n\n### get_written_question_by_id\nReturns a written question.\n\nParameters:\n- id (number, path)\n- expandMember (boolean, query)\n- sessionStatus (string, query) – Current | Any\n\n### get_written_question_by_date_and_uin\nReturns a written question.\n\nParameters:\n- date (string, path)\n- uin (string, path)\n- expandMember (boolean, query)\n- sessionStatus (string, query) – Current | Any\n\n### list_written_statements\nReturns a list of written statements.\n\nParameters:\n- madeWhenFrom (string, query)\n- madeWhenTo (string, query)\n- sessionStatus (string, query) – Current | Any\n- searchTerm (string, query)\n- uIN (string, query)\n- answeringBodies (array:number, query)\n- members (array:number, query)\n- house (string, query) – Bicameral | Commons | Lords\n- skip (number, query)\n- take (number, query)\n- expandMember (boolean, query)\n\n### get_written_statement_by_id\nReturns a written statement.\n\nParameters:\n- id (number, path)\n- expandMember (boolean, query)\n- sessionStatus (string, query) – Current | Any\n\n### get_written_statement_by_date_and_uin\nReturns a written statement.\n\nParameters:\n- date (string, path)\n- uin (string, path)\n- expandMember (boolean, query)\n- sessionStatus (string, query) – Current | Any\n\n## Example Output\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"items\": [\n      {\n        \"id\": 12345,\n        \"uin\": \"12345\",\n        \"title\": \"Example written question\",\n        \"house\": \"Commons\"\n      }\n    ],\n    \"totalResults\": 1\n  },\n  \"upstream_path\": \"/api/writtenquestions/questions\",\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-questions-statements mcp-server-uk-parliament-questions-statements\n```\n\n## MCP Configuration\nExample `mcpServers` configuration for stdio transport:\n\n```json\n{\n  \"mcpServers\": {\n    \"uk-parliament-questions-statements\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"-p\", \"@darkhorseone/mcp-server-uk-parliament-questions-statements\", \"mcp-server-uk-parliament-questions-statements\"],\n      \"env\": {\n        \"UPSTREAM_BASE_URL\": \"https://questions-statements-api.parliament.uk\",\n        \"REQUEST_TIMEOUT_MS\": \"10000\"\n      }\n    }\n  }\n}\n```\n\n## Example Usage\n- List daily reports for the Commons over a date range.\n- Search written questions by member and session status.\n- Retrieve a written statement by id or date/uin.\n- Filter questions by answered status and house.\n\n## Use Cases\n- AI agents summarizing written questions and statements.\n- Research tools tracking parliamentary questions over time.\n- Civic tech platforms monitoring statements by department.\n- Automation workflows exporting daily report data.\n\n## Data Source\nUK Parliament Questions and Statements API\nhttps://questions-statements-api.parliament.uk\n\n## Installation\nRun directly using npx:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements mcp-server-uk-parliament-questions-statements\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-questions-statements run build\npnpm --filter @darkhorseone/mcp-server-uk-parliament-questions-statements 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-questions-statements run start:http\n```\n\nPublished package command:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-questions-statements -- mcp-server-uk-parliament-questions-statements-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-questions-statements -- 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/writtenquestions/questions?searchTerm=health&take=10\"\n```\n\n## License\nMIT License\n\n## MCP Metadata\nProtocol: Model Context Protocol\nTransport: stdio\nTools: list_daily_reports, list_written_questions, get_written_question_by_id, get_written_question_by_date_and_uin, list_written_statements, get_written_statement_by_id, get_written_statement_by_date_and_uin\n","readmeFilename":"README.md"}