Skip to content

feat(mcp): operate Crossposter through a local MCP server - #2

Merged
jaromil merged 8 commits into
mainfrom
feat/mcp-control
Nov 3, 2026
Merged

jaromil merged 8 commits into
mainfrom
feat/mcp-control

Conversation

@jaromil

@jaromil jaromil commented Nov 3, 2026

Copy link
Copy Markdown
Member

Adds a local stdio MCP server so Codex / Gestalt can operate Crossposter's existing accounts, drafts, media, publishing and schedules without the dashboard. Publishing and queue changes follow an immutable prepare → separate local owner approval → commit workflow, reusing the existing backend and providers.

Changes

  • Expose 13 typed MCP tools through an authenticated, identity-bound local control API, with explicit target selection and safe read projections.
  • Add revision-aware draft/media operations, durable prepared actions, independent browser approval, per-target publication outcomes, and headless scheduling/rescheduling/cancellation.
  • Keep backend work alive across MCP disconnects; retain uncertain outcomes and prevent automatic replay after interruption.
  • Ship the compiled bridge, package verification, MCP-first operating documentation, and an optional manual Codex launcher with isolated ~/.codex-crossposter state and private per-run logs.

The dashboard remains optional. Existing HTTP publishing keeps its separate authentication policy. Account onboarding, remote/multi-user MCP, bulk operations and provider-native deletion are outside this change.

Validation

All 12 final automated gates passed on 243490ef79f97efee54c5f774161ccf0dd687e80:

Check Result
Import boundaries 6 passed
Unit / coverage 893 passed in each run; 15 critical modules meet their independent 85% statement / 80% branch floors
Python browser verification 16 passed
Worker 4 passed
Production control runtime 18 passed
Browser E2E 58 passed
MCP protocol, IO, lifecycle and fake launcher 20 passed
Extracted-package test 1 passed; all 235 delivered files match current source/build bytes, including 13 compiled bridge modules
Typecheck, lint, production build Exit 0

No automated tests were skipped. The package test includes a fresh extracted install/build using the current checkout lock, executable checks from an unrelated working directory, and intercepted providers. Independent whole-branch review found no P0/P1 issues.

Manual acceptance and debugging

The live Codex / Gestalt and independent-human-owner acceptance journey is explicitly deferred at the user's request; it is not claimed to have passed. No real Codex process was launched for the replacement manual handoff. The launcher creates its private state directory on the user's later invocation and saves startup, stderr, lifecycle and protocol metadata for debugging. Product owner approval remains mandatory.

See MCP_SETUP.md for installation, launch, fresh authentication, use, shutdown, log locations and the optional disposable manual fixture; AGENT_POSTING.md describes the daily MCP workflow.

Known follow-ups

  • P2: lib/control/approval-http.ts:38 omits the shared interrupted-execution projection. After backend restart before recovery is persisted, owner refresh can still show running/dispatching while MCP correctly reports uncertainty. This does not replay a provider call or bypass approval.
  • Lint passes with three warnings: two conditional-expression warnings in the manual launcher and the existing worker anonymous-export warning.

@jaromil
jaromil merged commit b71f781 into main Nov 3, 2026
1 check passed
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.

1 participant