Skip to content

Add CLI/MCP parity spec#96

Merged
obj-p merged 1 commit intomainfrom
cli-mcp-parity-spec
Apr 14, 2026
Merged

Add CLI/MCP parity spec#96
obj-p merged 1 commit intomainfrom
cli-mcp-parity-spec

Conversation

@obj-p
Copy link
Copy Markdown
Owner

@obj-p obj-p commented Apr 14, 2026

Summary

  • Proposes a daemon-based architecture to close the CLI/MCP capability gap — every MCP tool gets a CLI equivalent
  • CLI becomes a thin JSON-RPC client over a Unix domain socket at ~/.previewsmcp/serve.sock
  • Single previewsmcp serve --daemon process multiplexes N concurrent sessions (ADB-style)
  • Implementation plan: 10 stacked PRs, each independently mergeable and validated

Key decisions captured

  • Transport: Unix domain socket (no port conflicts; filesystem-scoped permissions)
  • Session discovery: RPC-only, no per-session files. Daemon is single source of truth.
  • Lifecycle: Docker-style — attached run by default, --detach opt-in, stop for cleanup
  • Resolution: --session / --file / sole-session default with clear ambiguity errors
  • Reuse MCP SDK: configureMCPServer() is already transport-agnostic; swap StdioTransport for Unix socket transport

Related

Closes neither — those stay open until implementation lands:

Test plan

  • Review spec sections for completeness
  • Validate architectural assumptions (especially `NWEndpoint.unix(path:)` + `NetworkTransport` fit) during PR 1

🤖 Generated with Claude Code

Proposes a daemon-based architecture where the CLI becomes a thin
JSON-RPC client over a Unix domain socket. Closes the capability
gap between the existing MCP server and the CLI — every MCP tool
will have a CLI equivalent.

Related issues: #92, #94

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@obj-p obj-p mentioned this pull request Apr 14, 2026
9 tasks
@obj-p obj-p merged commit ca38f4c into main Apr 14, 2026
4 checks passed
@obj-p obj-p deleted the cli-mcp-parity-spec branch April 14, 2026 11:28
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