- Python 95.2%
- HTML 3.7%
- Shell 0.8%
- Dockerfile 0.2%
|
All checks were successful
ci/woodpecker/push/validation Pipeline was successful
Record canonical shared-contract and binding origins at the verified mind-spec-v0.1.0 release. Co-Authored-By: Codex GPT-5 <noreply@openai.com> |
||
|---|---|---|
| .out-of-scope | ||
| .woodpecker | ||
| deploy | ||
| docs | ||
| scripts | ||
| src/people_mind_mcp | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| compose.yaml | ||
| Containerfile | ||
| GLOSSARY.md | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
People Mind MCP
A self-hosted people knowledge service for agents. People Mind joins contacts and mail evidence into identities, relationships and searchable context, with provenance for derived fields. It serves MCP over Streamable HTTP with bearer tokens, one instance per person, beside Mail Mind or alone.
Blades expose a system's capabilities; minds maintain durable domain knowledge over time. People Mind owns the people graph; Mail Mind owns the mail mirror. HTTP transport, write access and LLM use do not define the distinction. See the naming decision.
Current capabilities
The project remains at 0.1.0.dev0, with a runnable development implementation and container packaging. It includes vCard interval imports, CardDAV sync, Mail Mind evidence and interactions, identity resolution, deterministic enrichment, local embeddings, authenticated read tools and acknowledged change feeds. Compose and Kubernetes templates include sync, API, health checks and Litestream backup.
Roadmap
0.2.0 work includes write tools, Google People and Microsoft Graph Sources, a Notion record store and opt-in CardDAV write-back. A Stallari adapter comes later. The sections below distinguish current behaviour from those planned additions.
Approved, pending implementation: the shared mind contract and recovery model adds structured, versioned peer data and bounded, resumable change-feed consumption while keeping each mind independently usable through MCP. Direct integration remains supported without Kubernetes or a broker. The Mail peer v1 adoption contract pins the shared schemas and recovery acceptance cases; runtime adoption is still pending.
Later, when fan-out or workload justifies it, add optional durable bus integration against the canonical dev/fabric-spec bus contract. Stallari/bus is a derived implementation. A fabric integration will pin and conform to the canonical specification; adopting a mind does not require adopting the fabric.
Naming migration
The repository and distribution are now people-mind-mcp; Python imports are people_mind_mcp, with no peoplemind_mcp alias. Recreate the virtual environment or rebuild the image, and update direct Python imports. The peoplemind command, PEOPLEMIND_* variables, explicit --config, source kind mailmind, tools, database paths and endpoints retain their names. MCP initialization identifies the server as people-mind-mcp. Schema v5 is unchanged by the rename.
For existing Compose installations, preserve the actual project name with compose -p <existing-project>, together with its data/replica volumes and external network names. Renaming a checkout must not create a new graph. This migration does not provision an estate deployment or promote the development build to a stable release.
Who it is for
Grok Bot custom connectors first, and any MCP client that speaks Streamable HTTP; a Stallari adapter comes later. No Mac is needed: CardDAV carries the contacts your devices already sync.
Why a graph, not a tally
A Person has one opaque id that survives a merge, a re-sync and a changed address. Two records merge silently only on an exact exclusive Handle. Shared endpoints, URLs and name matches return ranked Candidates, each with a reason, so two people with the same name stay distinguishable.
Asserted fields sit beside derived fields. Each derived field carries its Source, evidence references and a confidence. A card can show title: Licensed Plumber (carddav) beside org: Bondi Plumbing (derived, domain, 0.75) and tell the agent where each fact came from.
Privacy posture
The current implementation follows these boundaries; the forget operation is planned for 0.2.0:
- Self-hosted: your own pod, hostname and tokens. (ADR 0001 §5)
- The default row is a closed seven-field list: name, primary email, primary phone, organisation, title, relation and last interaction; birthday, address, notes and photos stay off it unless the deployment lists them in config. (ADR 0003 §3)
- Evidence is kept by reference only; mail text is never stored. (ADR 0003 §2)
- Mail access uses a mailmind evidence token that can never read a body. (ADR 0001 §5)
- Embeddings run on the host with the pinned
bge-small-en-v1.5int8 model; no card or query text is sent off-host for a vector. (ADR 0003 §6) - 0.1.0 derivation is deterministic; a model-written context line needs an amendment, and an off-host model also needs owner consent. (ADR 0003 §5)
- Derived data never overwrites what a Source or author asserted. (ADR 0003 §1)
- Forget, arriving with the write tools in 0.2.0, leaves a salted Tombstone, has no undo and refuses without
confirm=true. (ADR 0003 §8) - Logs hold counts, roles and error codes only. (ADR 0003 §7)
Tools
Text rows are pipe-separated; the App view helper returns JSON. These read tools are implemented in the development build; their public contracts are recorded in the linked ADRs.
| Tool | What it returns |
|---|---|
people_find (archived="exclude"/"include"/"only") |
Ranked Candidates: name | primary email | primary phone | organisation | title | relation | last interaction | match reason. An exact exclusive Handle short-circuits to one row. Shared endpoints and URLs return Candidates with reasons shared-handle and url. A query that is not handle-shaped also matches organisation names and aliases (asserted organisation values and derived organisations at or above the default-row confidence threshold) and returns each member with reason organisation, ranked below an exact name and above a name prefix. mode is lexical, hybrid or semantic; it defaults to hybrid when embedding is on and lexical when off, and semantic or hybrid with embedding off answers Error: code=embed-off. Handle-shaped queries always rank lexically. In hybrid, semantic-only rows (reason semantic) appear only when no lexical or organisation Candidate matched. (Default row, ADR 0002 §3/§5, ADR 0006 Amendment 1) |
people_compare |
Compare two Persons: compare, person, name, handle, asserted, derived, suggestion and resolves rows show provenance, survivor and old-id resolution; merge=blocked:<reason> explains refusals and separated=<bool> marks a durable separation. MCP Apps hosts render the Person Card App view. |
people_split_preview |
Preview a split or move: Handles, hashed source-link refs, local items and tags, held claims, and ambiguous or would-remerge review rows. The app-only people_card_split returns the same plan as JSON; the Card App offers Split… and Different people from a comparison. |
people_remove_preview |
Exact scoped-removal preview for a whole Person or fact:id, event:id, note:id, relation:id: rows removed, affected Persons, restored facts, re-import risk, eligibility and undo window. The app-only people_card_remove_preview returns the same plan as JSON; the Card confirms Remove… and item Retract through this preview. |
people_card |
A Card: identity, asserted fields with author, derived fields with Source, evidence and confidence, and evidence references on request; suggestions=true shows Suggestions for review; history=true includes retained superseded and corrected facts. MCP Apps hosts also show the Person Card App view (ui://peoplemind/card.html), which reads through the app-only people_card_suggestions tool. |
people_review_queue |
Review Suggestions by Person and state, paged by Suggestion id. The app-only people_card_queue provides the same queue as JSON. |
people_related |
Relations: a type from family, household, works_at, colleague, client, provider, friend, other, plus an optional label. (ADR 0002 §8) |
people_recent |
Interactions: date | channel | direction | ref, with no text. Manual rows use event:<id> and append author=… | revision=n; meeting and other have an empty direction. Unattributed shared rows append shared | interaction=id | revision=n; attributed rows appear only on the chosen holder. (ADR 0004 §5) |
people_status |
Graph counts and the change sequence: persons | organisations | handles | interactions | tombstones | change_seq | embed, where embed is off or on covered=N (Persons with a vector). (ADR 0001 Amendment 1, ADR 0006 Amendment 1) |
people_sources |
Configured Sources: name | kind | last_sync | last_pass_records | applied | pending | freshness | last_error. Output starts with a header row; last_pass_records counts records processed by the last successful sync pass, not a total. |
people_changes(consumer, limit=20) |
The change feed read by a named Consumer: seq | kind | person_id | other_id | at. Kinds are add, update, merge, del; other_id is the merge loser and empty otherwise. An unacked read repeats its page. (ADR 0002, Consequences) |
people_changes_ack(consumer, seq) |
Advances a Consumer position to a nonnegative integer seq from ack_seq, returning consumer | position. A non-forward ack writes nothing; a seq past the end is refused. Consumer positions are the API's only write in Phase A. (ADR 0001 §3) |
Tools are idempotent and closed-world. people_changes_ack writes a Consumer position; link, review and undo tools are destructive writes.
Name Consumers in config; any other name is refused by both feed tools. The default list is empty.
[feed]
consumers = ["grok"]
The footer design follows mailmind: next_cursor, more, total on lists; ack_seq, more on the change feed. Derived fields appear in the default row only at or above the configured confidence threshold (default 0.7).
Tests keep a default people_find row under 150 tokens and a people_card response without evidence under 600.
Every tool docstring names its untrusted fields; the full rule lives in the server instructions.
people_note and app-only people_card_note write note.add, note.correct, note.retract, preference.set, and preference.retract in the notes bucket. Preference topics are pronunciation, address_as, language, and contact. Each action can be undone once. Use people_card notes=true to include them; they are never on the default row, never published.
people_followup and app-only people_card_followup write followup.link, followup.correct and followup.unlink in the notes bucket. Types are task and calendar. Labels hold 1–200 characters; refs are absolute URIs of at most 2048 characters, stored verbatim. Whitespace, control characters and the schemes javascript, vbscript, data, file and blob are refused. Linking the same ref to the same Person again answers followup-present. Correct and unlink require the item's revision; each kind undoes once. Use people_card followups=true to include them; the App always shows them. People Mind stores only the reference. It never creates, schedules, reminds, sends or opens; the App's Open asks the host, whose policy decides.
people_fact and app-only people_card_fact write fact.add, fact.correct, fact.supersede, fact.retract, and handle.prefer in the notes bucket, with safe undo. Supported fact names are organisation and title. Corrections retain imported assertions; local status rows hide the old value across re-sync. Optional effective dates are separate from observation time. Use people_card history=true for retained history and revisions=true for field ids, revisions and seen value digests, and Handle ids and revisions. Editing or retracting a fact requires both its revision and seen. Preferred Handles rank first in the primary-email order; obsolete Handles rank last and still resolve their Person. A preference never changes ownership.
people_interaction and the app-only people_card_interaction record manual events. The kinds interaction.add, interaction.correct and interaction.retract charge the interactions bucket (cap 200 per day). Calls require direction in or out; meeting and other carry no direction. Dates are YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS]Z; future dates or timestamps answer future. The context Person is always a participant, with up to 19 extra Person ids or shared email/phone Endpoints; people_attribute attributes an Endpoint row to a holder. An optional note is a separate Note: people_card notes=true shows it ending event=<id>. Correct replaces the date, channel and direction; correct and retract require the event revision from people_recent or the App. Retract removes the event and its notes. Undo reverses each kind; undo of an add removes its note too, and conflicts if that note was changed or retracted separately. The App offers Log interaction, Correct and Retract.
people_relation and the app-only people_card_relation write relation.add and relation.retract in the links bucket. Types are family, household, works_at, colleague, client, provider, friend and other, with an optional label (≤200 characters) and optional YYYY/YYYY-MM/YYYY-MM-DD effective dates. Targets are Person or Organisation ids. An identical edge in either direction answers relation-present; different effective dates allow a separate period. Retract requires the Relation's revision, and both kinds support undo. The default Card shows relation | other_id | other_name | type | label | author, with inbound on the target side and dates when set; revisions=true adds relation=id and revision=n. The App offers Add relation and Retract.
people_org and app-only people_card_org write org.rename, org.alias, org.domain.assign and org.domain.reject in the organisations bucket (cap 50 per day), with undo. Each requires the Organisation revision and preserves Author provenance for names, aliases and domains; people_card revisions=true and the App expose them. Assigning a domain another Organisation holds refuses with domain-owned and its id, with no transfer or Person merge. A rejected, unowned domain stays suppressed across sync; explicitly assigning it re-enables derivation. Role distinctions use works_at labels such as director or contractor.
people_archive and app-only people_card_archive write person.archive and person.restore in the lifecycle bucket (cap 50 per day). Each requires the Person revision, supports undo, and refuses the Owner (owner), an already archived Person (already-archived) or restore of a live Person (not-archived). The App offers Archive and Restore. Archive hides name, organisation and semantic Candidates, related results and the unscoped review queue; exact Endpoints and explicit id lookups keep answering with an archived marker on find, Card and recent rows. people_find archived="include" includes archived Persons and archived="only" returns only them; the default is exclude, which keeps handle-shaped Candidates. Explicitly scoped Suggestions and all history remain available, and status counts include archived Persons. Cards show links=retired when at least one Source link exists and all are retired. Sync never restores a Person; a merge of archived and live Persons leaves the survivor live, and merge undo restores each side's state. Archive writes no Tombstone and never writes to a Source.
people_remove and app-only people_card_remove apply whole-Person local.remove, in the lifecycle bucket with the shared cap of 50 per day. It requires the Person revision and a local-only Person: no live or retired Source link and no Source Interaction. Source-known Persons answer source-known next=forget; the Owner answers owner. The preview lists every removed item, including Relations both ways and the Person's links on shared events. An event and its notes go only when no other interaction remains, including endpoint interactions. Undo restores the original ids and archive state within the undo window; it conflicts if an exclusive Handle has a new holder (handle-owned), a surviving event is missing, or a required Person or Organisation is missing. Removal emits feed del, and undo emits add, with update for affected Persons. It creates no Tombstone and changes nothing upstream, so a matchable Handle can re-import as a new Person. Archive only hides the Person and keeps everything; Forget is permanent, requires confirmation and blocks re-import. Selected facts, manual events, Notes and Relations use their existing *.retract actions through the same preview. Forget can reach a removed id while its undo record remains.
people_create (and the app-only people_card_create) queues person.create on the create bucket. It makes a local Person from a name with an optional organisation and title, and no Handle. people_undo removes it while nothing else has reached it.
With a write token, people_link queues merge, alias, split, move, separate, share or unshare on the links bucket, people_review accepts or edits a Suggestion as a local asserted field, or rejects or reconsiders it, using the notes bucket, people_attribute attributes one shared Interaction using the interactions bucket, people_undo reverses an eligible creation, link, review, note, follow-up, interaction, relation, share, unshare, attribution, people_archive or local.remove action, and people_actions lists the audit log. The app-only people_card_review tool submits the same review.accept, review.edit, review.reject and review.reconsider Actions as people_review, recording via=app and the host token label as Author. Undo of a reject reopens the Suggestion; undo of a reconsider restores the rejection. Write answers have the form action=N kind=K state=queued or a terminal state with details. Request people_card with revisions=true to read Person and Suggestion revisions. Queued Actions are applied by the long-running sync process, and by sync --once after its source passes. The app-only people_card_compare reads the comparison; people_card_link and people_card_undo submit the same link and undo Actions as people_link and people_undo, recorded with via=app. Splits and moves allocate named Handles, source links and local items; move targets an existing Person and is available through people_link action=move. A split or separation guards against Source re-merging; collisions appear as held rows on the Card, alongside separated rows, and an unlinked bridging record increments the held_separated sync count. These Actions never write to a Source.
[writes]
wait_seconds = 5.0
undo_days = 30
[[auth.write_tokens]]
label = "agent"
token_file = "/run/secrets/write-token"
buckets = ["links", "undo"]
Sources and record stores
The development build supports vCard import, CardDAV and Mail Mind over MCP, with an internal SQLite record store. 0.2.0 adds Google People, Microsoft Graph, the Notion record store and write tools. A Source yields records and never holds the Person; a record store holds asserted fields.
- vCard import reads contact records into the graph.
- CardDAV reads sync-token deltas with a read-only credential. Write-back in 0.2.0 is opt-in with a separate credential; it never overwrites a non-empty field, writes a derived field or writes a photo.
- mailmind supplies mail evidence and interactions over MCP through its evidence token, without direct database access.
- Google People in 0.2.0 reads connections by default; other contacts are opt-in.
- Microsoft Graph in 0.2.0 reads all contact folders by default, configurable per deployment.
- Notion in 0.2.0 is a record store for asserted fields; derived fields never reach it.
The Owner's handles come from [owner] in config, never from a Source, and are left out of mail evidence. Owner shared_phones and shared_emails allow other holders without merging them into the Owner, and make existing endpoints shared at start. [identity] shared_endpoints lists shared emails or phones and shared_local_parts lists role mailbox local parts; these seed sharing on first import. Other existing exclusive endpoints require an explicit share action. See ADR 0004 for the Source boundaries.
Quick start (compose)
Build the application image with its hash-checked embedding model. make model is optional for host tests; the image fetches its own copy during the build. make image-amd64 builds for linux/amd64 using the host architecture for dependency resolution.
make image
umask 077
mkdir -m 700 secrets config
uv run peoplemind token --out secrets/read-token
openssl rand -hex 32 > secrets/tombstone-salt
# Place the CardDAV app password (password only, one line) in secrets/carddav-credential.
chmod 600 secrets/read-token secrets/tombstone-salt secrets/carddav-credential
cp deploy/config.example.toml config/config.toml
cp deploy/litestream.example.yml config/litestream.yml
# Edit config/config.toml: owner, explicit phone-number region, Source and public hostname.
PEOPLEMIND_UID=$(id -u) PEOPLEMIND_GID=$(id -g) podman compose up -d
curl -fsS localhost:8420/healthz
curl -fsS localhost:8420/healthz/sync
The three services share the data volume; backup also mounts replica. Config and secrets are read-only bind mounts. The services run with the host uid/gid supplied above; keep secret files owned by that user at mode 0600. The image defaults to uid/gid 1000. New and existing data and replica volumes must be writable by the selected uid/gid; verify volume ownership and bind-mount uid mapping on your container engine before startup. Use the same uid/gid environment for subsequent compose commands. Docker users can substitute docker for podman; Make selects podman first, or accepts RUNTIME=/path/to/docker.
The API binds to loopback port 8420 on the host. Configure your proxy or tunnel for TLS, then add a Grok Bot custom connector at https://people.example.com/mcp, with the bearer token from secrets/read-token. PEOPLEMIND_HOME selects a different host directory holding config/ and secrets/; PEOPLEMIND_PORT selects another loopback port. /healthz stays available while sync is down; /healthz/sync reports stale Sources. vCard Sources re-import on interval_seconds (default 900, minimum 60) and skip files whose mtime and size are unchanged.
To add mailmind, place its evidence token in secrets/mailmind-evidence-token, mode 0600, and append this Source to config/config.toml. An evidence token (mailmind ADR 0008) cannot read bodies. request_timeout_seconds (default 60) bounds each Mail Mind request; a request that exceeds it fails the pass as mailmind-unavailable, which checkpoints and retries on the next interval.
[[sources]]
kind = "mailmind"
name = "mail"
allow_http = true
url = "http://mailmind:8420/mcp"
token_file = "/run/secrets/peoplemind/mailmind-evidence-token"
interval_seconds = 900
request_timeout_seconds = 60
protocol = "mail-people/1.0"
page_limit = 100
max_pending_records = 10000
max_pending_bytes = 4194304
max_staged_records = 500000
Mail peer v1 (mail-people/1.0) is the default. The client negotiates mail-people/1.1 when Mail Mind offers it. It then dates each mail interaction with the message's own date and takes direction from Mail Mind's owner flag. Under 1.0, interactions keep the mirror time. A change of negotiated version rebuilds once. Set protocol = "legacy-text" explicitly for older Mail servers. Version, protocol and authentication failures never fall back to legacy tools. Each Source uses one in-flight request, bounded by the timeout above, with paced requests and at most five retries for retryable peer errors. Pages contain at most 100 records; pending identities are capped by count and the sum of address lengths. Feed ingestion pauses before exceeding either pending cap and drains evidence work first.
The first v1 pass bootstraps a staged snapshot. Expired/unknown feed cursors or a changed peer identity trigger an explicit rebuild. Changing [owner] emails triggers one rebuild, so existing messages are re-derived with the new direction. An added exclusive owner address joins the Owner at the next start: a Person holding it merges into the Owner silently, and the rebuild retires that Person's Mail link. If the endpoint is already shared, the Owner joins its holders without merging them. The first pass on schema 8 records the current owner set without a rebuild; change [owner] emails after the upgrade has run once. The live projection remains until a complete snapshot activates atomically. Snapshot activation is the deliberate transaction-bound exception: staging is bounded by max_staged_records, but activation can enqueue the union of old and staged identities above the pending caps; feed ingestion pauses until that queue drains. Evidence is fetched outside graph transactions, and each address's derivation and generation completion commit together. Interrupted work resumes from durable cursors and pending identities. Raw signatures, subjects and response JSON are never stored.
people_sources rows are name | kind | last_sync | last_pass_records | applied | pending | freshness | last_error. Output starts with a header row; last_pass_records counts records processed by the last successful sync pass, not a total. The three new cells are empty for other Sources. Mail peer freshness is current only after all received work is applied and the upstream reports current. /healthz/sync uses applied time (and the older upstream sync time when upstream is stale), so receiving a page alone cannot report caught-up work as fresh. Local tools and /healthz remain available without Mail.
Schema 8 adds a salted owner-set digest to mail_peer. Stores below schema 7 still run a one-time VACUUM on writer open; readers wait for migration as before. The first complete v1 snapshot retires the legacy projection and checkpoint. Older binaries refuse a schema-8 store; reverting requires a pre-migration backup. Schema 10 adds an index on interactions(person_id, date); older binaries refuse a schema-10 store. Forget purges pending and staged identities, the legacy-mode pending checkpoint and derived Organisations that only that Person used and that have no asserted field, and suppresses late replies. The writer sets secure_delete, so Forget physically erases the Person's values from the database file once Litestream checkpoints the WAL. WAL frames, the Litestream shadow WAL and replica snapshots and segments keep forgotten bytes until retention removes them; every replica's retention is at most 168 hours (ADR 0003 Amendment 1, rules 1–2). Restore-safe Tombstones remain pending under their own issue. Schema 11 adds actions, undo_records and handle_claims tables and revision columns; older binaries refuse a schema-11 store. Schema 12 adds the suggestions table and backfills one open Suggestion per derived value; older binaries refuse a schema-12 store. Schema 13 adds the notes table for Notes and Preferences; older binaries refuse a schema-13 store. Schema 17 rebuilds interactions (manual channels, nullable direction, event_id) and adds events and notes.event_id; older binaries refuse a schema-17 store. Schema 18 adds revision, action_id and effective dates to relations; older binaries refuse a schema-18 store. Schema 19 adds Organisation revision and name provenance, alias and domain provenance, and org_domain_rejections; older binaries refuse a schema-19 store. Schema 20 adds archived_at, archived_by and lifecycle_action_id to persons; older binaries refuse a schema-20 store. Schema 21 adds the followups table; older binaries refuse a schema-21 store. This additive migration can only be reversed by restoring a pre-migration backup. Schema 22 makes the interactions(event_id, person_id) index unique and folds duplicate event links; older binaries refuse a schema-22 store.
Run mailmind with podman compose -p mailmind up -d so its network is mailmind_default. Add networks: [default, mailmind] under peoplemind's sync service and this top-level block to compose.yaml:
networks:
mailmind: {external: true, name: mailmind_default}
Mail Mind's api service supplies the network alias mailmind; its allowed_hosts must include mailmind. For existing projects, use their actual network name instead of creating a replacement. With allow_http = true, the token travels in clear on the container network. people_card evidence=true returns evidence references. In Kubernetes the Source URL is http://mailmind-api.<namespace>.svc.cluster.local:8420/mcp.
For Kubernetes, edit deploy/k8s/overlays/example/config.toml, the image tag/digest and S3 replica settings in its kustomization.yaml; remove the mailmind Source if unused. The base is namespace-agnostic and uses one pod with sync, api, backup and a prepare init container. The init container copies config and splits secrets into mode-0600 files in memory: the API receives only the bearer tokens (read-token and every write-token* key), sync receives the salt and Source credentials, and backup receives S3 credentials through Secret references. Run peoplemind check in the sync container, because check reads the tombstone salt and the api container does not receive it. Create the namespace and Secrets out of band:
kubectl create namespace peoplemind-example
kubectl -n peoplemind-example create secret generic peoplemind-secrets \
--from-file=read-token=secrets/read-token --from-file=tombstone-salt=secrets/tombstone-salt \
--from-file=carddav-credential=secrets/carddav-credential \
--from-file=mailmind-evidence-token=secrets/mailmind-evidence-token
kubectl -n peoplemind-example create secret generic peoplemind-litestream \
--from-file=access-key-id=secrets/access-key-id --from-file=secret-access-key=secrets/secret-access-key
kubectl apply -k deploy/k8s/overlays/example
Omit unused secret files and the optional Litestream Secret when using a file replica. secret-peoplemind.example.yaml is a placeholder template, excluded from the overlay; the real file is sops-encrypted and never committed. No Secret values belong in a ConfigMap. Pin the built application image by digest before deployment.
Compose defaults to a local file replica. For an off-host backup, replace the replica in config/litestream.yml with the commented S3 form and supply LITESTREAM_ACCESS_KEY_ID and LITESTREAM_SECRET_ACCESS_KEY in the compose environment. The Kubernetes overlay already uses the S3 form in its config ConfigMap. Keep the tombstone salt backed up separately and private. To restore a separate database and check it (use the same host uid/gid environment as at startup):
podman compose run --rm --no-deps backup restore -config /etc/litestream.yml \
-o /var/lib/peoplemind/restored.db /var/lib/peoplemind/peoplemind.db
sed 's@/var/lib/peoplemind/peoplemind.db@/var/lib/peoplemind/restored.db@' \
config/config.toml > config/restore.toml
podman compose run --rm --no-deps api check --config /etc/peoplemind/restore.toml
Expect store=ok schema=13 persons=... with counts matching the replicated state. Stop all services before replacing the live database, and retain the original database and its WAL files. make check runs lint, formatting, strict typing and non-integration tests. On a host with a container engine, compose and kustomize (or kubectl), make test-integration builds the image and runs the four deployment acceptance tests; check the -rs output for skips.
CI
Woodpecker validation runs make check on every pull request and every push to main at ci.groupthink.asia. The validation pipeline holds no secrets.
make check runs Ruff lint and formatting checks, strict mypy and non-integration tests. Container deployment tests run separately through make test-integration on a host with a container engine, compose and kustomize (or kubectl). Model-dependent embedding tests need the model fetched by make model; they can skip when it is absent. These integration and model-dependent checks are not covered by the validation pipeline.
As of 2026-11-03, main has no branch-protection rule or required CI status checks. CI runs automatically, but a passing result is not enforced before merge or direct push.
Releases and deploy
A release is an annotated tag on main with a v prefix, vX.Y.Z or vX.Y.Z-rc.N. CI builds the image from the tag and publishes it as git.groupthink.asia/dev/people-mind-mcp:X.Y.Z, the tag without the v. The version in pyproject.toml is a development marker, not the release version. ADR 0008 records the decision.
The release pipeline runs on v* tags only. It checks that the tag is annotated, well-formed and on main, bakes the image without a container daemon, and publishes it. Publish refuses a version that already exists, and the last line of its log is the image digest.
To cut a release, tag the merged commit on main and push the tag. Only the operator can push v* tags.
git switch main && git pull --ff-only
: "${RELEASE_VERSION:?Set RELEASE_VERSION to a new, unused version without the v prefix}"
git tag -a "v${RELEASE_VERSION}" -m "people-mind-mcp ${RELEASE_VERSION}"
git push origin "v${RELEASE_VERSION}"
A consumer pins one release in three places, with the same version: the kustomize base ?ref=v0.1.0-rc.5, images[].newTag: 0.1.0-rc.5 and images[].digest from the release log. The digest is the deploy boundary. Never move or re-push a release tag: publish refuses it, and a moved tag no longer names the source of its image. A fix ships as the next version.
make image and compose still build from the Containerfile. The release scripts reproduce it, and make check fails when their base digest, uv pin, user, entrypoint or command drift from it.
Compared with
Public pages checked on 2026-11-01; not stated means the linked page does not establish that cell. people-mind-mcp's row describes its design.
| Project | Runtime | Transport | Self-hosted | Identity resolution | Mail join | Write path | Licence |
|---|---|---|---|---|---|---|---|
| people-mind-mcp (design) | Python 3.12 | Streamable HTTP | Own pod, hostname and tokens | Exact exclusive Handle merges; shared endpoints, URLs and names return Candidates | mailmind evidence token; references only | 0.2.0 write tools through an outbox | MIT |
| people-context | Python 3.11+ | stdio; opt-in loopback HTTP | Local SQLite; Docker option | Names, aliases and handles; ranked reasons | Email/mbox imports staged for review | Audited writes; reviewed import commits | MIT |
| contrack | Node.js 26.10+ | not stated | Docker or source | Automatic obvious matches; review others | Inbox and calendar on each person's timeline | Assistant can log notes; optional read-only access | AGPL-3.0 |
| carddav-mcp (ni-c) | npx / Docker | stdio | Local process or container | not stated | not stated | Create and update contacts | MIT |
| Google People API MCP | not stated | HTTPS endpoint | not stated | Contact and directory search | not stated | not stated | not stated |
| Notion hosted MCP | not stated | Streamable HTTP; SSE fallback | not stated | not stated | not stated | Read and update accessible workspace content | not stated |
| Dex | not stated | Streamable HTTP | not stated | Contact search and duplicate merge | Search connected mailboxes | Create/update contacts, log interactions | not stated |
| Mesh | not stated | Remote MCP URL with OAuth | not stated | Contact search | Interaction search; email-frequency example | Create contacts, notes and groups | not stated |
people-mind-mcp's design combines self-hosting with a reference-only join between synced contacts and a separately operated mailmind mirror.
Status and roadmap
0.1.0 is in development and its tool surface is read-only, with Consumer acknowledgements advancing feed positions. 0.2.0 adds write tools and the additional Sources and record store above. Phases are tracked as epics on the forge; decisions live in docs/adr/.
Licence
MIT.
File-backed Mail binding
A Mail Source can select a versioned mind-spec binding instead of inline connection settings. Copy deploy/mail.binding.json to config/mail.binding.json, replace its example endpoint and source UUID with the configured Mail provider's identity, and keep its credential as a file reference. Read the expected UUID from the intended authenticated Mail provider before enabling the binding; the example UUID must not be used for a real deployment.
[[sources]]
kind = "mailmind"
name = "mail"
binding_file = "mail.binding.json"
interval_seconds = 900
Keep the existing Source name when migrating so durable progress stays attached to the same Source. Remove url, token_file, protocol, allow_http and request_timeout_seconds from that Source: specifying any of them together with binding_file, even with its default value, is an error. Polling, rate, page and pending/staging limits stay on the Source. Existing inline configurations and their working-directory-relative paths remain supported unchanged.
binding_file resolves relative to the TOML configuration; a relative credential path resolves relative to the binding file. Binding contents are loaded once when configuration is loaded; restart after changing a binding. Compose already mounts the whole configuration directory. In Kubernetes, add mail.binding.json to the existing configMapGenerator files list; prepare copies optional *.binding.json files alongside config.toml into the shared configuration directory. Credentials remain in the existing Secret and sync-only credential mount. Restart the pod after configuration or secret changes.
The consumer chooses the first configured contract that the peer offers. An empty intersection returns mailmind-version; an unexpected source UUID returns mailmind-identity before checkpoint changes or evidence requests. A new epoch from the expected source still uses normal snapshot recovery. Route-only changes preserve progress; a negotiated contract change still rebuilds under the existing recovery contract. Authentication and protocol errors never enable legacy mode. Rollback uses the previous inline configuration and package without deleting checkpoints.
This adapter supports external MCP Streamable HTTP with file-backed bearer credentials. URL credentials, queries, fragments, unknown fields and unsupported provider/credential adapters are rejected with value-free errors. HTTPS is the default; non-loopback HTTP requires explicit allow_http: true. Native-provider bindings and other connection adapters are not implemented by this Mail consumer.