{"_id":"@darkhorseone/mcp-server-uk-parliament-erskinemay","_rev":"2-83bf98a03af223465c8767fc518b8c3b","name":"@darkhorseone/mcp-server-uk-parliament-erskinemay","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@darkhorseone/mcp-server-uk-parliament-erskinemay","version":"1.0.0","author":{"name":"DarkhorseOne Limited"},"license":"MIT","_id":"@darkhorseone/mcp-server-uk-parliament-erskinemay@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-erskinemay":"dist/index.js","mcp-server-uk-parliament-erskinemay-http":"dist/http.js"},"dist":{"shasum":"dcb3920806e1d95c05509b131844560c9a44b0d2","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-erskinemay/-/mcp-server-uk-parliament-erskinemay-1.0.0.tgz","fileCount":7,"integrity":"sha512-k3U4dsI9W+yLzTbiIIiErSAYQLQ62YxYWU+03eV4qr2fYGzQYGfAFD0NL4WqUm5ZN7yvTDzaPSzDiOaH87MPzA==","signatures":[{"sig":"MEYCIQDWO5RYDrbf8oQdPuNba58TovlQy0QJWXQrG1nA3hW5TQIhAIxyHLe2xNBGP9efzfIz05xsnofPm8OSlQsb9tE2jTG/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30105},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"4835f8e8d7d8ccd2d78e7f78eecb3976495a1a09","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","check":"pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build","prepack":"pnpm run build && pnpm run check:tarball:shebang","dev:http":"tsx src/http.ts","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-erskinemay mcp-server-uk-parliament-erskinemay","inspect:local":"pnpm run build && npx -y @modelcontextprotocol/inspector node ./dist/index.js","prepublishOnly":"pnpm run check:tarball:shebang","check:tarball:shebang":"pnpm run build && 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 Erskine May 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-erskinemay_1.0.0_1773240115690_0.37141764280434497","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@darkhorseone/mcp-server-uk-parliament-erskinemay","version":"1.0.1","description":"MCP server for UK Parliament Erskine May API","license":"MIT","author":{"name":"DarkhorseOne Limited"},"homepage":"https://github.com/DarkhorseOne/mcp-servers","mcpName":"io.github.nick-ma/uk-parliament-erskinemay","repository":{"type":"git","url":"git+https://github.com/DarkhorseOne/mcp-servers.git"},"type":"module","bin":{"mcp-server-uk-parliament-erskinemay":"dist/index.js","mcp-server-uk-parliament-erskinemay-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":"pnpm run build && 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","dev:http":"tsx src/http.ts","start:http":"node dist/http.js","check":"pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build","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-erskinemay mcp-server-uk-parliament-erskinemay"},"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":"bde3ba2ef484eacdf06a9251f3cbd46803cf1851","_id":"@darkhorseone/mcp-server-uk-parliament-erskinemay@1.0.1","bugs":{"url":"https://github.com/DarkhorseOne/mcp-servers/issues"},"_nodeVersion":"25.4.0","_npmVersion":"11.10.0","dist":{"integrity":"sha512-J1bTEULYAPxHQmx1sX7zVMUHGSHNIl4cpEM1A1QGBdhRzNI5UR2dHdfaOOfrtysSDT2HsBcg9baBlVdsVJb3vw==","shasum":"0e906f6d220504a82a5211d977afc5cc9663907a","tarball":"https://registry.npmjs.org/@darkhorseone/mcp-server-uk-parliament-erskinemay/-/mcp-server-uk-parliament-erskinemay-1.0.1.tgz","fileCount":7,"unpackedSize":31894,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE0SBONZJFOC3wPSMhdzOl9BAL3PlRd2s4p+k5a48zeWAiEAvZlffuu/ugHHpXW+zof+oiQJiaLMeXneTTJCkZS9EDo="}]},"_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-erskinemay_1.0.1_1773358834703_0.04177266133918556"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T14:41:55.567Z","modified":"2026-03-12T23:40:35.004Z","1.0.0":"2026-03-11T14:41:55.835Z","1.0.1":"2026-03-12T23:40:34.843Z"},"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 Erskine May 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 Erskine May MCP Server\n\n# Summary\nThis MCP server provides structured access to UK Parliament Erskine May content using the Model Context Protocol.\nIt enables AI agents to query chapters, parts, sections, and index terms through API-backed tools for reliable data access.\nDevelopers can connect the MCP server via stdio transport to retrieve authoritative procedural guidance and references.\nThe server exposes tools that map directly to the Erskine May API for search and lookup workflows.\n\n## Features\n- Retrieve chapters, parts, sections, and section overviews by identifier.\n- Browse and search index terms and paragraphs by keyword.\n- Support structured lookups with consistent response envelopes.\n- Preserve upstream JSON payloads for downstream tools and AI agents.\n\n## Available Tools\n### get_chapter_by_chapter_number\nReturns a single chapter overview by chapter number.\n\nParameters:\n- chapterNumber (number, path) – Chapter number.\n\n### browse_index_terms\nReturns a list of index terms by start letter.\n\nParameters:\n- startLetter (string, query)\n- skip (number, query)\n- take (number, query)\n\n### get_index_term_by_index_term_id\nReturns an index term by id.\n\nParameters:\n- indexTermId (number, path) – Index term id.\n\n### list_parts\nReturns a list of all parts.\n\n### get_part_by_part_number\nReturns a part by part number.\n\nParameters:\n- partNumber (number, path) – Part number.\n\n### search_index_term_results_by_search_term\nReturns a list of index terms which contain the search term.\n\nParameters:\n- searchTerm (string, path)\n- skip (number, query)\n- take (number, query)\n\n### get_paragraph_by_reference\nReturns a section overview by reference.\n\nParameters:\n- reference (string, path)\n\n### search_paragraph_results_by_search_term\nReturns a list of paragraphs which contain the search term.\n\nParameters:\n- searchTerm (string, path)\n- skip (number, query)\n- take (number, query)\n\n### search_section_results_by_search_term\nReturns a list of sections which contain the search term.\n\nParameters:\n- searchTerm (string, path)\n- skip (number, query)\n- take (number, query)\n\n### get_section_by_section_id\nReturns a section by section id.\n\nParameters:\n- sectionId (number, path)\n\n### get_section_overview_by_section_id_and_step\nReturns a section overview by section id and step.\n\nParameters:\n- sectionId (number, path)\n- step (number, path)\n\n## Example Output\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"sectionId\": 12,\n    \"title\": \"Order in debate\",\n    \"content\": \"...\"\n  },\n  \"upstream_path\": \"/api/Section/12\",\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-erskinemay mcp-server-uk-parliament-erskinemay\n```\n\n## MCP Configuration\nExample `mcpServers` configuration for stdio transport:\n\n```json\n{\n  \"mcpServers\": {\n    \"uk-parliament-erskinemay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"-p\", \"@darkhorseone/mcp-server-uk-parliament-erskinemay\", \"mcp-server-uk-parliament-erskinemay\"],\n      \"env\": {\n        \"UPSTREAM_BASE_URL\": \"https://erskinemay-api.parliament.uk\",\n        \"REQUEST_TIMEOUT_MS\": \"10000\"\n      }\n    }\n  }\n}\n```\n\n## Example Usage\n- Fetch a chapter by chapter number.\n- Search sections for a keyword and paginate results.\n- Retrieve a section overview by id and step.\n- Browse index terms starting with a letter.\n\n## Use Cases\n- AI agents answering procedural questions with authoritative references.\n- Legal or parliamentary research tools mapping sections and paragraphs.\n- Civic tech workflows enriching datasets with Erskine May references.\n- Automation systems that index procedural content for retrieval.\n\n## Data Source\nUK Parliament Erskine May API\nhttps://erskinemay-api.parliament.uk\n\n## Installation\nRun directly using npx:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-erskinemay mcp-server-uk-parliament-erskinemay\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-erskinemay run build\npnpm --filter @darkhorseone/mcp-server-uk-parliament-erskinemay run start:http\n```\n\nSet a custom HTTP port with the `UKP_HTTP_PORT` environment variable (default: `3000`):\n\n```bash\nUKP_HTTP_PORT=3000 pnpm --filter @darkhorseone/mcp-server-uk-parliament-erskinemay run start:http\n```\n\nPublished package command:\n\n```bash\nnpx -y -p @darkhorseone/mcp-server-uk-parliament-erskinemay -- mcp-server-uk-parliament-erskinemay-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-erskinemay -- node ./dist/http.js\n```\n\nHealth check:\n\n```bash\ncurl http://127.0.0.1:3000/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:3000/proxy/api/Part\"\n```\n\n## License\nMIT License\n\n## MCP Metadata\nProtocol: Model Context Protocol\nTransport: stdio\nTools: 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\n","readmeFilename":"README.md"}