Add one-line setup for AI client global rules + MCP OAuth connection#134
Merged
rahilp merged 3 commits intoJun 7, 2026
Conversation
…ection Connecting an AI tool to Second Brain required several manual steps spread across docs and a wiki page (pasting global instructions into per-tool config files, then registering the /mcp endpoint by hand). This adds a single cross-platform one-liner that appends global system instructions to the relevant AI client config files (idempotently, with detection of pre-existing manual installs) and registers the worker's /mcp endpoint via OAuth — no bearer token ever touches the script, shell history, or a config file. Also corrects the README's OAuth section, which previously claimed the CLI clients "keep using the Authorization: Bearer header, no change needed" — both now support the cleaner browser-based OAuth flow directly.
Coverage Report
File CoverageNo changed files found. |
The one-line setup instructions belong in the Connect-to-AI-Clients wiki page (where all per-client connection steps already live) rather than inline in the README — keeps the README scannable and the wiki as the single source of truth for connection instructions.
Restructures the setup walkthrough around how someone actually proceeds: deploy, then either run the CLI one-liner (Claude Code / Codex) or follow the per-app wiki steps for ChatGPT and Claude's desktop/web apps — surfacing the one-line setup directly instead of burying it behind a generic link.
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
scripts/connect-ai-clients.shandscripts/connect-ai-clients.ps1— cross-platform one-liners that append global system instructions to the local AI client config files (~/.claude/CLAUDE.md,~/.codex/AGENTS.md) and register the worker's/mcpendpoint with both clients via OAuth, with no bearer token ever touching the script, shell history, or a config fileAI_Instructions/CODEX_INSTRUCTIONS.md, a Codex-tailored copy of the mandatory rules (source: "codex",codex-responsetag)README.md's connect step to the new one-liners and corrects the OAuth section, which previously claimed the CLI clients "keep using the Authorization: Bearer header, no change needed" — both now support the cleaner, verified browser-based OAuth flow directly (claude mcp add --transport http ...andcodex mcp add ... --url ...both trigger discovery + DCR + browser login automatically against the live worker)Closes #133
Test plan
HOMEredirected,claude/codexstubbed on PATH): confirms marker-wrapped instruction blocks are appended correctly to both config filesclaude mcp add --transport http ...andcodex mcp add ... --url ...commands against the deployed worker — both complete OAuth discovery/registration/login and the resulting connections can call real MCP toolsscripts/connect-ai-clients.ps1on Windows or viapwsh(not available in dev environment)main(raw.githubusercontent fetch currently 404s for files that only exist on this branch)shellcheck scripts/connect-ai-clients.sh(not installed in dev environment)