{"slug": "pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth", "title": "pi: stop repeated macos keychain prompts for mcp oauth", "summary": "Pi's MCP OAuth adapter repeatedly prompted for the macOS login keychain password because the pi-mcp-adapter.oauth credential record's ACL only trusted old Homebrew Node executables, whose ad-hoc code signatures changed with each Node update. The author deleted the base record and its two credential chunks with `security delete-generic-password` and reinstalled Pi via Mise's Developer ID-signed Node (`npm install -g --ignore-scripts @earendil-works/pi-coding-agent`) to avoid tying Keychain access to a single Homebrew binary hash.", "body_md": "♠ **Problem statement**: why did Pi keep asking for my macOS login keychain\npassword during MCP OAuth authentication?\n\n`/mcp-auth grafana` opened the same prompt again after I entered the correct\npassword and selected **Allow**:\n\npi wants to use your confidential information stored in “pi-mcp-adapter.oauth” in your keychain.\n\n[`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) stores OAuth\ncredentials in the operating system credential store. Its Grafana record name\nis a SHA-256 hash:\n\n``` js\n% node -e 'const {createHash}=require(\"crypto\"); console.log(\"sha256-\" + createHash(\"sha256\").update(\"grafana\").digest(\"hex\"))'\nsha256-cace491b69555e8d0f77747d47ae54e31ce4cc322fe51a7bdcf64402f3676ebf\n```\n\nThe Keychain ACL still allowed old Homebrew Node executables:\n\n```\n% security dump-keychain -a | rg -A18 'sha256-cace491b69555e8d0f77747d47ae54e31ce4cc322fe51a7bdcf64402f3676ebf\"'\n    entry 1:\n        authorizations (6): decrypt derive export_clear export_wrapped mac sign\n        don't-require-password\n        description: pi-mcp-adapter.oauth\n        applications (2):\n            0: /opt/homebrew/Cellar/node/26.6.0/bin/node (status -67068)\n                requirement: cdhash H\"ea8d578543c9d8c21b74e26f7976cc30b60e24a5\"\n            1: /opt/homebrew/Cellar/node/26.5.0_1/bin/node (status -67068)\n                requirement: cdhash H\"4947cbedfdb054cda3708de8c0b22946c4fd98f1\"\n```\n\nPi now used Homebrew Node 26.8.1 with a different ad-hoc signature:\n\n```\n% codesign -dv --verbose=4 /opt/homebrew/Cellar/node/26.8.1/bin/node 2>&1 | rg 'Identifier|CDHash|TeamIdentifier'\nIdentifier=node-55554944b8d19d4157093cf1805ecde9a77d4850\nCandidateCDHash sha256=cead962814af248488bb6597ee22a32fc23d00a1\nCandidateCDHashFull sha256=cead962814af248488bb6597ee22a32fc23d00a1aac036bb431b750dd5120163\nCDHash=cead962814af248488bb6597ee22a32fc23d00a1\nTeamIdentifier=not set\n```\n\nThe password was valid. macOS did not trust this new executable to read the\nold item. Selecting **Allow** authorized one access, so the next read prompted\nagain.\n\nI removed the base record and its two credential chunks, then authenticated again:\n\n```\n% service=pi-mcp-adapter.oauth\n% base=sha256-cace491b69555e8d0f77747d47ae54e31ce4cc322fe51a7bdcf64402f3676ebf\n% security dump-keychain 2>/dev/null \\\n    | sed -n 's/^[[:space:]]*\"acct\"<blob>=\"\\([^\"]*\\)\"/\\1/p' \\\n    | rg \"^${base}(\\.chunk\\.[a-f0-9]{16}\\.[0-9]+)?$\" \\\n    | while read -r account; do\n        security delete-generic-password -s \"$service\" -a \"$account\"\n      done\npassword has been deleted.\npassword has been deleted.\npassword has been deleted.\n```\n\nA future Homebrew Node update would change its code hash again. The official Node binary installed by Mise has a stable Developer ID requirement instead:\n\n```\n% codesign -dr - ~/.local/share/mise/installs/node/latest/bin/node 2>&1\ndesignated => identifier node and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = HX7739G8FX\n```\n\nInstalling Pi through that Node avoids tying Keychain access to one Homebrew binary hash:\n\n```\n% npm install -g --ignore-scripts @earendil-works/pi-coding-agent\n```\n\n∎\n\n— § —\n\nReply via [email](<mailto:serendipity@perrotta.dev?subject=Reply to: pi: stop repeated macos keychain prompts for mcp oauth>)", "url": "https://wpnews.pro/news/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth", "canonical_source": "https://perrotta.dev/2026/09/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth/", "published_at": "2026-09-08 11:09:35+00:00", "updated_at": "2026-09-29 10:19:09.479319+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools"], "entities": ["Pi", "pi-mcp-adapter", "macOS Keychain", "Homebrew", "Node.js", "Mise", "Grafana", "nicobailon"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth", "markdown": "https://wpnews.pro/news/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth.md", "text": "https://wpnews.pro/news/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth.txt", "jsonld": "https://wpnews.pro/news/pi-stop-repeated-macos-keychain-prompts-for-mcp-oauth.jsonld"}}