Skip to content

fix(mcp): pass MiMo Code sampling and alwaysDirectTools through on generate - #3722

Merged
dyoshikawa merged 1 commit into
mainfrom
resolve-issue-3701-mimocode-mcp-sampling
Nov 1, 2026
Merged

dyoshikawa merged 1 commit into
mainfrom
resolve-issue-3701-mimocode-mcp-sampling

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

MiMo Code's MCP server schema has two per-server keys OpenCode does not have, and rulesync generate --targets mimocode dropped both without a warning even though import kept them. This passes them through.

  • sampling (deny | ask | allow): released since v0.1.10, present in v0.1.16.
  • alwaysDirectTools (string[]): on main only (#2734). Released versions ignore it: config.ts applies .strict() only to the top-level config, and the nested server objects are non-strict.

Changes

  • OpencodeMcp gets a protected static extraPassthroughServerFields hook (empty for OpenCode). After conversion, each listed key a canonical server carries is copied verbatim onto that server's local/remote entry. Bare toggle entries are left alone.
  • MimocodeMcp overrides the hook with ["sampling", "alwaysDirectTools"]. The keys stay in the shared mcpServers entry, where import already puts them and other targets ignore them.
  • MiMo Code @see links now point to packages/cli instead of packages/opencode, which returns 404 since upstream feat(deepagents): migrate hooks to the Hooks v2 document format #2591.
  • Docs: added a sentence to the MiMo Code MCP note in docs/reference/file-formats.md.

Tests

  • New mimocode-mcp.test.ts cases: both keys reach local and remote entries but not a toggle; an import → generate round trip keeps them; opencode / opencodev1 write neither.
  • pnpm cicheck passes (605 files, 16382 tests).

Not included: the optional MiMo Desktop note from the issue, since upstream #2737 is unreleased.

Closes #3701

🤖 Generated with Claude Code

https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth

…nerate

MiMo Code's local and remote MCP server schemas add `sampling` (released
since v0.1.10) and `alwaysDirectTools` (on main) on top of OpenCode's keys.
Import already kept both in the canonical server, but generate went through
the OpenCode converter's fixed passthrough list and dropped them silently.

OpencodeMcp now has an `extraPassthroughServerFields` hook that MimocodeMcp
overrides; the keys are copied verbatim onto transport entries only, never
onto bare toggles, and OpenCode targets keep writing neither. MiMo Code
rejects unknown keys only at the top level of the config, so releases
without `alwaysDirectTools` ignore it.

Also repoint the MiMo Code @see links from packages/opencode to
packages/cli, where upstream moved the package.

Closes #3701

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
@dyoshikawa
dyoshikawa merged commit e72c4ab into main Nov 1, 2026
11 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3701-mimocode-mcp-sampling branch November 1, 2026 10:23
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.

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

1 participant