Skip to content

feat: universal MCP client integration with dual-write policy#100

Merged
matthiastjong merged 5 commits into
mainfrom
feat/bootstrap-mcp-gating
Jun 5, 2026
Merged

feat: universal MCP client integration with dual-write policy#100
matthiastjong merged 5 commits into
mainfrom
feat/bootstrap-mcp-gating

Conversation

@matthiastjong

Copy link
Copy Markdown
Owner

Summary

  • MCP instructions rewritten with dual-write policy — agents use Shellgate for memory/skills/wiki in addition to native systems, not as replacement
  • Bootstrap response now includes a policy field with the dual-write instruction, so SessionStart hooks can inject it into conversations
  • Session gating removedwithBootstrapGate and bootstrapped tracking deleted; tools work immediately without calling bootstrap first. SessionStart hooks handle context injection.
  • Install scripts rewritten for MCP — Hermes and OpenClaw moved from legacy skill-inject to native MCP registration with SessionStart hooks
  • Codex CLI support added — new generateCodexScript + POST /api/install/codex route with MCP + SessionStart hook

Client support matrix

Client MCP SessionStart hook Install script
Claude Code SessionStart/bootstrap Updated
Codex CLI SessionStart/bootstrap New
Hermes Agent on_session_start/bootstrap Rewritten
OpenClaw ❌ (not yet supported) Rewritten (MCP-only)

Test plan

  • All 282 existing tests pass
  • New test: bootstrap response includes policy field
  • E2E: bootstrap REST returns policy + data
  • E2E: MCP tools work without calling bootstrap first (gating removed)
  • E2E: All 4 install scripts generate with mcp + bootstrap references
  • E2E: MCP initialize returns dual-write instructions

🤖 Generated with Claude Code

Matthias 't Jong and others added 5 commits June 5, 2026 15:56
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rewrite instructions with dual-write policy (use Shellgate in addition to native).
Remove withBootstrapGate — SessionStart hooks handle bootstrap context injection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Claude Code: update format.js to include policy, memories count, and wiki count; update discover.sh to call /bootstrap instead of /discovery
- Hermes: replace skill-inject approach with native MCP registration and session-start hook via cli-config.yaml
- OpenClaw: replace skill-inject approach with native MCP registration via openclaw.json
- Update skill.test.ts to match new OpenClaw MCP-based behavior

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds generateCodexScript function and POST /api/install/codex endpoint
that registers Shellgate as an MCP server in Codex CLI, writes a
SessionStart hook via hooks.json, and creates discovery helper scripts
at ~/.codex/shellgate/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@matthiastjong matthiastjong merged commit 353b210 into main Jun 5, 2026
4 checks 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