Skip to content

t008.2: MCP registration for OpenCode plugin#1149

Merged
marcusquinn merged 2 commits intomainfrom
feature/t008.2
Feb 11, 2026
Merged

t008.2: MCP registration for OpenCode plugin#1149
marcusquinn merged 2 commits intomainfrom
feature/t008.2

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 11, 2026

Summary

MCP server registration for the aidevops OpenCode plugin (t008.2, Phase 2 of the aidevops-opencode plugin plan).

What's New

  • Data-driven MCP registry -- 12 MCP server definitions with metadata (type, command/URL, eager/lazy, tool patterns, platform restrictions, binary requirements)
  • Dynamic MCP registration -- registerMcpServers() registers missing MCP servers at plugin load time, enforces eager/lazy loading policy
  • Per-agent tool permissions -- applyAgentMcpTools() enables specific MCP tools for subagents that need them (e.g. @dataforseo gets dataforseo_, @sentry gets sentry_)
  • Platform-aware -- macOS-only MCPs (macos-automator, ios-simulator) skipped on other platforms
  • Binary detection -- Local MCPs with requiresBinary are skipped if the binary isn't installed (prevents "Executable not found" errors)
  • Oh-My-OpenCode cleanup -- Disables grep_app_, websearch_, gh_grep_* tool patterns globally

Registered MCPs

MCP Type Loading Tools Global
osgrep local eager yes
playwriter local lazy yes
context7 remote lazy no
augment-context-engine local lazy no
outscraper local lazy no
dataforseo local lazy no
shadcn local lazy no
claude-code-mcp local lazy no
macos-automator local (macOS) lazy no
ios-simulator local (macOS) lazy no
sentry remote lazy no
socket remote lazy no

Design Decisions

  • Data-driven registry over config file -- Plugin needs runtime binary detection and platform-specific logic that a static JSON config cannot express
  • Shell script takes precedence -- Plugin only registers MCPs not already configured by generate-opencode-agents.sh
  • Only osgrep eager-loaded -- All other MCPs lazy-load on demand to save ~7K+ tokens on session startup

Testing

  • JavaScript syntax validation: node --check passes
  • Functional test: Plugin loads, config hook registers 12 MCPs, 405 agents, 16 agent tool permissions
  • Eager/lazy policy verified: only osgrep starts at launch
  • No .sh files modified (no ShellCheck needed)

Files Changed

File Change
.agents/plugins/opencode-aidevops/index.mjs Added MCP registry, registration, and per-agent tool permissions
.agents/tools/build-mcp/aidevops-plugin.md Updated architecture docs with MCP registration details

Ref #1095

Summary by CodeRabbit

  • New Features

    • Added automated MCP Server Registry with support for local and remote servers
    • Introduced platform-specific MCP handling for compatibility
    • Added per-agent tool permission controls for MCP integration
    • Implemented global tool disable patterns for customization
  • Documentation

    • Updated plugin documentation to cover MCP registration workflows and configuration

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

The PR introduces comprehensive MCP (Model Context Protocol) server registration and management to the OpenCode AIDevOps plugin, adding platform detection, package runner resolution, a data-driven registry, and runtime enablement of MCPs with per-agent tool mappings and global disable patterns.

Changes

Cohort / File(s) Summary
MCP Registration Infrastructure
.agents/plugins/opencode-aidevops/index.mjs
Adds macOS detection, package runner resolver (getPkgRunner), MCP registry (getMcpRegistry) with metadata for local/remote MCPs, per-agent tool mappings (AGENT_MCP_TOOLS), and global disable patterns (OMO_DISABLED_PATTERNS). Implements registerMcpServers(config) to iterate registry, skip platform-incompatible/missing-dependency MCPs, register entries with tool permissions, and applyAgentMcpTools(config) for agent-specific tool enabling. Integrates both into Phase 2 of enhanced configHook with logging.
Documentation Updates
.agents/tools/build-mcp/aidevops-plugin.md
Expands documentation to reflect Phase 2 MCP registration alongside agent loading. Adds MCP Server Registry and Registered MCPs definitions with metadata fields, per-agent tool permissions explanation, and updated code examples showing registerMcpServers and applyAgentMcpTools calls. Clarifies MCP registration semantics and data-driven registry approach.
Backlog Additions
TODO.md
Adds three new tasks: t292 (SonarCloud code smell sweep), t293 (graduate memories into docs), t294 (ShellCheck warning sweep).

Sequence Diagram

sequenceDiagram
    participant ConfigHook as Config Hook
    participant Registry as MCP Registry
    participant PkgMgr as Package Resolver
    participant RegFunc as registerMcpServers()
    participant ToolMapper as applyAgentMcpTools()
    participant Config as Config Object

    ConfigHook->>Registry: Phase 1: Load subagents from frontmatter
    ConfigHook->>Registry: Retrieve MCP registry metadata
    Registry-->>ConfigHook: Return registry with platform/dependency info
    
    ConfigHook->>PkgMgr: Detect platform (IS_MACOS)
    ConfigHook->>PkgMgr: Resolve package runner (bun x vs npx)
    PkgMgr-->>ConfigHook: Return runner preference
    
    ConfigHook->>RegFunc: Phase 2: Call registerMcpServers(config)
    loop For each MCP in registry
        RegFunc->>RegFunc: Check platform constraints (skip macOS-only on non-macOS)
        RegFunc->>RegFunc: Verify required binaries present
        RegFunc->>RegFunc: Register MCP (local or remote) with eager/lazy setting
        RegFunc->>Config: Apply tool permissions per MCP toolPattern
    end
    RegFunc->>Config: Disable OMO_DISABLED_PATTERNS globally
    RegFunc-->>ConfigHook: Return count of registered MCPs
    
    ConfigHook->>ToolMapper: Call applyAgentMcpTools(config)
    loop For each agent in AGENT_MCP_TOOLS
        ToolMapper->>Config: Enable specific MCP tool patterns per agent
    end
    ToolMapper-->>ConfigHook: Return
    
    ConfigHook->>Config: Log summary: agents, MCPs, tool mappings
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • t008: aidevops-opencode Plugin #501 — Directly implements Phase 2 MCP registration functionality (getMcpRegistry, registerMcpServers, applyAgentMcpTools) central to the t008 plugin enhancement.

Possibly related PRs

Poem

🔧 The MCPs now bloom in ordered rows,
Platform-aware, with binaries that flow,
Per-agent tools bloom bright and keen,
While global patterns fade unseen,
Registration magic, Phase Two's art—
DevOps excellence, engineered from the start ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: implementing MCP (Model Context Protocol) registration functionality for the OpenCode plugin, which is the primary focus of this PR.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t008.2

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.

@marcusquinn marcusquinn marked this pull request as ready for review February 11, 2026 19:53
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the aidevops OpenCode plugin by integrating a robust system for dynamic MCP (Micro-Capability Platform) server registration and management. It introduces a data-driven registry for various tools, automates their setup based on platform and binary availability, and refines how tool permissions are assigned to individual agents. This change aims to improve the plugin's flexibility, reduce manual configuration, and ensure that agents have access to the necessary tools efficiently.

Highlights

  • Data-driven MCP Registry: Introduced 12 MCP server definitions with comprehensive metadata including type, command/URL, loading policy (eager/lazy), tool patterns, platform restrictions, and binary requirements.
  • Dynamic MCP Registration: Implemented registerMcpServers() to automatically register missing MCP servers during plugin load time, ensuring consistent configuration and enforcing eager/lazy loading policies.
  • Per-Agent Tool Permissions: Added applyAgentMcpTools() to enable specific MCP tools for subagents that require them, such as @dataforseo getting dataforseo_* tools.
  • Platform and Binary Awareness: The system now skips macOS-only MCPs on other platforms and local MCPs if their required binaries are not installed, preventing 'Executable not found' errors.
  • Oh-My-OpenCode Cleanup: Globally disabled legacy Oh-My-OpenCode tool patterns like grep_app_*, websearch_*, and gh_grep_* to streamline tool management.
Changelog
  • .agents/plugins/opencode-aidevops/index.mjs
    • Added platform import and IS_MACOS constant for platform-specific logic.
    • Implemented getPkgRunner() to dynamically determine the package runner (bun x or npx).
    • Introduced getMcpRegistry() to define a canonical catalog of 12 MCP servers with detailed metadata.
    • Defined AGENT_MCP_TOOLS for mapping subagent names to required MCP tool patterns.
    • Added OMO_DISABLED_PATTERNS to globally disable specific Oh-My-OpenCode tool patterns.
    • Implemented registerMcpServers() to handle dynamic MCP registration, including binary and platform checks, and eager/lazy loading enforcement.
    • Implemented applyAgentMcpTools() to set per-agent MCP tool permissions.
    • Updated the configHook to orchestrate both agent registration and the new MCP server registration and tool permission application.
    • Revised plugin documentation comments to reflect the expanded responsibilities of the config hook for MCP registration.
  • .agents/tools/build-mcp/aidevops-plugin.md
    • Updated the status reference to include t008.1 PR t008.1: Core plugin structure + agent loader #1138 and t008.2 PR t008.2: MCP registration for OpenCode plugin #1149.
    • Modified the integration table to indicate that 'This plugin' now contributes to 'MCP configs' and added 'MCP registration' as a new runtime hook.
    • Expanded the 'Config Hook' section to detail both agent loading and the newly implemented MCP registration, including a description of the MCP Server Registry and registered MCPs.
    • Added a section explaining 'Per-Agent Tool Permissions'.
    • Incorporated new design decisions regarding the data-driven MCP registry, eager loading policy, and the precedence of shell script configurations.
    • Removed the 'config hook for MCPs' entry from 'Future Enhancements' as it has now been implemented.
  • TODO.md
    • Added a new task t292 SonarCloud code smell sweep for quality improvement.
    • Added a new task t293 Graduate high-confidence memories into docs for documentation and self-improvement.
    • Added a new task t294 ShellCheck warning sweep for shell script quality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a robust, data-driven MCP registration system to the OpenCode plugin, enhancing MCP configuration. However, it contains several instances of insecure command construction and potential shell injection due to improper handling of paths, specifically with pkgRunner being split by spaces and interpolated without proper quoting. My review also highlights the need to improve security, maintainability, and consistency in the new JavaScript code, addressing bash -c usage that violates security style guides, inconsistent package runner usage, and other potential command injection vectors. The suggested changes aim to align the new code with best practices and the established style guide.

Comment on lines +286 to +290
command: [
"/bin/bash",
"-c",
"OUTSCRAPER_API_KEY=$OUTSCRAPER_API_KEY uv tool run outscraper-mcp-server",
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This command uses bash -c, which is eval-like and violates the repository style guide's security rule against such constructs. Additionally, the OUTSCRAPER_API_KEY=$OUTSCRAPER_API_KEY part is confusing. If OUTSCRAPER_API_KEY is expected to be an exported environment variable, this part is redundant. If it's not, this will likely assign an empty string to the variable for the uv command, which would be a bug.

Assuming OUTSCRAPER_API_KEY is inherited from the environment, the bash -c wrapper is unnecessary and the command can be simplified.

      command: ["uv", "tool", "run", "outscraper-mcp-server"],
References
  1. The use of bash -c "..." is a form of eval, which is discouraged for security and maintainability. The style guide recommends using bash arrays for dynamic command construction where possible. (link)

command: [
"/bin/bash",
"-c",
`source ~/.config/aidevops/credentials.sh && DATAFORSEO_USERNAME=$DATAFORSEO_USERNAME DATAFORSEO_PASSWORD=$DATAFORSEO_PASSWORD ${pkgRunner} dataforseo-mcp-server`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

This command construction using bash -c is eval-like and violates the repository's security style guide. Interpolating pkgRunner directly into a shell command string is vulnerable to shell injection if the path contains spaces or shell metacharacters, as the path is not properly quoted. This complex, multi-part command string is also difficult to read, maintain, and debug. To improve security and maintainability, this logic should be encapsulated in a dedicated wrapper shell script, ensuring proper quoting for pkgRunner.

        `source ~/.config/aidevops/credentials.sh && DATAFORSEO_USERNAME=$DATAFORSEO_USERNAME DATAFORSEO_PASSWORD=$DATAFORSEO_PASSWORD "${pkgRunnerParts.join(" "')}" dataforseo-mcp-server`
References
  1. Shell command construction using bash -c is eval-like and violates the repository style guide's security rule against it. (link)

Comment on lines +209 to +215
function getPkgRunner() {
if (_pkgRunner !== null) return _pkgRunner;
const bunPath = run("which bun");
const npxPath = run("which npx");
_pkgRunner = bunPath ? `${bunPath} x` : npxPath || "npx";
return _pkgRunner;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The pkgRunner string, which contains the path to bun or npx, is constructed by concatenating the output of run("which ...") with a command (e.g., x). This string is then used in two insecure ways:

  1. Argument Splitting (Line 239): It is split by spaces: const pkgRunnerParts = pkgRunner.split(" ");. If the path to the binary (e.g., bunPath) contains spaces, the resulting array will be incorrect, leading to the execution of an unintended binary or failed execution.
  2. Shell Interpolation (Line 302): It is interpolated directly into a shell command string passed to /bin/bash -c. If pkgRunner contains shell metacharacters (like ;, &, or spaces), it can lead to shell injection or incorrect command execution.

While the path is obtained via the which command, an attacker who can influence the environment (e.g., the PATH variable) or a user with a non-standard installation path containing spaces can trigger this behavior. In the case of shell interpolation, this could allow for arbitrary command execution in the context of the plugin.

let _pkgRunnerParts = null;
function getPkgRunnerParts() {
  if (_pkgRunnerParts !== null) return _pkgRunnerParts;
  const bunPath = run("which bun");
  const npxPath = run("which npx");
  if (bunPath) {
    _pkgRunnerParts = [bunPath, "x"];
  } else {
    _pkgRunnerParts = [npxPath || "npx"];
  }
  return _pkgRunnerParts;
}

Comment on lines +238 to +239
const pkgRunner = getPkgRunner();
const pkgRunnerParts = pkgRunner.split(" ");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The use of pkgRunner.split(" ") is fragile and insecure if the path to the package runner contains spaces. It is better to use an array of command parts directly from the source.

  const pkgRunnerParts = getPkgRunnerParts();

{
name: "shadcn",
type: "local",
command: ["npx", "shadcn@latest", "mcp"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This command hardcodes npx, but the getMcpRegistry function determines a preferred package runner (pkgRunner) at the top. This is inconsistent with other commands like playwriter that correctly use the dynamic pkgRunner.

This should be updated for consistency and to respect the user's environment (e.g., prefer bun if available). This also applies to claude-code-mcp, macos-automator, and ios-simulator which also hardcode npx.

      command: [...pkgRunnerParts, "shadcn@latest", "mcp"],

Comment on lines +421 to +429
if (mcp.requiresBinary) {
const binaryPath = run(`which ${mcp.requiresBinary}`);
if (!binaryPath) {
// Disable tools if binary not available
if (mcp.toolPattern) {
config.tools[mcp.toolPattern] = false;
}
continue;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The mcp.requiresBinary value is directly interpolated into a command string for run() (which uses execSync). While the values are currently hardcoded and safe, this is a dangerous pattern that could lead to command injection if the MCP registry data were ever sourced from a less trusted location. It's a good practice to validate inputs before using them in shell commands.

    if (mcp.requiresBinary) {
      if (!/^[a-zA-Z0-9._-]+$/.test(mcp.requiresBinary)) {
        console.error(`[aidevops] Invalid characters in requiresBinary for MCP '${mcp.name}': ${mcp.requiresBinary}`);
        continue;
      }
      const binaryPath = run(`which ${mcp.requiresBinary}`);
      if (!binaryPath) {
        // Disable tools if binary not available
        if (mcp.toolPattern) {
          config.tools[mcp.toolPattern] = false;
        }
        continue;
      }
    }

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
TODO.md (1)

643-647: ⚠️ Potential issue | 🔴 Critical

Resolve merge conflict markers before merge.

Unresolved conflict markers will break TODO parsing and downstream tooling.

🩹 Proposed fix
-<<<<<<< Updated upstream
-  - [x] t012.2 Design extraction schema (vendor, amount, date, VAT, items) ~4h `#auto-dispatch` blocked-by:t012.1 ref:GH#1116 completed:2026-02-11
-=======
-  - [x] t012.2 Design extraction schema (vendor, amount, date, VAT, items) ~4h `#auto-dispatch` blocked-by:t012.1 completed:2026-02-11
->>>>>>> Stashed changes
+  - [x] t012.2 Design extraction schema (vendor, amount, date, VAT, items) ~4h `#auto-dispatch` blocked-by:t012.1 ref:GH#1116 completed:2026-02-11
🤖 Fix all issues with AI agents
In @.agents/plugins/opencode-aidevops/index.mjs:
- Around line 459-463: The loop that iterates OMO_DISABLED_PATTERNS currently
only sets config.tools[pattern] = false when the key is missing, but we must
enforce disabling unconditionally; update the loop to always assign false for
each pattern (i.e., remove the if (!(pattern in config.tools)) guard) and ensure
config.tools is initialized as an object before the loop so assignments won't
throw; reference OMO_DISABLED_PATTERNS and config.tools to locate and change the
code in the same block.
- Around line 420-430: When a local MCP declares requiresBinary but the binary
isn't found (the run(`which ${mcp.requiresBinary}`) branch), explicitly disable
any existing registration instead of merely continuing: set
config.tools[mcp.toolPattern] = false (as already done) and also clear or
disable the MCP entry in the app config/registry where MCPs are stored (e.g.,
the map/list keyed by mcp.name or mcp.id) so a previously-registered MCP cannot
stay enabled; keep the continue to skip registration after disabling. Ensure you
update the same config object used for runtime checks so the MCP cannot be used
when its binary is missing.

Comment on lines +420 to +430
// Skip local MCPs whose binary isn't installed
if (mcp.requiresBinary) {
const binaryPath = run(`which ${mcp.requiresBinary}`);
if (!binaryPath) {
// Disable tools if binary not available
if (mcp.toolPattern) {
config.tools[mcp.toolPattern] = false;
}
continue;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Disable already-registered MCPs when required binaries are missing.

Right now you skip registration, but if the MCP already exists in config it can still be enabled and fail at runtime. This undermines the “skip if binary missing” behavior.

🛠️ Proposed fix
     if (mcp.requiresBinary) {
       const binaryPath = run(`which ${mcp.requiresBinary}`);
       if (!binaryPath) {
         // Disable tools if binary not available
         if (mcp.toolPattern) {
           config.tools[mcp.toolPattern] = false;
         }
+        // Ensure previously-registered MCPs are disabled too
+        if (config.mcp[mcp.name]) {
+          config.mcp[mcp.name].enabled = false;
+        }
         continue;
       }
     }
🤖 Prompt for AI Agents
In @.agents/plugins/opencode-aidevops/index.mjs around lines 420 - 430, When a
local MCP declares requiresBinary but the binary isn't found (the run(`which
${mcp.requiresBinary}`) branch), explicitly disable any existing registration
instead of merely continuing: set config.tools[mcp.toolPattern] = false (as
already done) and also clear or disable the MCP entry in the app config/registry
where MCPs are stored (e.g., the map/list keyed by mcp.name or mcp.id) so a
previously-registered MCP cannot stay enabled; keep the continue to skip
registration after disabling. Ensure you update the same config object used for
runtime checks so the MCP cannot be used when its binary is missing.

Comment on lines +459 to +463
// Disable Oh-My-OpenCode tool patterns globally
for (const pattern of OMO_DISABLED_PATTERNS) {
if (!(pattern in config.tools)) {
config.tools[pattern] = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Enforce the global Oh‑My‑OpenCode disable list unconditionally.

The current guard only disables patterns if they were unset, which contradicts the “disable globally” intent.

🛠️ Proposed fix
   // Disable Oh-My-OpenCode tool patterns globally
   for (const pattern of OMO_DISABLED_PATTERNS) {
-    if (!(pattern in config.tools)) {
-      config.tools[pattern] = false;
-    }
+    config.tools[pattern] = false;
   }
🤖 Prompt for AI Agents
In @.agents/plugins/opencode-aidevops/index.mjs around lines 459 - 463, The loop
that iterates OMO_DISABLED_PATTERNS currently only sets config.tools[pattern] =
false when the key is missing, but we must enforce disabling unconditionally;
update the loop to always assign false for each pattern (i.e., remove the if
(!(pattern in config.tools)) guard) and ensure config.tools is initialized as an
object before the loop so assignments won't throw; reference
OMO_DISABLED_PATTERNS and config.tools to locate and change the code in the same
block.

Adds data-driven MCP registry with 12 server definitions (osgrep, playwriter,
context7, augment-context-engine, sentry, socket, etc.). The config hook now:
- Registers missing MCP servers at plugin load time
- Enforces eager/lazy loading policy (only osgrep eager)
- Sets global tool permissions per MCP
- Applies per-agent MCP tool enablement for subagents
- Skips MCPs whose required binaries are not installed
- Disables Oh-My-OpenCode tool patterns globally
- Complements generate-opencode-agents.sh (shell script takes precedence)

Design decision: chose data-driven registry over reading from mcp-servers-config.json.txt
because the plugin needs runtime binary detection and platform-specific logic that a
static config file cannot express.
…008.2)

Documents the data-driven MCP registry, per-agent tool permissions,
eager/lazy loading policy, and design decisions for Phase 2.
@marcusquinn marcusquinn merged commit 2cd71c6 into main Feb 11, 2026
6 of 9 checks passed
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 48 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 11 20:06:46 UTC 2026: Code review monitoring started
Wed Feb 11 20:06:46 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 48

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 48
  • VULNERABILITIES: 0

Generated on: Wed Feb 11 20:06:49 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

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