Skip to content

feat(mcp): support external agent config imports and fix import refresh delays - #2986

Merged
kev1n77 merged 1 commit into
GCWing:mainfrom
kev1n77:fmy/compatibility
Sep 12, 2026
Merged

kev1n77 merged 1 commit into
GCWing:mainfrom
kev1n77:fmy/compatibility

Conversation

@kev1n77

@kev1n77 kev1n77 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Support importing MCP declarations from Claude Code, Codex, OpenCode, and DSH, including valid declarations disabled in the source.
  • Separate OpenCode V1 and V2 parsing, preserving their respective merge, enablement, and timeout semantics.
  • Reduce import and undo latency by limiting discovery to MCP providers and refreshing supplementary catalogs in the background.
  • Refresh the native MCP list after configuration changes while preserving unsaved JSON edits.
  • Update architecture documentation and English, Simplified Chinese, and Traditional Chinese copy.

Type and Areas

Type: Feature / bug fix

Areas: Rust core, AI adapters, web UI, docs, localization

Motivation / Impact

Users can copy supported MCP configurations into OpenBitFun without starting or enabling the external agent. Imported servers remain disabled with auto-start off until explicitly configured and enabled in OpenBitFun.

Import and undo previously waited for unrelated source scans, and an already-mounted MCP settings page could retain stale entries. These operations now refresh only the required sources and notify the MCP page after configuration changes.

Verification

Focused verification passed on Windows during implementation:

  • 68 Rust tests covering the four adapters, source coordinator, import planning, native persistence, and legacy configuration round trips.
  • 6 Rust tests covering MCP import behavior and isolated MCP discovery.
  • 103 frontend tests covering import/undo, configuration notifications, mounted-list refresh, stale results, and preservation of unsaved JSON edits.

Focused core command:

cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,external-sources --lib mcp_import

Additional checks passed:

pnpm run fmt:rs
pnpm run check:web
pnpm --dir src/web-ui exec tsc --noEmit
pnpm run i18n:audit
git diff --check

Remote Workspace remains explicitly unsupported. Remote Control, Peer Device Mode, and Detached Dispatch were not exercised end to end.

Reviewer Notes

  • Import creates an independent native configuration copy. Subsequent external configuration changes do not automatically overwrite it.
  • OpenBitFun owns activation, authentication, reconnection, and tool permissions after import.
  • Source suppression, revision checks, and direct-activation restrictions remain enforced.
  • Unsupported or unrepresentable authentication, permission, and dynamic configuration fields require setup or return an explicit unsupported state.
  • Mixed OpenCode V1/V2 configuration layers are rejected.
  • PI adaptation is outside this change.
  • No persisted schema or IPC contract changes are introduced.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@kev1n77
kev1n77 merged commit e294100 into GCWing:main Sep 12, 2026
13 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