@pipeworx/mcp-gov-uk-content 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Pipeworx
3
+ Copyright (c) 2026 Mojibake Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,13 +1,62 @@
1
- # mcp-gov-uk-content
1
+ # @pipeworx/gov-uk-content
2
2
 
3
- GOV.UK Content + Search APIs (every gov.uk page + full search)
3
+ [GOV.UK Content API](https://content-api.publishing.service.gov.uk/) MCP — the rendered content + metadata behind every page on gov.uk. Keyless.
4
4
 
5
- Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1683+ live data sources.
6
6
 
7
7
  ## Tools
8
8
 
9
- | Tool | Description |
10
- |------|-------------|
9
+ - `content(base_path)` — content for a gov.uk page (e.g. `/jobsearch`, `/government/organisations/cabinet-office`)
10
+ - `search(query, count?, start?, filter_format?)` — full GOV.UK search
11
+ - `organisations(start?, count?)` — list organisations (departments, agencies, …)
12
+ - `taxons(base_path?)` — taxonomy tree node
13
+ - `search_autocomplete(query)` — autocomplete on the search index
14
+
15
+ ## Data sources
16
+
17
+ - Content API: `https://www.gov.uk/api/content/`
18
+ - Search API: `https://www.gov.uk/api/search.json`
19
+
20
+ ## UK departmental manuals (fleet #1972)
21
+
22
+ Topic-level discovery over the largest body of official interpretation on
23
+ GOV.UK. All of it was reachable before only if you already knew the `base_path`
24
+ of the page you wanted — which is the one thing a caller asking a tax question
25
+ does not know.
26
+
27
+ Measured 2026-09-14 against `www.gov.uk/api/search.json`:
28
+
29
+ | `filter_format` | count |
30
+ |---|---:|
31
+ | `hmrc_manual` | 253 |
32
+ | `hmrc_manual_section` | 85,559 |
33
+ | `manual` (other departments) | 174 |
34
+ | `manual_section` | 2,658 |
35
+
36
+ - `hmrc_manuals(query?, include_other_departments?, count?, start?)` — which manuals exist, with their base_paths.
37
+ - `hmrc_manual_search(query, manual?, include_other_departments?, count?, start?)` — a UK tax question in plain words → the sections that answer it, each with `section_id`, `published_at`, `age_days`. `manual` accepts either `"employment-income-manual"` or the full `/hmrc-internal-manuals/employment-income-manual`.
38
+ - `hmrc_manual_section(base_path | manual + section_id, max_chars?)` — one section's full text, with `withdrawn`, `first_published_at`, `published_at`, `age_days`.
39
+ - `hmrc_manual_changes(manual, since?, section_id?, limit?)` — HMRC's own per-section revision log, **newest first**.
40
+
41
+ ### The freshness trap, written down because it returns a clean 200
42
+
43
+ A manual's `details.change_notes[]` is a complete revision history served
44
+ **oldest first** — 1,025 entries for the Employment Income Manual, running
45
+ 2016-08-02 to 2026-09-11. Reading `change_notes[0]` as "the latest change"
46
+ reports a ten-year-old edit as today's news, with no error anywhere.
47
+ `hmrc_manual_changes` sorts explicitly by `published_at` descending rather than
48
+ reversing, so a change in upstream ordering cannot silently invert the answer.
49
+
50
+ A **section's** own `public_updated_at` is the reliable per-section date and is
51
+ what every tool here returns as `source_last_modified`. Note it does **not**
52
+ equal the section's first change note: `EIM42776` has a change note published
53
+ 2016-08-02 and a `public_updated_at` of 2022-06-27.
54
+
55
+ ### Licence
56
+
57
+ Crown copyright, reproduced under the **Open Government Licence v3.0** —
58
+ commercial reuse permitted with attribution. These tools proxy `www.gov.uk` live
59
+ per request.
11
60
 
12
61
  ## Quick Start
13
62
 
@@ -23,7 +72,25 @@ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
23
72
  }
24
73
  ```
25
74
 
26
- Or connect to the full Pipeworx gateway for access to all 250+ data sources:
75
+ ### What this endpoint actually serves
76
+
77
+ `tools/list` at `https://gateway.pipeworx.io/gov-uk-content/mcp` returns the tools in the table
78
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
79
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
80
+ gateway-wide set. So the tool count you see is larger than this table: a
81
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
82
+ pack's own. The connection's `initialize` response states its exact scope, and
83
+ is the authoritative answer for a given day.
84
+
85
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
86
+ scoped connection answer a question this pack does not cover — via
87
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
88
+ second MCP server. There is currently no way to mount a pack endpoint without
89
+ them; if the extra schemas cost you more context than the routing is worth,
90
+ connect to the full gateway once rather than to several pack endpoints.
91
+
92
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
93
+ directly, instead of just this one's:
27
94
 
28
95
  ```json
29
96
  {
@@ -35,9 +102,50 @@ Or connect to the full Pipeworx gateway for access to all 250+ data sources:
35
102
  }
36
103
  ```
37
104
 
105
+ Both URLs reach the same gateway and the same 1683+ data sources. The
106
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
107
+ reaches all of them from either one.
108
+
109
+ ## No MCP client? Call it over HTTP
110
+
111
+ ```bash
112
+ curl -X POST https://gateway.pipeworx.io/v1/tools/content \
113
+ -H 'Content-Type: application/json' \
114
+ -d '{"base_path":"/guidance/apply-for-a-uk-visa"}'
115
+ ```
116
+
117
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/content`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
118
+
119
+ ## Standalone (no gateway account)
120
+
121
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
122
+ gateway round-trip:
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "gov-uk-content": {
128
+ "command": "npx",
129
+ "args": ["-y", "@pipeworx/mcp-gov-uk-content"]
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ Or run it directly to confirm it starts:
136
+
137
+ ```bash
138
+ npx -y @pipeworx/mcp-gov-uk-content
139
+ ```
140
+
141
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
142
+ for **only** this pack's tools — none of the shared meta-tools the gateway
143
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
144
+
38
145
  ## Using with ask_pipeworx
39
146
 
40
- Instead of calling tools directly, you can ask questions in plain English:
147
+ Instead of calling tools directly, you can ask questions in plain English —
148
+ this works on the pack endpoint above as well as on the full gateway:
41
149
 
42
150
  ```
43
151
  ask_pipeworx({ question: "your question about Gov Uk Content data" })
@@ -47,7 +155,7 @@ The gateway picks the right tool and fills the arguments automatically.
47
155
 
48
156
  ## More
49
157
 
50
- - [All tools and guides](https://github.com/pipeworx-io/examples)
158
+ - [Docs and guides](https://pipeworx.io/docs)
51
159
  - [pipeworx.io](https://pipeworx.io)
52
160
 
53
161
  ## License
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@pipeworx/mcp-gov-uk-content",
3
- "version": "0.1.0",
4
- "description": "GOV.UK Content + Search APIs (every gov.uk page + full search)",
3
+ "version": "0.1.2",
4
+ "description": "GOV.UK Content + Search APIs.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-gov-uk-content": "bin/cli.js"
10
+ },
8
11
  "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "gov-uk-content"],
9
12
  "license": "MIT",
10
13
  "repository": {
11
14
  "type": "git",
12
- "url": "https://github.com/pipeworx-io/mcp-gov-uk-content"
15
+ "url": "git+https://github.com/pipeworx-io/mcp-gov-uk-content.git"
13
16
  },
14
17
  "scripts": {
15
18
  "typecheck": "tsc --noEmit"
16
19
  },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
17
24
  "devDependencies": {
18
- "typescript": "^5.7.0"
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-6fd0ef686e3b5d7f621bdbff1f5f97f74bf1b4e2aa9050b3e79077df4da30283",
30
+ "sourceCommit": "1064560fd9dcd0d6fc2606298c2ba244b3a1fbeb"
19
31
  }
20
32
  }
package/server.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.pipeworx-io/gov-uk-content",
4
4
  "title": "Gov Uk Content",
5
- "description": "GOV.UK Content + Search APIs (every gov.uk page + full search)",
6
- "version": "0.1.0",
5
+ "description": "GOV.UK Content + Search APIs.",
6
+ "version": "0.1.2",
7
7
  "websiteUrl": "https://pipeworx.io/packs/gov-uk-content",
8
8
  "repository": {
9
9
  "url": "https://github.com/pipeworx-io/mcp-gov-uk-content",