Skip to content

add mcp server - #2064

Merged
wgqqqqq merged 2 commits into
GCWing:mainfrom
ldc111:main
Aug 6, 2026
Merged

add mcp server#2064
wgqqqqq merged 2 commits into
GCWing:mainfrom
ldc111:main

Conversation

@ldc111

@ldc111 ldc111 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Add a �itfun mcp add subcommand that walks the user through a three-step wizard (name, local/remote type, command/URL) and persists the resulting MCPServerConfig via MCPConfigService.

  • McpAction::Add clap variant with --name/--type/--command/--url/--non-interactive flags
  • management::add_mcp_server plus helpers (RawModeGuard, select_server_type, render_type_prompt, read_required_field) implementing the wizard with raw-mode TTY selection and a non-interactive fallback
  • Wire the Add dispatch in the Commands::Mcp match in main.rs

ldc111 and others added 2 commits August 5, 2026 14:17
Add a �itfun mcp add subcommand that walks the user through a three-step wizard (name, local/remote type, command/URL) and persists the resulting MCPServerConfig via MCPConfigService.

- McpAction::Add clap variant with --name/--type/--command/--url/--non-interactive flags
- management::add_mcp_server plus helpers (RawModeGuard, select_server_type, render_type_prompt, read_required_field) implementing the wizard with raw-mode TTY selection and a non-interactive fallback
- Wire the Add dispatch in the Commands::Mcp match in main.rs
@GCWing
GCWing requested a review from wgqqqqq August 6, 2026 01:37
@wgqqqqq
wgqqqqq merged commit 8fe67c5 into GCWing:main Aug 6, 2026
7 checks passed
xielixing pushed a commit to xielixing/BitFun that referenced this pull request Aug 6, 2026
A fresh user's repository has no .loopx control plane, which previously
surfaced as a raw "Failed to read LoopX Issue-Fix state" error banner
the moment the panel opened. Pre-bootstrap is a normal state, not an
error: status/poll now return null for unconnected repositories, the
header says "not connected yet — select issues and press Start", and
the Start command runs # LoopX Bootstrap

- ok: `True`
- dry_run: `False`
- project: `C:\codeagent\BitFun`
- goal_id: `bitfun-goal`
- registry: `C:\codeagent\BitFun\.loopx\registry.json`
- state_file: `C:\codeagent\BitFun\.codex\goals\bitfun-goal\ACTIVE_GOAL_STATE.md`
- goal_doc: `None`
- goal_doc_exists: `False`
- runtime_root: `C:\Users\huawei\.codex\loopx`
- registry_goal_action: `kept-existing`
- state_action: `kept-existing`
- execution_profile: `cadence=bounded_progress_segment minimum=multi_surface_or_implementation include=coherent_artifact,targeted_validation,state_writeback spend_rule=spend_only_after_artifact_validation_writeback small_streak_threshold=2`
- onboarding_acceptance_required: `True`
- autonomous_advance_choice_required: `True`
- codex_app_heartbeat: `ask`
- heartbeat_opt_in_required: `True`
- host_loop_activation_required: `True`
- onboarding_todos_written: `False`
- global_sync: `True`

## Actions
- `C:\codeagent\BitFun\.loopx\registry.json`: wrote (kept-existing)
- `C:\codeagent\BitFun\.codex\goals\bitfun-goal\ACTIVE_GOAL_STATE.md`: kept-existing ()
- `C:\Users\huawei\.codex\loopx\registry.global.json`: synced (bitfun-goal)

## Onboarding Scan
- schema: `loopx_project_onboarding_v0`
- git_repo: `True`
- status_path_count: `10`
- recent_commits: `5`
- signal_files: `README.md, AGENTS.md, CONTRIBUTING.md, package.json, Cargo.toml`
- raw_file_bodies_read: `False`
- status_sample:
  - `A  BitFun-Installer/src-tauri/Cargo.lock`
  - `M  src/apps/desktop/src/api/issue_fix_api.rs`
  - `M  src/crates/services/services-integrations/src/loopx_issue_fix/autonomous.rs`
  - `M  src/web-ui/src/app/components/panels/issue-fix/IssueFixPanel.tsx`
  - `M  src/web-ui/src/infrastructure/api/service-api/IssueFixAPI.ts`
- recent_commit_sample:
  - `7a0db930d` feat(issue-fix): bundled LoopX sidecar and three-tier readiness probe
  - `441cfc424` Merge remote-tracking branch 'origin/main' into feat/loopx-issue-fix
  - `386d352a3` fix(desktop): also shrink oversized restored windows into the work area
  - `ddf07a48d` fix(issue-fix): make 'Open panel' work from any scene
  - `8fe67c5cb` Merge pull request GCWing#2064 from ldc111/main

## Proposed Onboarding Candidates
1. [P1] Inspect current uncommitted changes (A BitFun-Installer/src-tauri/Cargo.lock, M src/apps/desktop/src/api/issue_fix_api.rs, M src/crates/services/services-integrations/src/loopx_issue_fix/autonomous.rs, M src/web-ui/src/app/components/panels/issue-fix/IssueFixPanel.tsx, M src/web-ui/src/infrastructure/api/service-api/IssueFixAPI.ts) and decide what belongs in the first LoopX segment before editing.
   - reason: The repo already has local changes, so the first safe step is ownership and scope classification.
   - metadata: `advancement_task:repo_status_review`
2. [P1] Summarize the last 5 commits and extract the safest next bounded project follow-up.
   - reason: Recent commits are a fast signal of current project direction without reading private bodies.
   - metadata: `advancement_task:commit_summary`
3. [P1] Identify the fastest validation command from package.json, Cargo.toml and record whether it is safe to run now.
   - reason: Validation entrypoints are visible from top-level project metadata.
   - metadata: `advancement_task:validation_plan`
4. [P2] Build a compact read-only project map from README.md, AGENTS.md, CONTRIBUTING.md, package.json, Cargo.toml and note authority sources, risks, and first useful handoff.
   - reason: Top-level project files can seed a useful map before any implementation work.
   - metadata: `advancement_task:read_only_map`

## Accept Candidate Commands
Run only the commands for candidates the user accepts, then refresh state.
- `loopx --registry '.loopx\registry.json' todo add --goal-id bitfun-goal --role agent --text '[P1] Inspect current uncommitted changes (A BitFun-Installer/src-tauri/Cargo.lock, M src/apps/desktop/src/api/issue_fix_api.rs, M src/crates/services/services-integrations/src/loopx_issue_fix/autonomous.rs, M src/web-ui/src/app/components/panels/issue-fix/IssueFixPanel.tsx, M src/web-ui/src/infrastructure/api/service-api/IssueFixAPI.ts) and decide what belongs in the first LoopX segment before editing.' --task-class advancement_task --action-kind repo_status_review`
- `loopx --registry '.loopx\registry.json' todo add --goal-id bitfun-goal --role agent --text '[P1] Summarize the last 5 commits and extract the safest next bounded project follow-up.' --task-class advancement_task --action-kind commit_summary`
- `loopx --registry '.loopx\registry.json' todo add --goal-id bitfun-goal --role agent --text '[P1] Identify the fastest validation command from package.json, Cargo.toml and record whether it is safe to run now.' --task-class advancement_task --action-kind validation_plan`
- `loopx --registry '.loopx\registry.json' todo add --goal-id bitfun-goal --role agent --text '[P2] Build a compact read-only project map from README.md, AGENTS.md, CONTRIBUTING.md, package.json, Cargo.toml and note authority sources, risks, and first useful handoff.' --task-class advancement_task --action-kind read_only_map`

## Autonomy And Heartbeat Choice
- heartbeat_opt_in_instruction: Ask the user whether to enable the Codex App heartbeat. heartbeat=yes means create or update a recurring Codex App automation from an identity-scoped `loopx heartbeat-prompt --thin` task body; heartbeat=no means keep the goal manual or on-demand.
- Ask the user whether Codex may start autonomous advancement. If autonomous=yes, run the quota guard and execute the first accepted Agent Todo; if autonomous=no, stop after writing accepted todos and refresh-state.

## Next Commands
- `loopx --registry .loopx\registry.json registry`
- `loopx --registry .loopx\registry.json status`
- `loopx --registry .loopx\registry.json check --scan-root C:\codeagent\BitFun`
- `loopx --format json --registry C:\Users\huawei\.codex\loopx\registry.global.json quota should-run --goal-id bitfun-goal --runtime-profile generic_cli`
- `loopx --registry .loopx\registry.json refresh-state --goal-id bitfun-goal`
- `loopx --registry C:\Users\huawei\.codex\loopx\registry.global.json status`
- `loopx --registry .loopx\registry.json history --goal-id bitfun-goal`

## Install / Update Hint
If this local LoopX install is missing or stale, rerun the no-clone installer, refresh PATH, and confirm with loopx doctor before continuing project delivery.
```bash
curl -fsSL https://raw.githubusercontent.com/huangruiteng/loopx/main/scripts/install-from-github.sh | bash
export PATH="$HOME/.local/bin:$PATH"
loopx doctor
```

## Boundary Note
Add .loopx/ and .codex/goals/ to the project .gitignore if the goal state contains private evidence. (BitFun's continuous-repair
objective, controller role) plus  before
writing the first intake todos. Verified end to end on a fresh git repo
with the PyInstaller sidecar: bootstrap -> register -> intake -> todo
projection -> compact heartbeat generation all succeed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants