From f3ca64c743d6b078df77afef8827877c21828e2c Mon Sep 17 00:00:00 2001 From: billlyzhaoyh Date: Sun, 22 Nov 2026 20:13:04 +0000 Subject: [PATCH 1/2] feat: ship the Kindtech connector with the uk-open-data plugin Installing the plugin now adds the Kindtech connector, so a skill can work out figures from totals in a chat (gap S3). Hold this until https://app.kindte.ch/mcp is live. - plugins/uk-open-data/.mcp.json names the connector. The ChatGPT build reads its address from there, so it is written in one place; --connector-url still replaces it for one build. - The plugin README says what reaches the connector and what it passes on, and plugin.json points at that section as the privacy policy. --- AGENTS.md | 4 +-- .../uk-open-data/.claude-plugin/plugin.json | 3 +- plugins/uk-open-data/.mcp.json | 8 ++++++ plugins/uk-open-data/README.md | 28 ++++++++++++++++--- scripts/build_chatgpt_archive.py | 22 ++++++++++++--- tests/test_build_chatgpt_archive.py | 18 ++++++++++++ 6 files changed, 72 insertions(+), 11 deletions(-) create mode 100644 plugins/uk-open-data/.mcp.json diff --git a/AGENTS.md b/AGENTS.md index 5f18f3c..de00747 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -124,10 +124,10 @@ The plugin folders are the one source. A build step writes each other assistant' ```bash uv run python scripts/build_chatgpt_archive.py uk-open-data -uv run python scripts/build_chatgpt_archive.py uk-open-data --connector-url https:///mcp +uv run python scripts/build_chatgpt_archive.py uk-open-data --connector-url https:///mcp ``` -This writes `dist/uk-open-data-chatgpt-.zip` in the portable [Agent Plugins](https://agent-plugins.org) layout: `plugin.json`, `skills/` without the eval folders, and `mcp.json` when a connector address is given. The listing text ChatGPT shows comes from `plugins//platforms/chatgpt.json`. `dist/` is not committed. +This writes `dist/uk-open-data-chatgpt-.zip` in the portable [Agent Plugins](https://agent-plugins.org) layout: `plugin.json`, `skills/` without the eval folders, and `mcp.json` when the plugin has a connector. The connector's address is written once, in the plugin's `.mcp.json`, which also starts it when the plugin is installed in Claude Code. `--connector-url` replaces that address for one build, such as a test against a staging server. The listing text ChatGPT shows comes from `plugins//platforms/chatgpt.json`. `dist/` is not committed. ## Commits and pull requests diff --git a/plugins/uk-open-data/.claude-plugin/plugin.json b/plugins/uk-open-data/.claude-plugin/plugin.json index 00b014f..af5a513 100644 --- a/plugins/uk-open-data/.claude-plugin/plugin.json +++ b/plugins/uk-open-data/.claude-plugin/plugin.json @@ -9,5 +9,6 @@ "homepage": "https://github.com/KindTechUK/plugins", "repository": "https://github.com/KindTechUK/plugins", "license": "Apache-2.0", - "keywords": ["charity", "nonprofit", "uk", "open-data", "deprivation", "grants"] + "keywords": ["charity", "nonprofit", "uk", "open-data", "deprivation", "grants"], + "privacyPolicyUrl": "https://github.com/KindTechUK/plugins/blob/main/plugins/uk-open-data/README.md#privacy" } diff --git a/plugins/uk-open-data/.mcp.json b/plugins/uk-open-data/.mcp.json new file mode 100644 index 0000000..cbce0f9 --- /dev/null +++ b/plugins/uk-open-data/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "kindtech": { + "type": "http", + "url": "https://app.kindte.ch/mcp" + } + } +} diff --git a/plugins/uk-open-data/README.md b/plugins/uk-open-data/README.md index a864a7e..3bcf78e 100644 --- a/plugins/uk-open-data/README.md +++ b/plugins/uk-open-data/README.md @@ -9,10 +9,30 @@ The skills here work in two ways. Where the assistant can run commands, they use `uk-open-data` command on your own computer. In a chat app, they use the Kindtech connector, which takes totals only. -What you can get today, 20 November 2026: the skills, from this repository. The command -is not released yet and the connector is not open to the public yet, so for now a skill -words a result you already hold, tells you which totals to bring, and gives no figure of -its own. This paragraph changes when they open. +Installing the plugin in Claude Code also adds the Kindtech connector, at +`https://app.kindte.ch/mcp`, so a skill can work out figures from totals in the chat. In +another assistant, add that address as a connector yourself. + +## Privacy + +What leaves your computer depends on how a skill gets its figures. + +- **The Kindtech connector**, at `https://app.kindte.ch/mcp`, hosted on Azure in the UK + South region. It is given totals only: counts or volumes for each area or group. It refuses + a row about one person or one site, a full postcode and a street address. Every tool only + reads: nothing you send is changed or published. Its log records one line for each answer + it gives: which analysis ran, what kind of totals it was given, and that the answer was + given in a chat. +- **Public services it asks.** To place a postcode district, the connector may ask + postcodes.io when it holds no postcode table of its own. To draw a map, it fetches public + area outlines from the ONS by area code. Each result says what was sent, under + `privacy.sent_to_third_parties`. +- **The `uk-open-data` command** runs on your own computer. Postcodes in your file are sent + to postcodes.io, and nothing else from the file, unless a postcode table is installed + there. Before the first run, the skill tells you which will happen and lets you choose. + +The assistant you use sees the totals you give it and what comes back. Its own privacy +terms apply to that. ## Install diff --git a/scripts/build_chatgpt_archive.py b/scripts/build_chatgpt_archive.py index 5fabc9b..1736409 100644 --- a/scripts/build_chatgpt_archive.py +++ b/scripts/build_chatgpt_archive.py @@ -4,12 +4,13 @@ uv run python scripts/build_chatgpt_archive.py uk-open-data uv run python scripts/build_chatgpt_archive.py uk-open-data \ - --connector-url https://example.org/mcp + --connector-url https://staging.example.org/mcp The plugin folders here are laid out for one assistant's marketplace. This script writes the same skills in the portable Agent Plugins layout that ChatGPT reads: -a ``plugin.json`` at the root, ``skills/`` beside it, and ``mcp.json`` when a -connector address is given. Eval folders are left out. Nothing in the plugin +a ``plugin.json`` at the root, ``skills/`` beside it, and ``mcp.json`` when the +plugin's ``.mcp.json`` names the connector or ``--connector-url`` gives an address, +which wins. Eval folders are left out. Nothing in the plugin folder is changed. """ @@ -54,7 +55,7 @@ def main(argv: list[str] | None = None) -> int: parser.add_argument("plugin", help="the folder name under plugins/") parser.add_argument( "--connector-url", - help="the https address of the hosted connector; leave out for skills only", + help="the connector's https address, in place of the plugin's .mcp.json", ) parser.add_argument("--root", default=".", type=Path, help="the repository root") parser.add_argument("--out", default="dist", type=Path, help="the output folder") @@ -103,6 +104,7 @@ def collect_files( if not skills: raise BuildError(f"{plugin_dir} has no skill to package") files.update(skills) + connector_url = connector_url or plugin_connector_url(plugin_dir) if connector_url: files["mcp.json"] = _as_json(mcp_config(connector_url)) licence = root / "LICENSE" @@ -131,6 +133,18 @@ def portable_manifest(source: dict, plugin_dir: Path) -> dict: return manifest +def plugin_connector_url(plugin_dir: Path) -> str | None: + """Return the connector address the plugin's own ``.mcp.json`` names, if any.""" + path = plugin_dir / ".mcp.json" + if not path.is_file(): + return None + server = json.loads(path.read_text(encoding="utf-8")).get("mcpServers", {}) + url = server.get(CONNECTOR_NAME, {}).get("url") + if not url: + raise BuildError(f'{path} has no "url" for the "{CONNECTOR_NAME}" server') + return str(url) + + def mcp_config(connector_url: str) -> dict: """Describe the hosted connector: one remote server that needs no sign-in.""" parts = urlsplit(connector_url) diff --git a/tests/test_build_chatgpt_archive.py b/tests/test_build_chatgpt_archive.py index 29e3d03..d0d4d92 100644 --- a/tests/test_build_chatgpt_archive.py +++ b/tests/test_build_chatgpt_archive.py @@ -79,6 +79,24 @@ def test_connector_address_adds_one_remote_server(repo: Path) -> None: assert server["extensions"]["com.openai"]["auth"] == {"type": "none"} +def test_connector_address_comes_from_the_plugin_unless_given(repo: Path) -> None: + server = {"type": "http", "url": "https://example.org/mcp"} + config = {"mcpServers": {"kindtech": server}} + _write(repo / "plugins" / "uk-open-data" / ".mcp.json", json.dumps(config)) + from_plugin = build.build_archive(repo, "uk-open-data", repo / "a") + given = build.build_archive( + repo, "uk-open-data", repo / "b", "https://staging.example.org/mcp" + ) + with zipfile.ZipFile(from_plugin) as built: + assert json.loads(built.read("mcp.json"))["mcpServers"]["kindtech"]["url"] == ( + "https://example.org/mcp" + ) + with zipfile.ZipFile(given) as built: + assert json.loads(built.read("mcp.json"))["mcpServers"]["kindtech"]["url"] == ( + "https://staging.example.org/mcp" + ) + + @pytest.mark.parametrize( "url", ["http://example.org/mcp", "example.org/mcp", "https://me:pw@example.org"] ) From d31d7eadb2b441e3994419c291b61bf9514a3aaa Mon Sep 17 00:00:00 2001 From: billlyzhaoyh Date: Sun, 29 Nov 2026 23:08:05 +0000 Subject: [PATCH 2/2] docs: say what the connector's log holds and how long it is kept The Privacy section said the log records one line per answer. The hosted app also logs a short note when a source or map fails, and a failed fetch of outlines from the ONS can name the area codes asked for. Request logs are off, so no IP address is logged. The 30 days of retention is Azure's default and is marked to confirm on the live app before merging. --- plugins/uk-open-data/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/uk-open-data/README.md b/plugins/uk-open-data/README.md index 3bcf78e..15d9e29 100644 --- a/plugins/uk-open-data/README.md +++ b/plugins/uk-open-data/README.md @@ -20,9 +20,14 @@ What leaves your computer depends on how a skill gets its figures. - **The Kindtech connector**, at `https://app.kindte.ch/mcp`, hosted on Azure in the UK South region. It is given totals only: counts or volumes for each area or group. It refuses a row about one person or one site, a full postcode and a street address. Every tool only - reads: nothing you send is changed or published. Its log records one line for each answer - it gives: which analysis ran, what kind of totals it was given, and that the answer was - given in a chat. + reads: nothing you send is changed or published. +- **What the connector logs.** It does not log the totals you send, and request logs, which + would hold your IP address, are switched off. It records one line for each answer it gives + (which analysis ran, what kind of totals it was given, and that the answer was given in a + chat) and a short note when something goes wrong, such as a data source that could not be + reached or a map that was not drawn. If fetching area outlines from the ONS fails, that + note can include the area codes it asked for. The logs are kept in Azure for 30 days. + - **Public services it asks.** To place a postcode district, the connector may ask postcodes.io when it holds no postcode table of its own. To draw a map, it fetches public area outlines from the ONS by area code. Each result says what was sent, under