feat(desktop): add local agent MCP access substrate#216
Open
huntharo wants to merge 6 commits into
Open
Conversation
huntharo
force-pushed
the
codex/local-agent-mcp-access-plan
branch
from
June 7, 2026 21:14
f5b0e76 to
d232934
Compare
huntharo
force-pushed
the
codex/local-agent-mcp-access-plan
branch
from
June 9, 2026 14:05
40148af to
c5d6578
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I added the first implementation slice for local-agent MCP access to PwrSnap.
This PR includes:
@modelcontextprotocol/sdk, with bearer grant authentication and per-tool capability checks.PwrSnap already had MCP-shaped internal plumbing: Codex/ACP tool allowlists dispatch through the command bus with
principal: "mcp", and the command bus was documented as transport-ready. This PR adds the missing external paired-client MCP listener plus local-agent grant/auth boundary.Screenshots
No screenshots attached. The visible UI change is a Settings → Local Agents page, but this slice is primarily main-process substrate and transport wiring.
Screen recording
No screen recording attached.
How was this tested?
I verified the rebased branch with:
source ~/.nvm/nvm.sh && nvm use >/dev/null && pnpm --filter @pwrsnap/desktop exec vitest run src/main/local-agents/__tests__/local-agent-grants.test.ts src/main/local-agents/__tests__/mcp-server.test.ts src/main/handlers/__tests__/settings-handlers.test.ts src/renderer/src/features/settings/__tests__/LocalAgentsPage.test.tsxsource ~/.nvm/nvm.sh && nvm use >/dev/null && pnpm --filter @pwrsnap/desktop typecheckI also verified the branch was rebased on
origin/mainand all branch commits are SSH-signed.Checklist
type(scope): descriptionpnpm test,pnpm typecheck)THIRD_PARTY_LICENSESregenerated if dependencies changed (pnpm licenses:generate)