Status: Accepted Version: 1.0 Date: 2025-12-21 Supersedes: N/A Related ADRs: ADR-016 Related PRDs: N/A
[!NOTE] Implementation Details: The technical specification for this architecture is in SDS-052: Semantic Tooling & IDE Integration. This ADR remains the authoritative architectural decision; SDS-052 provides implementation details.
SEA-Forge™ includes language intelligence capabilities via the DomainForge™ DSL language server. To enable AI agents to leverage this semantic intelligence, we need a standardized way to expose LSP capabilities.
LSP (Language Server Protocol) provides authoritative, semantic code intelligence (hover, go-to-definition, diagnostics, code actions).
MCP (Model Context Protocol) provides LLM applications a standardized way to call tools and access resources, enabling models to request context rather than guessing.
When integrated:
Expose DomainForge™ LSP capabilities via MCP as a semantic probe for AI agents, treating hover, diagnostics, and code actions as safe, authoritative tools.
1
2
3
4
5
VS Code Extension (Node/TS) ↔ Rust LSP Server ↔ MCP Server (optional)
↓
Standard LSP Clients
↓
AI Agents via MCP
| Option | Description | Verdict |
|---|---|---|
| FastMCP (Python) | Quick MVP, minimal code | ❌ Problematic for VS Code (Python dependency) |
| Node MCP Server | Runs in extension host | ✅ Best for VS Code packaging |
| Rust MCP Server | Single binary with LSP | ✅ Best for long-term infra |
| No MCP | Direct LSP from VS Code | ✅ Simplest for VS Code-only |
Recommendation: For VS Code extension, prefer No MCP (use VS Code’s existing LSP integration) or Node MCP Server. Use Rust MCP Server if shared service is needed across multiple clients.
Expose a small, safe subset of LSP requests:
| Tool | LSP Method | MCP Exposure |
|---|---|---|
| Hover | textDocument/hover |
✅ Primary — fast, safe, authoritative |
| Diagnostics | textDocument/publishDiagnostics |
✅ Read-only error/warning info |
| Definition | textDocument/definition |
✅ Navigation context |
| References | textDocument/references |
✅ Usage discovery |
| Code Actions | textDocument/codeAction |
⚠️ Preview only, no auto-apply |
| Rename | textDocument/rename |
⚠️ Preview only, human approval required |
Default stance: least privilege
Trust boundary rules:
What you gain:
When it’s not worth it:
Hover is the highest ROI tool to expose first because:
This gives AI agents a “semantic microscope” without mutation risks.
Rejected — LLMs cannot reliably analyze code semantics; leads to hallucination.
Rejected — Duplicates work; diverges from language server truth.
Rejected — Too dangerous; mutations without validation.
⏳ Post-MVP (requires stable LSP server)