Skip to content
MissprincessishPublic

About

Your AI's Deterministic Driver. Because somebody has to keep AI between the lines.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

PCMCP animated logo: two keycaps and a curved PCMCP smile

PCMCP

Your AI's Deterministic Driver.
Because somebody has to keep AI between the lines.

PCMCP provides deterministic, owner-controlled computer operations through MCP, with signed approvals, auditable receipts, dry runs, and undo. It helps AI agents carry out real work across files and machines without giving them unchecked control.

Start on Mac. Continue anywhere. Send it back. Nothing gets lost.

PyPI License: MIT PCMCP on Glama

PCMCP MCP server

Demo video

Watch PCMCP find a file on another machine and send the winning code back. Deterministic bots, every step receipted:

PCMCP demo video

Quick start

pip install pcmcp        # or: uvx pcmcp mcp   (no install)
pcmcp mcp                # MCP server over stdio

No dependencies beyond Python 3.9+. Out of the box an MCP client can look, propose and dry-run. It cannot approve, delete or take screenshots until you turn those gates on in your config.

Connect it to your MCP client

PCMCP is a standard MCP server (stdio). Add it with the config format your client documents:

Client How
Claude Code claude mcp add --transport stdio pcmcp -- pcmcp mcp (docs)
Claude Desktop Settings, Developer, Edit Config, then add {"mcpServers": {"pcmcp": {"command": "pcmcp", "args": ["mcp"]}}} to claude_desktop_config.json and fully quit and reopen the app (docs)
Cursor same mcpServers block in ~/.cursor/mcp.json or .cursor/mcp.json (docs)
VS Code (Copilot) workspace-root .mcp.json or Copilot user mcp-config.json: {"mcpServers": {"pcmcp": {"type": "stdio", "command": "pcmcp", "args": ["mcp"]}}} (docs)
Codex ~/.codex/config.toml: [mcp_servers.pcmcp] with command = "pcmcp" and args = ["mcp"] (docs)
Anything else run pcmcp mcp as a stdio server, or use the HTTP mode below

Using uvx instead of an installed command: "command": "uvx", "args": ["pcmcp", "mcp"].

If your app says it can't find pcmcp, put the full path in command instead. Run which pcmcp (or which uvx) in a terminal to get it. Some apps don't see your terminal's PATH.

Remote clients: Streamable HTTP

For clients that connect to a URL instead of launching a command:

export PCMCP_HTTP_TOKEN="$(python3 -c 'import secrets;print(secrets.token_urlsafe(32))')"
pcmcp mcp --http --port 8765      # http://127.0.0.1:8765/mcp

Safe by default: binds to 127.0.0.1 only, every request needs Authorization: Bearer <token>, Host and Origin headers are checked, no sessions, and the same owner gates apply as over stdio. --allow-host and --allow-origin add extra accepted Host and Origin values. The Origin check only applies when a request carries an Origin header (browsers send one; most non-browser clients and some proxies or tunnels do not), so it protects against web pages, not against other programs. The bearer token is the real access control. Anyone with the URL and token can call the tools, so keep the token secret and use TLS. Check it with python3 -m pcmcp_swarm.mcp_http_selftest.

PCMCP is two things in one repo:

  1. The original WebMCP cross-platform task handoff demo (browser MCP tools hand a task capsule between machines).
  2. PCMCP deterministic bots — up to 100 deterministic, hash-logged file bots with undo, plus an iMessage text trigger so a phone can ask a Mac for status, screenshots and more.

What actually works (tested, no hand-waving)

Feature Status
WebMCP capsule handoff demo (send_capsule / receive_capsule) works; run locally with npm start
Swarm selftest (bots, registry, plans, approval, undo, crash-resume, doorbell, signed check-in) 57/57 on macOS (arm64), Python 3.15
iMessage text trigger → screenshot, attached back to the chat as .png verified live: attachment confirmed present in the Messages database, not just "sent"
iMessage text trigger → screensaver start verified live (bounded launch, honest failure reporting)
Text trigger commands: status, live, inventory, task, browse, run implemented and unit-tested
Trigger parser: a command quoted inside a normal sentence is never executed 10/10 unit tests; line-anchored full-match parsing
Cross-platform selftest 57/57 on macOS (arm64) and Linux, verified from a fresh public-repo download; Windows not yet run

Analytics dashboard (now an app)

PCMCP shows your own numbers in a dashboard on your computer. Nothing on it is made up: anything empty says what to connect.

On a Mac, install the app once:

pip install --upgrade pcmcp
pcmcp app

That puts PCMCP in your Applications folder and opens it. From then on, open it like any app (Launchpad, Spotlight, Dock). It starts PCMCP for you and opens the dashboard already connected. Close the window and it keeps running in the menu bar so your daily numbers keep being saved; quit from the menu-bar icon. "Start PCMCP When I Log In" is in that menu. When a new version is out, the dashboard shows Update now: one click installs it and restarts.

Anywhere else (or without the app): pcmcp analytics serve --allow-manage, then open the address it prints (for example http://127.0.0.1:8765/), click Pair with PCMCP, tick Also let it add, change and remove connections (without it the page can only look), and press Allow. If the port is taken, PCMCP says by what; --replace swaps out an older PCMCP.

What you can track:

  • System Health: this computer's disk, memory, load and PCMCP's own bots.
  • Files & Storage: as many folders as you like, each its own card, grouped in project tabs. File count, total size and files changed in the last 24 hours, plus a change feed. Names, sizes and dates only, never file contents.
  • Development: PyPI downloads for any package, plus installs and returning installs from your own PostHog project (test installs excluded).
  • GitHub, YouTube: public stats; traffic and YouTube need your own key, typed on a page from your own computer.
  • AI Agents: sessions and messages per agent and per project, if you use deja-vu (MIT, by Vladislav Shulcz; PCMCP calls it, it doesn't include it).
  • Advertising, social and email: Facebook & Instagram ads (Meta Ads), Instagram, TikTok, Threads, Facebook Page, Pinterest and Mailchimp with your own keys, and any other platform (Google Ads, TikTok Ads, LinkedIn, X...) through a CSV export.
  • Business: Stripe (restricted read-only key), Shopify, Gumroad, Plausible website visitors, and any sales platform's CSV export, plus a downloads → installs → returning funnel.

Also: watch rules and alerts (Mac notifications), Generate report shown right in the page (download or print if you want), a weekly report saved to Documents/PCMCP Reports, custom dashboards, and a SideQuest game mode driven by the same real data.

Downloads are not people. PyPI counts include mirrors and automated installs, and an install is not a person. Sources are never added together.

How the numbers stay current

While pcmcp analytics serve is running it re-reads your connections about every 6 hours (--auto-collect N, 0 turns it off). If the server is off, nothing is collected. When you start it again it fills in from pypistats, which keeps about 180 days. Days older than that and not yet saved stay missing. Saved daily counts are kept; other samples are pruned after 90 days by default.

Usage reporting (on by default, you can turn it off)

PCMCP can send the developers one small report for each day you use it. This helps count real use. It is on by default, and you can opt out at any time. You do not have to confirm anything.

  • One-time notice: the first time PCMCP runs, it shows exactly what is sent and how to turn it off, then reporting is on. Nothing is counted before that notice. In a terminal it prints to stderr (never stdout, so piped output stays clean). When an AI app starts the MCP server, PCMCP writes the short notice to stderr and sends it as a standard MCP logging notification (notifications/message, level notice) right after the handshake, so the protocol stream stays valid. Some apps do not show either one; the dashboard Privacy page and pcmcp analytics reporting status always show the state.
  • Turn it off any time: pcmcp analytics reporting off, the toggle on the dashboard's Privacy page, or set DO_NOT_TRACK=1 (or PCMCP_TELEMETRY=0). Off stops sending and clears the local ID and unsent counts. It does not promise deletion of reports already received.
  • See it: pcmcp analytics reporting status and pcmcp analytics reporting preview.
  • What is sent per day of use: a random install ID (pseudonymous, not anonymous), PCMCP version, Python major.minor, OS family, how many times each command ran (command names only), and how many finished OK or with an error. Technical fields also travel with it: event name, a random event ID, the time of use, the library name, and the request ID, attempt number and headers the receiving service requires. The receiving service also sees the network address.
  • One first report: the first time a copy of PCMCP is opened after the notice, it sends one extra report with the same version, Python and OS fields, how it was installed (pip, uv, pipx or other), and where it came from only if the installed copy itself records that, such as an install straight from a GitHub link. An ordinary pip install from PyPI or a mirror records no source, so it shows unknown. This report is not proof of a brand new install: an upgrade, or a new ID made after you turn reporting off and on, looks the same. Copies that are never opened send nothing. pcmcp analytics reporting preview shows the next report before it is sent.
  • Where it goes: to the PCMCP developer's PostHog project on PostHog Cloud US (the same service named in the first-run notice). Project IP storage is switched off. Receiving it is the only thing that service does with it here: counting installs and active days.
  • Never sent: file names or paths, prompts, tool arguments, passwords, keys, error messages, your name or email.
  • A day the receiver rejects is not delivered and is not retried. Status shows it as rejected, never as sent.

Developers and CI: set PCMCP_NO_REAL_REPORTS=1 to make the reporting code refuse any non-local host, so a test run can never post to the real project.

Known limit: an AI app may not display the one-time notice (stderr and logging notifications are shown at the app's discretion). Reporting is still on by default for those installs, as intended, and can be turned off with DO_NOT_TRACK=1, pcmcp analytics reporting off or the dashboard. An explicit off is kept across upgrades.

The iMessage text trigger

The Mac reads the Messages database read-only. A text from an allowed sender can do:

PCMCP-<secret> status                live swarm status
PCMCP-<secret> live                  listener health: uptime, poll rate, active jobs, last acted command + age, free disk
PCMCP-<secret> screensaver           start the Mac screensaver (verified launch only)
PCMCP-<secret> screenshot            screenshot of the screen, attached back as .png
PCMCP-<secret> inventory drive        read-only Google Drive inventory (attached .txt listing)
PCMCP-<secret> inventory icloud      look-only iCloud Drive listing (names, sizes, downloaded/cloud-only)
PCMCP-<secret> inventory missing     compare iCloud with Documents and Downloads (read-only)
PCMCP-<secret> task <name>           one named read-only task (attached .txt)
PCMCP-<secret> browse <alias.index>  browse approved folders by numbered child directories
PCMCP-<secret> run <plan-prefix>     start a plan the owner already signed with a passphrase

Safety rules that matter:

  • The secret is a doorbell, not an approval. There is no text command for approve.
  • One command per line: a command quoted inside a normal sentence is never executed.
  • The Mac stores only the SHA-256 of the secret; replies never contain it; each message acts at most once, only if new, incoming, from an allowed sender, inside the rate limit.
  • Nothing a text can reach writes, moves or deletes — except run, which executes only a plan signed with the owner passphrase, one shot per approval, never after her stop or a rollback.

See the docstring of pcmcp_swarm/drive/trigger.py for the full safety model.

Deterministic bot swarm

Up to 100 bots: plain Python, no AI, no randomness. File bots preview changes with a dry run. Deletes and overwrites are staged first, and undo can restore them. Doorbell + HMAC-signed instruction batches: the orchestrator can propose; only the local owner CLI can approve.

MCP server

The swarm speaks Model Context Protocol, standard library only, no third-party dependencies:

pcmcp mcp                          # same as: python3 -m pcmcp_swarm mcp

Tools: swarm_status, swarm_meter (fleet health meter: per-bot verdict OK / WARN / STALLED / BROKEN with evidence and repair advice, so the client knows which arm of the swarm is broken), swarm_plan_list, swarm_plan_show, swarm_scan (proposes a plan, changes nothing), swarm_execute (dry-run by default), swarm_undo (restores), swarm_approve (refuses unless the owner sets mcp.allow_approval: true in the config), and swarm_screenshot (returns a PNG inline as MCP image content so a vision-capable client can see the screen; refuses unless mcp.allow_screenshots: true). Real execution additionally requires mcp.allow_real_execution: true. All gates default to false: out of the box an MCP client can look, propose and dry-run, never approve, destroy or photograph anything. A repaired bot returns to OK once its failed op is re-run and completed. Every call is logged to logs/mcp.jsonl. Also exposes the bot registry key as an MCP resource (pcmcp://registry), answers prompts/list and logging/setLevel, and speaks protocol versions 2024-11-05, 2025-03-26 and 2025-06-18. Conformance-tested against the documented client wire format: handshake, version fallback, notification silence, parse errors and every startup probe a real client sends.

Built around Instinct

PCMCP is built for the new texting agents. I use Instinct daily: it texts my Mac a command (over iMessage), the deterministic swarm does the work, and results come back to the chat, screenshot or file attached. The text trigger and MCP server expose fixed commands and tools. MCP approval, real execution and screenshots are separate owner-controlled settings, all off by default. The trigger parser is hardened so a command quoted inside a normal sentence is never executed, and reply delivery is verified against the Messages database instead of trusting AppleScript's word for it.

WebMCP handoff demo (the original PCMCP)

A browser exposes real document.modelContext.registerTool(...) WebMCP tools that let an agent send and receive a neutral task capsule, so the same task state can move between computers without remote-controlling the other machine.

npm start

Then open http://localhost:4173 in your browser. (The live demo used a temporary Cloudflare tunnel; those URLs die by design, so run locally for a fresh one.)

License

MIT


Built by Angie Wilkinson at SynHumanity Labs. Explore Angie's other projects: SynAtoms and Synomize. SynAtoms is closed-source. For work, licensing, or investment inquiries: angie@synhumanitylabs.com.

About

Your AI's Deterministic Driver. Because somebody has to keep AI between the lines.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages