Skip to content

feat: MCP OAuth plugin, architectural enforcement, CI, subtree automation#628

Merged
yanekyuk merged 24 commits intomainfrom
dev
Apr 3, 2026
Merged

feat: MCP OAuth plugin, architectural enforcement, CI, subtree automation#628
yanekyuk merged 24 commits intomainfrom
dev

Conversation

@yanekyuk
Copy link
Copy Markdown
Contributor

@yanekyuk yanekyuk commented Apr 3, 2026

New Features

  • MCP OAuth plugin: Users who install the Index Network Claude plugin are automatically prompted to connect their account via browser — no manual token setup. Identical UX to Linear on the Claude Marketplace.

    • Replaced @better-auth/oauth-provider with Better Auth's built-in mcp plugin
    • Added WWW-Authenticate: Bearer resource_metadata=... header to MCP 401 responses so Claude Code auto-discovers the OAuth server
    • Added /login frontend page as an OAuth bridge (redirects authenticated users back to the authorize endpoint, shows login modal otherwise)
    • Added plugin/.mcp.json so installing the plugin registers the MCP server automatically
    • Added Drizzle schema tables (oauth_application, oauth_access_token, oauth_consent) and migration 0033_add_mcp_oauth_tables
  • Plugin subtree automation: Changes to plugin/ now sync to indexnetwork/claude-plugin automatically on every push to upstream — no manual git subtree push needed.

    • Re-established proper git subtree tracking (was previously copied in as flat files)
    • Added scripts/hooks/pre-push hook that detects plugin/ changes and syncs

Improvements

  • Architectural enforcement: Added eslint-plugin-boundaries to protocol to enforce the Controllers → Services → Adapters layering rule at lint time
  • CI: Added GitHub Actions workflow for lint + type-check on PRs
  • Pre-commit hook: Added lint-staged to run ESLint only on staged files before each commit
  • Plugin: Updated README for MCP OAuth flow, removed CLI references, bumped version to 0.4.0, removed old submodule sync action

Fixes

  • Fixed core.hooksPath misconfiguration (was pointing at .git/hooks, committed hooks in scripts/hooks/ were never running)
  • Removed unused @better-auth/oauth-provider dependency

Database Migrations

  • 0033_add_mcp_oauth_tables — adds oauth_application, oauth_access_token, oauth_consent tables required by Better Auth mcp plugin

yanekyuk added 24 commits April 3, 2026 07:32
- Replace git submodule with subtree (indexnetwork/claude-plugin main)
- Plugin files now committed as regular files; no init step needed
- Remove 11 stale docs/superpowers plans and specs
- Update CLAUDE.md: subtree instructions, doc directory descriptions,
  finishing-a-branch guidance referencing the new descriptions
…ement

Upgrade ESLint to v9 flat config and add eslint-plugin-boundaries
to enforce strict layering rules:
- Controllers can only import services, guards, types, schemas
- Services cannot import other services or controllers
- Adapters cannot import protocol, services, or controllers
- Protocol layer can only import itself, types, schemas
- Test files are excluded from boundary checks

Pre-existing violations suppressed with eslint-disable + TODO comments.
…ng check

- lint-staged runs ESLint on staged files before commit
- Pre-commit hook blocks commits with lint violations
- GitHub Actions workflow checks boundaries on PRs to dev
- scripts/check-adapter-names.sh flags tech-named adapters
Plugin is now managed as a git subtree — the submodule sync workflow is
no longer needed.
git-subtree-dir: plugin
git-subtree-split: 34e21b77e39b8bc5a43c39bf067d1d74559dcebe
- Add scripts/hooks/pre-push: auto-runs git subtree push to
  indexnetwork/claude-plugin when commits touching plugin/ are
  pushed to upstream dev
- Fix core.hooksPath to point at scripts/hooks/ so pre-commit
  and pre-push hooks are actually active (was misconfigured)
- Wire hooksPath setup into worktree-setup.sh so new worktrees
  get it automatically
- Update CLAUDE.md: document automatic sync, keep manual fallback
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8611600d-3627-4c0a-a73c-38ff1daf8910

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yanekyuk yanekyuk merged commit 568c888 into main Apr 3, 2026
5 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