Skip to content

D5: Decommission MCP — delete packages/mcp + agent-tools, shims shell the CLI, write ADR-035 #1265

Closed

Description

@malibio

Spun off from the architectural audit (#1228, finding D5). The strategic direction set 2026-05-29: NodeSpace moves off MCP entirely toward the published NodeSpace skill + shims that shell the nodespace CLI → nodespaced gRPC. D2 (#1230) deleted the in-core HTTP MCP transport; D3/#1227 closed the CLI coverage gap; D4 (#1232) cleaned SKILL.md. The skills+CLI path is now proven and complete. This issue is the actual teardown of the now-redundant MCP surfaces and the second tool client (agent-tools), plus the ADR that records the decision.

Spans two repos: code in nodespace-core, ADR in nodespace-docs. Two PRs, one logical change.


Decision: delete @nodespaceai/agent-tools, shims shell the CLI

The audit left agent-tools' fate open — keep only if a skill needs gRPC streaming/tight loops. It doesn't. Evidence:

  • packages/agent-tools/src/client.ts / tools.ts expose only unary request/response calls (UnaryMethod, promisify of single callbacks). No streaming, no persistent loop, no live events.
  • All four shims (packages/skill/shims/{claude-code,gemini,codex,opencode}/…) import and call the same five one-shot functions: searchSemantic, getNode, createNode, updateNode, getChildren.
  • The CLI already covers all five 1:1: search, node get, node create, node update, node children.
  • packages/mcp/src/tools.ts already proves the execFile('nodespace', ['--json', …]) pattern works.

So we collapse to one client, one catalog: the CLI. agent-tools is deleted; the shims shell the CLI directly.

Latent-bug note that further supports deletion: the shims import @nodespace/agent-tools (singular) but the package is @nodespaceai/agent-tools — the published gRPC path would fail to resolve. Moot once agent-tools is deleted.


Surfaces to delete (every one verified present)

nodespace-core — npm MCP server

  • Delete packages/mcp/ (entire package: src/{server,tools,install}.ts, tests, package.json with bin: nodespace-mcp, README).
  • Delete .github/workflows/publish-mcp.yml (publishes @nodespaceai/mcp).
  • Remove test:mcp script and && bun run test:mcp from test:all in root package.json.
  • Remove packages/mcp from quality:fix and quality:check in root package.json.

nodespace-core — phantom nodespace mcp Claude Desktop registration

The CLI has no Mcp subcommand (packages/cli/src/lib.rs enum = Node/Search/Diagnostics/Import/Mention/Schema/Session/Uninstall). The installer and onboarding wizard register Claude Desktop to launch nodespace mcp, which would fail. Rip it out.

  • scripts/install.sh: delete the ── MCP (Claude Desktop) ── block (the mcpServers / "args": ["mcp"] writer).
  • scripts/uninstall.sh: delete the mcpServers removal block.
  • packages/cli/src/commands/uninstall.rs: delete prompt_remove_mcp() (lines ~93–140) and its call site (~line 33).
  • packages/desktop-app/src-tauri/src/commands/onboarding.rs: delete the configure_mcp() Tauri command (~143–190) and unregister it from the invoke handler.
  • packages/desktop-app/src/lib/components/onboarding/onboarding-wizard.svelte: remove the "Add NodeSpace to Claude Desktop (MCP)" step and the claude_desktop_config.json success banner (~line 254).
  • README.md: delete the ## MCP Setup section (incl. the stale "type": "http", "url": "http://localhost:3100/mcp" block — that HTTP transport was already removed in D2/Audit & cleanup: finish daemon + SQLite migrations (purge dead HTTP MCP / SurrealDB / RocksDB from code and docs) #1230).

nodespace-core — second tool client

  • Delete packages/agent-tools/ (entire package).
  • .github/workflows/release.yml: delete the @nodespaceai/agent-tools build+publish steps. Keep the @nodespaceai/skill publish.
  • Remove test:agent-tools script and its entry in test:all / test:all:db in root package.json.
  • Remove packages/agent-tools from quality:fix / quality:check.
  • packages/agent/src/acp/context_assembly.rs: update the two doc comments (~212, ~248) that reference @nodespace/agent-tools/shims/ to point at packages/skill/shims/.

Shim migration (replace gRPC client with CLI subprocess)

Add a small runCLI helper (lift from packages/mcp/src/tools.ts) and rewrite each shim's five handlers to shell the CLI instead of importing @nodespace/agent-tools. Behavior and tool names stay identical.

  • packages/skill/shims/claude-code/nodespace-hook.ts
  • packages/skill/shims/codex/nodespace-plugin.ts
  • packages/skill/shims/gemini/nodespace-handler.ts
  • packages/skill/shims/opencode/nodespace-plugin.ts
  • Each: replace import { … } from '@nodespace/agent-tools' with a local runCLI(args) (execFile('nodespace', ['--json', ...args]), ENOENT → friendly "CLI not on $PATH" error mirroring the existing NodespaceCLIError).
  • Map: searchSemantic → ['search', query, '--limit', N]; getNode → ['node', 'get', id]; createNode → ['node', 'create', '--type', t, '--content', c, ('--parent', p)?]; updateNode → ['node', 'update', id, '--content', c]; getChildren → ['node', 'children', id].
  • Preserve the ToolError-style error surface each agent runtime expects.
  • packages/skill/package.json: confirm dependencies stays {} (shims shell a binary, no npm dep).

ADR (write in nodespace-docs)


Affected open issues


Acceptance criteria

  • packages/mcp/ and packages/agent-tools/ no longer exist.
  • No dangling MCP references anywhere — code, docs, installer, CI: grep -rIn -e "packages/mcp" -e "@nodespaceai/mcp" -e "agent-tools" -e "configure_mcp" -e "prompt_remove_mcp" -e "mcpServers" --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=target --exclude-dir=.claude . returns nothing.
  • .github/workflows/publish-mcp.yml deleted; release.yml no longer publishes agent-tools; @nodespaceai/skill still publishes.
  • Root package.json has no test:mcp / test:agent-tools; test:all, test:all:db, quality:fix, quality:check updated and green.
  • All four shims shell the CLI; none import @nodespace/agent-tools.
  • README.md MCP Setup section removed.
  • Onboarding wizard no longer offers the Claude Desktop MCP step.
  • nodespace-docs/decisions/035-skills-replace-mcp.md exists; ADR-021 header points at 035; ADR-034 surface-1 wording corrected.

Testing

  • bun run test:all (frontend + skill + Rust) green, no new failures vs baseline.
  • bun run quality:fix clean (runs cargo fmt --all — git status + revert unrelated reformats before committing).
  • cargo test -p nodespace-cli and -p nodespace-desktop green after removing prompt_remove_mcp / configure_mcp.
  • End-to-end skill install still works: build packages/skill, run the installer into a temp HOME with .claude/.codex/.gemini/.opencode dirs; confirm shims copy and a shimmed tool call resolves through the CLI against a running nodespaced (or fails with the friendly "CLI not on $PATH" message when absent).
  • Manual: run the onboarding wizard; confirm no MCP/Claude-Desktop step and no claude_desktop_config.json is written.

Risks

  • External npm consumers of @nodespaceai/mcp / @nodespaceai/agent-tools break. Pre-release, zero users — acceptable per greenfield. Optionally npm deprecate the published versions (out of scope for the code change).
  • Third-party MCP clients (Cline, Cursor MCP) lose the integration. Documented as an accepted trade-off in ADR-035; reintroducible later.
  • Two-repo coordination: land the ADR PR (nodespace-docs, branch prefix doc/) alongside the code PR; cross-link both.

Standard NodeSpace startup / PR sequence

git status + git pull origin main, EnterWorktree({name: "issue-<N>-decommission-mcp"}), bun install, bun run test baseline, gh:comment/gh:assign/gh:status. createLogger not console.*; bun run test not bun test. The ADR is a separate PR in nodespace-docs (doc/ branch). Final: bun run test:all, bun run quality:fix + commit, bun run gh:pr <N>, /pragmatic-code-review before merge. Spans two repos — open and cross-link both PRs.


Spun off from #1228 (architectural audit), finding D5.

Activity

  1. malibio commented on May 30, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 133 test files, 3866 tests passed

  2. self-assigned this
    on May 30, 2026
  3. malibio commented on May 30, 2026

    @malibio
    CollaboratorAuthor

    Two PRs open for this issue:

    All acceptance criteria met:

    • packages/mcp/ and packages/agent-tools/ deleted
    • No dangling MCP references in code, docs, installer, or CI
    • publish-mcp.yml deleted; release.yml no longer publishes agent-tools
    • test:all/test:all:db/quality:fix/quality:check updated and green (133 frontend + 17 skill + 877 Rust tests pass)
    • All 4 shims shell the CLI; none import @nodespace/agent-tools
    • README.md MCP Setup section removed
    • Onboarding wizard no longer has MCP/Claude Desktop step
    • ADR-035 written; ADR-021 header updated; ADR-034 surface-1 wording corrected
  4. added a commit that references this issue on May 30, 2026
    8095985
  5. added a commit that references this issue on Jun 22, 2026
    f7069db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions