Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,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://<host>/mcp
uv run python scripts/build_chatgpt_archive.py uk-open-data --connector-url https://<staging host>/mcp
```

This writes `dist/uk-open-data-chatgpt-<version>.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/<plugin>/platforms/chatgpt.json`. `dist/` is not committed.
This writes `dist/uk-open-data-chatgpt-<version>.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/<plugin>/platforms/chatgpt.json`. `dist/` is not committed.

## Commits and pull requests

Expand Down
3 changes: 2 additions & 1 deletion plugins/uk-open-data/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
8 changes: 8 additions & 0 deletions plugins/uk-open-data/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"kindtech": {
"type": "http",
"url": "https://app.kindte.ch/mcp"
}
}
}
33 changes: 29 additions & 4 deletions plugins/uk-open-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,35 @@ 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.
- **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.
<!-- TODO: confirm the 30 days on the live app (Log Analytics retentionInDays) before merging. -->
- **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

Expand Down
22 changes: 18 additions & 4 deletions scripts/build_chatgpt_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions tests/test_build_chatgpt_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
)
Expand Down