Skip to content

Serve the ICP MCP privacy policy at /privacy-policy - #112

Merged
aterga merged 3 commits into
mainfrom
claude/privacy-policy-page-p4el4n
Jul 31, 2026
Merged

aterga merged 3 commits into
mainfrom
claude/privacy-policy-page-p4el4n

Conversation

@aterga

@aterga aterga commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Serves the ICP MCP privacy policy at https://mcp.internetcomputer.org/privacy-policy — the venue decided for the Anthropic Connectors Directory submission (#109), where a public privacy-policy URL is a hard requirement ("missing or incomplete privacy policies result in immediate rejection").

The page follows the landing page's exact pattern: a single self-contained HTML document compiled into the binary via include_str! (no runtime file I/O, no external fonts/scripts/images), sharing the connect flow's ICP identity — parchment grid, editorial serif headings, rust accent, light/dark themes, and the "Hosted by DFINITY" mark (the wordmark SVG is the page's one substitution, inlined once on first use via OnceLock).

The policy text is the reviewed draft from #109 (docs/icp-mcp-privacy-policy-draft.md), incorporating all review corrections (cookie name mcp_connect, on-disk OAuth registrations, actual log contents, user-directed third-party sharing, disconnect-vs-revocation distinction). The effective date is set: August 3, 2026.

Merging publishes the page on staging immediately; production serves it at the next release-* tag. A follow-up should link the page from the landing-page bundle (the landing page is a compiled design bundle, so its footer link needs a bundle regeneration).

Related issues

Companion to #109 (submission package; blocker 1). The retention bound the policy's section 3 relies on merged in #111.

Changes

  • Add src/assets/privacy-policy.html — the policy as a self-contained, theme-aware page with a __LOGO__ placeholder.
  • src/main.rs: add the /privacy-policy route beside /, with a OnceLock-cached one-time logo substitution.

Testing

  • cargo build --locked --all-targets
  • cargo test --locked --all-targets (all suites pass)
  • cargo clippy --locked --bin imcp2 — no warnings introduced by this change (pre-existing lib warnings unchanged); cargo fmt --check reports tree-wide diffs from a newer local rustfmt on untouched files, so no reformat was applied
  • Live smoke test: ran the binary locally; GET /privacy-policy → 200, ~18 KB, __LOGO__ fully substituted, correct <title>, DFINITY mark inlined
  • npm test --prefix monitoring/mcp-status — n/a, dashboard unchanged

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change.
  • No secrets, credentials, or internal-only information are included.

The Anthropic connectors-directory submission requires a public
privacy-policy URL, decided as mcp.internetcomputer.org/privacy-policy
(#109). The page follows the landing page's pattern: a self-contained
HTML document compiled in via include_str!, sharing the connect flow's
ICP identity (parchment grid, editorial serif, rust accent, hosted-by
mark, light/dark), with the DFINITY wordmark inlined once on first use.

The text is the legal-review draft from #109
(docs/icp-mcp-privacy-policy-draft.md); the effective date is a
conspicuous placeholder. NOT to be merged until legal approves the
wording and the date is set: merging publishes the page on staging
immediately and on production at the next release tag.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a self-contained ICP MCP privacy policy page for the Anthropic Connectors Directory.

Changes:

  • Adds the styled privacy-policy HTML.
  • Serves it at /privacy-policy with an inlined DFINITY logo.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/main.rs Adds page assembly and routing.
src/assets/privacy-policy.html Defines the privacy-policy content and styling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/assets/privacy-policy.html Resolved
Comment thread src/main.rs Resolved
The route comment claimed the landing page points at /privacy-policy;
that link is a follow-up (the landing page is a compiled bundle).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw
@aterga
aterga marked this pull request as ready for review July 31, 2026 15:03
@aterga
aterga requested review from a team and Copilot July 31, 2026 15:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/assets/privacy-policy.html:26

  • In dark mode, --accent: #c25a37 has only about a 4.31:1 contrast ratio against --bg: #14110d, below the WCAG AA 4.5:1 requirement for the normal-sized link text that uses this color. A slightly lighter rust tone such as #cc6342 preserves the design while raising the contrast above 4.5:1.
    --muted: #9a9384; --accent: #c25a37; --hairline: #342e25; --grid: rgba(240, 235, 224, 0.05);

Copilot AI review requested due to automatic review settings July 31, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/assets/privacy-policy.html:26

  • The dark-mode accent has only about 4.3:1 contrast against --bg, below the WCAG AA 4.5:1 requirement for the normal-sized links used throughout the policy. Use a slightly lighter accent (the suggested value is about 4.9:1 against --bg and also passes against --surface).
    --muted: #9a9384; --accent: #c25a37; --hairline: #342e25; --grid: rgba(240, 235, 224, 0.05);

@aterga
aterga merged commit 8ca0a1d into main Jul 31, 2026
8 checks passed
aterga added a commit that referenced this pull request Jul 31, 2026
…t, landing-page link (#109)

* docs: add the Anthropic Connectors Directory submission package

Everything needed to publish the production deployment to Anthropic's
connectors directory: the verified submission process (portal, access
prerequisites, governing policy/terms), a requirements-met table checked
against the live server, the five pre-submission blockers (privacy-policy
URL, the financial-transactions policy question, reviewer test identity,
production lagging main, icon asset), and paste-ready drafts for every
portal field including example prompts and reviewer test instructions.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: align Hackenproof spelling with SECURITY.md; drop the Terms placeholder

Copilot review on #109: SECURITY.md spells it Hackenproof, and "(Terms §)"
read as an unresolved section reference.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: the II privacy policy cannot cover the MCP server; spell out the needed policy

The Internet Identity Privacy Policy (2026-04-07) scopes itself solely to
Google-account linking and expressly disclaims all other processing, so it
cannot serve as the connector's privacy-policy URL. Replace blocker 1's
'have legal check dfinity.org/privacy' with the concrete requirement: a
dedicated ICP MCP policy, with the contents mapped from what the server
actually processes (delegations, account labels, OAuth state, tool
arguments, in-memory-only retention, host logs, public on-chain effects,
DFINITY-only third parties).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: draft the ICP MCP privacy policy for legal review

Modeled on the Internet Identity Privacy Policy (2026-04-07) structure,
with the technical claims drawn from the server's actual behavior:
in-memory-only session/OAuth state capped at the II grant (<=30 days),
transient tool-call processing, the single security-purpose sid cookie,
no analytics, DFINITY-operated infrastructure as the only recipients,
and the public-permanent nature of on-chain effects. Bracketed
placeholders mark the decisions legal/ops must supply (retention window,
venue, contact, effective date).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: rework the privacy-policy draft per DFINITY review feedback

- Use II consent-screen terminology ("Questions only" / "Actions &
  questions") instead of read-only-by-default, which was inaccurate:
  the access level is an explicit user choice, and the same correction
  propagates to the submission doc's description, blockers, and
  reviewer instructions.
- Document revocation at id.ai/manage/access (effective within at most
  five minutes), repeated under User Rights for users who no longer
  remember which AI sessions are active.
- Describe the Internet Computer as a public network running
  applications via a consensus protocol; no blockchain branding, no
  permanent-state claim: what applications record is governed by them.
- Clarify the sid cookie is server-set and inaccessible to page
  scripts; leave room for aggregated, anonymized usage metrics; drop
  the II-principal mention (the server only ever sees its own-domain
  pseudonym); state per-application principals may be considered
  private when account tools request them.
- Set log retention to three months and flag the ops prerequisite:
  journald's default retention is size-based, so the bound needs a
  MaxRetentionSec=90day drop-in installed by deploy.sh.
- No em-dashes in the policy text.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* deploy: bound journald retention to the privacy policy's three months

Everything the deployment logs lands in journald, whose default
retention is size-based with no time cap, so nothing enforced the
policy's 'retained for up to three months'. Install a drop-in
(MaxFileSec=1week + MaxRetentionSec=12week) from deploy.sh: files
rotate at most weekly and are deleted 12 weeks after their newest
entry, bounding the worst case at ~91 days. The policy draft's ops
note now points at the drop-in and the required rollout to both hosts.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: factor the journald retention change out to #111

Keeps this PR docs-only and shrinks the policy draft's ops note to a
pointer at the PR that enforces the bound.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: correct the privacy drafts against the implementation (Copilot review)

Every claim in the review verified against the code and stands:

- The sign-in cookie is named mcp_connect (CONNECT_COOKIE, src/auth.rs),
  not sid.
- OAuth client registrations are NOT in-memory: they persist to
  OAUTH_CLIENTS_FILE in the unit's StateDirectory, survive restarts, and
  expire only by LRU eviction (10,000 cap); stored fields are the
  generated client id, redirect URIs, and last-used timestamp, while
  client_name is echoed but never stored.
- The request log records method/path/status/latency (never query
  strings or bodies) and auth events log session ids and the
  Service-scoped principal; client IPs and user agents are not
  systematically recorded (Caddy runs without access logs). The policy
  previously over-disclosed absent fields and omitted real ones.
- Data sharing now names the user-directed recipients: applications
  receive the request arguments and per-app identity, and app discovery
  fetches user-supplied origins; DFINITY infrastructure is not the only
  recipient.
- The submission doc no longer pre-fills dfinity.org/privacy (blocker 1
  says it is insufficient; an incomplete policy is immediate rejection),
  no longer claims first-party APIs only, and flags the first-party-API
  acknowledgment as unresolved alongside financial transactions.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: distinguish disconnect from revocation; fix annotation and skills claims

Second Copilot round, each claim verified against the code:

- Disconnecting the connector only stops the assistant using its token;
  the server has no revocation endpoint, so the authorization stands
  until it expires or is revoked at id.ai/manage/access. The policy's
  User Rights section now says exactly that instead of presenting the
  two as equivalent.
- Four tools (icp_create_canister, icp_top_up_canister,
  icp_start_canister, icp_stop_canister) are annotated neither read-only
  nor destructive (additive/reversible writes), so the listing text no
  longer claims every tool is one or the other.
- icp_get_skill returns full SKILL.md instructions fetched live from
  skills.internetcomputer.org, so the prompt-injection acknowledgment is
  now flagged for open disclosure instead of being called
  straightforwardly true.
- The directory-safe profile option now says a ledger blocklist cannot
  satisfy the financial-transfer prohibition (intermediary canisters and
  custom ledgers bypass it): the generic update tool has to go, or
  actions must be allow-listed.
- Contact address settled as [email protected] (placeholder removed).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: pin the privacy-policy venue to mcp.internetcomputer.org/privacy-policy

The venue decision is made: the MCP server will serve the policy
itself. Record the URL in the portal field draft, the blocker, and the
checklist; the only remaining placeholder is the effective date.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: the /privacy-policy page is implemented in #112

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* docs: effective date decided (August 3, 2026); no open decisions remain

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Link the privacy policy from the landing page footer

The landing page is a bundler shell whose document lives as a JS string
literal in assets/index.html; adding a footer link is a surgical edit to
that string (matching the sibling 'Hosted by DFINITY' anchor's styling,
spaced by the flex row's existing gap) rather than a bundle
regeneration. The route comment and the submission doc's blocker 1 no
longer describe the link as outstanding.

Verified by rendering the unpacked page in Chromium: the footer shows
the link, clicking it lands on /privacy-policy (title 'ICP MCP Privacy
Policy', effective date August 3, 2026).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Correct two inaccuracies in the privacy policy (Copilot review)

Both verified against the code:

- Sharing was described as 'two ways' while omitting the recipient
  intrinsic to the Service: results go back to the connected AI
  assistant, whose provider processes them under its own policy. Now
  stated first, since it is the point of the Service.
- 'No data about you remains after a session ends' was inaccurate for
  the revocation path: map_delegation_error returns RECONNECT_MSG on
  Unauthorized without removing the Session, and prune_stale retains
  entries until the ORIGINAL grant_expiration_ns, so a revoked
  session's key stays in memory until the duration first chosen (up to
  30 days) or a restart. The policy now says so, and notes the record
  cannot be used to act once the authorization is gone.

Revocation timing is now attributed to Internet Identity rather than
implied to be the Service's own guarantee.

Applied to both the served page and its source text.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Attribute revocation timing to Internet Identity in the intro too

The summary paragraph still stated the five-minute figure as the
Service's own; section 4 already attributes it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Internet Identity and the API boundary nodes are DAO-governed, not DFINITY-operated

The sharing section labelled the whole dependency list 'operated by
DFINITY Foundation', which is wrong for the two that matter most:
Internet Identity (id.ai) and the public API boundary nodes the server
submits through (IC_URL = https://icp-api.io) are part of the Internet
Computer and governed by the NNS DAO. Only dashboard.internetcomputer.org
and skills.internetcomputer.org are DFINITY-operated.

Misidentifying who receives data is a substantive error in a privacy
policy, so this is corrected in the served page and its source text, and
in the submission package's data-handling and first-party-API notes —
where it also strengthens the case that 'first-party APIs only' cannot be
acknowledged as a clean yes.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Add the official ICP mark and its square icon exports

The connectors-directory listing needs an icon. Commit the official ICP
mark as SVG plus square transparent PNGs (1024 and 512) for the portal's
icon field, and mark blocker 5 done.

The mark is ~2.05:1, so the exports centre it at 84% of the canvas width
on a square transparent field rather than cropping. Rendered with
Chromium: the mark's linearGradients (one carrying a rotate transform)
are mis-rendered by lighter rasterisers.

Listing icon only — the served pages keep the DFINITY wordmark for their
'Hosted by' footer.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Record that mcp-review has been asked (2026-07-31)

Blocker 2 is now waiting on a reply rather than on someone sending the
email. Reframe its options as 'once the answer arrives', and note that
the first-party-API acknowledgment needs a follow-up if the reply does
not cover it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

* Reviewer access is self-serve; record what the mcp-review email asked

Blocker 3: no shared test identity. Reviewers create their own Internet
Identity and follow the setup instructions on the landing page, which is
the right shape for a passkey-based, device-bound authenticator that
nobody can pre-provision into. Reviewer instructions rewritten to match,
with an offer to provision a canister-controlling, cycles-funded
identity on request — that is the one thing a fresh identity cannot
exercise, and the likeliest reason a reviewer pushes back on the
'fully populated account' criterion.

Blocker 2: the 2026-07-31 email asked two questions (cycles funding and
canister_update_call). Two gaps recorded: the first-party-API
acknowledgment was not among them and needs its own follow-up, and the
mitigation the email offers for canister_update_call — blocking the
well-known ledger transfer/approve methods — is bypassable via custom
ledgers and forwarding canisters, so it must not be shipped as-is if
the reply takes it up.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw

---------

Co-authored-by: Claude <[email protected]>
aterga pushed a commit that referenced this pull request Aug 3, 2026
Post-audit merges (#87-#115) that changed user-visible or documented
behavior, folded into the README:

- II's consent screen requires an explicit access-level choice (Questions
  only vs Actions & questions); it is not a read-only-by-default opt-out.
- Name the connect binding cookie correctly: mcp_connect, not sid, with
  Secure conditional on an https PUBLIC_URL.
- Document the official pages (/privacy-policy, /support, /terms) and the
  OpenAI domain-verification endpoint with its env-gated 404 behavior
  (#109, #112, #115).
- /version now reports the served II pairings via the instances array (#94).
- CWE-674: note the post-parse depth bounds on interface alias chains (#87)
  and the type-less reply decode/render path (#108).
- Companion-control note: percent-encoded slashes/dots in redirect paths are
  rejected (#107).
- Deploy: describe the reference native deployment pipeline (staging tracks
  main, release-* tags ship production with the binary attached) (#81, #93).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw
@aterga aterga mentioned this pull request Aug 4, 2026
6 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants