Skip to content

Upgrade the full MCP service: compatibility, typed APIs, resources, providers, and shared daemon access #425

Description

@Lauritz-Timm

Summary

Upgrade ICM's complete MCP service as one coordinated program: protocol compatibility, tool registration and dispatch, typed outputs, project context resources, provider integration, and shared-daemon access.

The work is delivered through focused phase branches/PRs. Phases 3, 4, and 6 depend on Phase 2 and are intentionally maintained as sibling branches from that prerequisite. Phase 5 remains standalone. The post-integration HTTP/MCP parity fixes are carried by the combined mcp-integration branch after the phase PRs.

Phase and branch plan

Phase Fork branch PR Base / dependency Status
1 — Isolated compatibility/evaluation suite feat/mcp-phase-1-evaluation #7 develop (standalone) In progress in fork
2 — MCP protocol core and canonical tool service feat/mcp-phase-2-core #8 develop In progress in fork
3 — Typed MCP tool outputs feat/mcp-phase-3-typed-outputs #9 feat/mcp-phase-2-core / Phase 2 In progress in fork
4 — Active-project context resource feat/mcp-phase-4-project-context #10 feat/mcp-phase-2-core / Phase 2 In progress in fork
5 — Safe trusted-provider configuration feat/mcp-phase-5-trusted-providers #11 develop (standalone) In progress in fork
6 — Shared-daemon HTTP transport and stdio proxy feat/mcp-phase-6-http-proxy #12 feat/mcp-phase-2-core / Phase 2 In progress in fork

The fork PRs above are the current working targets for these phases.

Scope

This issue covers the full MCP service boundary:

  • protocol negotiation, connection lifecycle, JSON-RPC behavior, and framing;
  • tool discovery, schemas, annotations, availability, and execution;
  • legacy and modern response formats;
  • MCP resources for active-project context;
  • configuration for supported MCP providers;
  • stdio and authenticated HTTP transport through the shared daemon; and
  • compatibility, isolation, security, and performance verification.

Phase 1 — Isolated compatibility and evaluation suite

Create a fully self-contained evaluation suite for the MCP service. It must not read or modify real ICM state, provider configuration, credentials, external services, or the network.

Phase 2 — MCP protocol core and canonical tool service

Unify the MCP protocol and tool service behind one consistent contract while preserving the 2024 projection and supporting the initialized 2025 revisions and per-request 2026 revision. Define every tool once and keep behavior independent of transport metadata.

Phase 3 — Typed MCP tool outputs

Add compact structured results and accurate schemas for modern clients while retaining legacy text, ordering, identifiers, timestamps, scores, null/empty behavior, and error compatibility. Depends only on Phase 2.

Phase 4 — Active-project context resource

Expose one bounded, deterministic, exact-scope resource for active-project context without leaking unrelated projects, global preferences, embeddings, or internal paths. Depends only on Phase 2.

Phase 5 — Safe trusted-provider configuration

Add explicit opt-in, lossless, crash-safe trusted configuration for Codex, Claude Code, Cursor, OpenCode, and Zed. Never weaken stricter existing restrictions and track ICM-owned values. Standalone.

Phase 6 — Shared-daemon MCP transport and proxy

Add authenticated warm HTTP MCP access and a stdio proxy with independent sessions, safe retries, bounded responses, credential isolation, loopback restrictions, and preserved project scope. Depends only on Phase 2.

Post-phase integration

The local mcp-integration branch contains the reviewed convergence of Phases 2, 3, 4, and 6 plus shared transport-neutral memory operations and HTTP/MCP parity fixes. Those follow-up changes include:

  • shared store/recall semantics for deduplication, auto-linking/backrefs, consolidation, filtering, graph expansion, and access refresh;
  • HTTP Accept and modern protocol negotiation validation;
  • explicit unsupported GET behavior for the request/response-only HTTP endpoint; and
  • strict proxy notification acknowledgement handling.

This convergence is intentionally separate from the phase branches so each phase remains reviewable and mergeable.

Compatibility and security outcomes

The completed upgrade must preserve existing MCP behavior, provide revision-correct modern behavior, prevent malformed requests from selecting the wrong mode or affecting another connection, avoid exposing embeddings/secrets/unrelated memories, protect provider restrictions, and keep all evaluations isolated.

Completion criteria

The current phase review targets are the fork PRs below:

  • Phase 1 fork PR #7 — isolated compatibility/evaluation suite — merged
  • Phase 2 fork PR #8 — MCP protocol core and canonical tool service — merged
  • Phase 3 fork PR #9 — typed tool outputs — merged after Phase 2
  • Phase 4 fork PR #10 — active-project context resource — merged after Phase 2
  • Phase 5 fork PR #11 — trusted provider lifecycle — merged independently
  • Phase 6 fork PR #12 — shared HTTP proxy — merged after Phase 2
  • Post-phase mcp-integration convergence reviewed and merged
  • Existing compatibility and modern protocol/resource/provider/proxy behavior covered by isolated evaluation
  • Repository remains buildable after each phase merge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions