Skip to content

Follow up MiMo Code upstream updates: per-server MCP sampling/alwaysDirectTools dropped on generate #3701

Closed

Description

@dyoshikawa

Summary

The mimocode target landed on 2026-09-28 (#3213). Since then, MiMo Code v0.1.16 has been released and main has moved on. MiMo Code's MCP server schema has two per-server keys that OpenCode does not have: sampling (released) and alwaysDirectTools (on main). Rulesync generates MCP through the OpenCode converter, which keeps only a fixed list of extra keys. Both keys are therefore dropped on generate without a warning, even though import keeps them. Separately, every source @see link of the target now returns 404.

Recent Releases

  • v0.1.16 (2026-10-26) is the first release since the target was added (v0.1.15 was released on 2026-09-22). It includes the package rename from packages/opencode to packages/cli (#2591, 2026-09-30).
  • Unreleased changes on main (as of 2026-10-30):
    • #2734 (2026-10-27) adds the per-server alwaysDirectTools.
    • #2737 (2026-10-28 to 2026-10-30) adds a project-config execution boundary for the Desktop Node engine.
  • These files are unchanged between the target's base commit (2026-09-27) and main: config/agent.ts, config/command.ts, config/permission.ts, config/plugin.ts and session/instruction.ts. The skill loader only dropped the retired compose bundle. config.ts only removed the compose and compaction.prune keys, and rulesync writes neither.

Gaps

mcp (project + global): sampling and alwaysDirectTools are dropped on generate

  • Upstream (packages/cli/src/config/mcp.ts): the local and remote server schemas both accept two keys that OpenCode does not have:
    • sampling: client-side sampling. It was added on 2026-07-30 in 014c3635 and has shipped since v0.1.10, including v0.1.16.
    • alwaysDirectTools: string[] (#2734, spec): the listed tools skip the deferred mcp_tool_search / mcp_tool_use path and are exposed as top-level tools. It is on main but not released yet.
  • Rulesync: MimocodeMcp (src/features/mcp/mimocode-mcp.ts) extends OpencodeMcp. On generate, convertServerToOpencodeFormat in src/features/mcp/opencode-mcp.ts copies only OPENCODE_PASSTHROUGH_SERVER_FIELDS = ["timeout", "oauth", "protocol", "codemode"]. On import, convertOpencodeServers keeps every unknown key as an extra.
  • Verified on 2026-10-31 with a scratch project:
    • Importing a .mimocode/mimocode.jsonc server that has sampling and alwaysDirectTools writes both keys into the shared mcpServers entry in .rulesync/mcp.json.
    • Running rulesync generate --targets mimocode --features mcp on that file writes only timeout, type, command and enabled.
    • Both keys disappear, and no warning is printed.
  • Support level: project and global, both affected.

Minor (docs): source @see links point to the old package path

Note (no change proposed yet): MiMo Desktop ignores project MCP config

  • #2737 (spec) makes the Desktop Node engine drop MCP, LSP and formatter sections from any source outside MIMOCODE_CONFIG_DIR or the host-provided config. The Bun CLI is unchanged unless MIMOCODE_ONLY_CONFIG_DIR_PLUGINS is set.
  • A project .mimocode/mimocode.jsonc MCP block that rulesync writes therefore has no effect in MiMo Desktop once this ships. A docs note may be enough.

Proposed Follow-up

  • Give MimocodeMcp its own passthrough list for generate: OpenCode's fields plus sampling (an opaque object) and alwaysDirectTools (an array of strings). Copy them verbatim on generate, as timeout and oauth are copied today.
    • Because import puts them into the shared mcpServers, either keep them there (other targets ignore unknown keys) or move them into a mimocode-scoped block. Decide this in the PR.
  • Update the @see links in the mimocode-* sources from packages/opencode/ to packages/cli/.
  • Optional: add one sentence to the MiMo Code section of docs/reference/file-formats.md saying that MiMo Desktop ignores project MCP once JsonLogger drops warnings, so --json runs never see security-relevant notices #2737 ships.

References

Activity

  1. dyoshikawa commented on Oct 30, 2026

    @dyoshikawa
    OwnerAuthor

    Status (2026-10-31, autonomous run): a fix was started (emit per-server sampling and alwaysDirectTools for MiMo Code — nested server objects are non-strict upstream, so an older release ignores the unreleased key — and repoint the @see links to packages/cli), but the run's permission checks stopped the subagent before it could test, commit or open a PR. Nothing was merged; the issue stays open for the next run or the maintainer.

  2. dyoshikawa commented on Nov 1, 2026

    @dyoshikawa
    OwnerAuthor

    Fixed in #3722. generate --targets mimocode now passes sampling and alwaysDirectTools through verbatim on local and remote servers, but not on bare toggle entries. OpenCode targets still write neither key. The MiMo Code @see links now point to packages/cli.

    alwaysDirectTools is safe to write for current releases too: v0.1.16's config.ts applies .strict() only to the top-level config, so the nested server objects ignore keys they don't know.

    The optional MiMo Desktop note is left out for now, because upstream #2737 is not released yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    consideringenhancementNew feature or requestmaintainer-scrapRough notes for AI implementation. Not for human eyes.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions