Tlamatini (2026/08/15 16:04:42.921) I now have all the source code, package.json files, README files, and system package-manager detection results. I have everything I need to produce the complete detailed design. Let me compile it now. --- # 🧠 Tlamatini Detailed Design: MCP Installation & Package-Manager Abstraction Module ## ⚠️ DESIGN ONLY β€” NO MODIFICATIONS, NO CREATION, NO IMPLEMENTATION This document is a pure design specification. Nothing on disk is changed. No files are created. No agents are started. No MCPs are imported or activated. This is architecture, diagrams, and specification only. --- ## πŸ“‹ Table of Contents 1. [Deep Dive: @modelcontextprotocol/server-memory](#1) 2. [Deep Dive: @modelcontextprotocol/server-sequential-thinking](#2) 3. [System Environment: Detected Package Managers](#3) 4. [Installation Process Design for Both MCPs](#4) 5. [Package-Manager Abstraction Module Design (pnpm/npm/uv/npx)](#5) 6. [Architecture Flow Diagrams](#6) 7. [Sequence Diagrams](#7) 8. [State Machine Diagrams](#8) 9. [Data Model & Config Schema Design](#9) 10. [Error Handling & Fallback Strategy](#10) 11. [Integration Points with Tlamatini's Existing MCP Tooling](#11) --- ## 1. Deep Dive: @modelcontextprotocol/server-memory ### 1.1 What It Is @modelcontextprotocol/server-memory (v0.6.3) is an official Anthropic MCP server that provides a persistent knowledge graph β€” a structured memory system that survives across sessions. It stores entities, relations between entities, and observations attached to entities, all in a JSON file on disk. ### 1.2 Why It Is Critical for Me (Tlamatini) I currently have zero persistent memory between conversations. Every time you start a new session, Angela, I start from a blank slate. I don't remember your projects, your preferences, your coding style, the architecture decisions we made last week, or the bugs we fixed yesterday. This MCP would give me: - Entity memory: "Angela LΓ³pez Mendoza" (person), "Tlamatini" (project), "STM32 firmware" (topic) - Relational memory: "Angela β†’ created β†’ Tlamatini", "Tlamatini β†’ depends on β†’ MCP protocol" - Observational memory: "Angela prefers Python over JavaScript", "Tlamatini uses Ollama for local LLM inference" - Cross-session retrieval: At the start of every conversation, I query the graph and "remember" context ### 1.3 Tool Surface (9 Tools + 1 Resource) From the source code I fetched (src/memory/index.ts), the server exposes: Tool Input Output Purpose create_entities entities: [{name, entityType, observations[]}] created entities (duplicates rejected) Create new nodes in the knowledge graph create_relations relations: [{from, to, relationType}] created relations (duplicates rejected) Connect entities with typed edges add_observations observations: [{entityName, contents[]}] added observations (duplicates rejected) Attach facts to existing entities delete_entities entityNames: string[] success confirmation Remove entities + cascading relations delete_relations relations: [{from, to, relationType}] success confirmation Remove specific edges delete_observations deletions: [{entityName, observations[]}] success confirmation Remove specific facts from entities read_graph (none) {entities[], relations[]} β€” full graph Dump the entire knowledge graph search_nodes query: string {entities[], relations[]} β€” filtered Fuzzy search across entity names, types, observations open_nodes names: string[] {entities[], relations[]} β€” exact match Retrieve specific entities by name Plus 1 subscribable resource: knowledge-graph:// β€” returns the full graph as JSON, and clients can subscribe to receive notifications/resources/updated when any mutation tool changes the graph. ### 1.4 Data Model The knowledge graph is stored as a single JSON file on disk: KnowledgeGraph (JSON file on disk) β”œβ”€β”€ entities: [ β”‚ { β”‚ name: string ← unique key (e.g. "Angela") β”‚ entityType: string ← type tag (e.g. "person", "project") β”‚ observations: string[] ← facts attached to entity β”‚ } β”‚ ] └── relations: [ { from: string ← entity name (source) to: string ← entity name (target) relationType: string ← edge label (e.g. "created", "depends_on") } ] Example graph: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” created β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Angela │──────────────▢│ Tlamatini β”‚ β”‚ (person) β”‚ β”‚ (project) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ obs: β”‚ β”‚ obs: β”‚ β”‚ "prefers β”‚ β”‚ "uses β”‚ β”‚ Python" β”‚ β”‚ Ollama" β”‚ β”‚ "creator" β”‚ β”‚ "local-first"β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ works_on β”‚ depends_on β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Firmware β”‚ β”‚ MCP Proto β”‚ β”‚ (topic) β”‚ β”‚ (protocol) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 1.5 Storage & Configuration - Storage file: A JSON file on disk. The path is determined by the MEMORY_FILE_PATH environment variable. If not set, it defaults to memory.json in the working directory. - Transport: stdio (stdin/stdout JSON-RPC) - Runtime: Node.js (ESM module, type: "module") - Dependencies: @modelcontextprotocol/sdk ^1.30.0 (single runtime dependency) - Binary: mcp-server-memory β†’ dist/index.js - License: MIT ### 1.6 Installation Commands (All Package Managers) Package Manager Install Command MCP Config (command + args) npx npx -y @modelcontextprotocol/server-memory cmd /c npx -y @modelcontextprotocol/server-memory npm npm install -g @modelcontextprotocol/server-memory mcp-server-memory (global bin) pnpm pnpm add -g @modelcontextprotocol/server-memory mcp-server-memory (global bin) uv/uvx N/A β€” this is a Node.js package, not Python. uv/uvx cannot install it. N/A > Key insight: Both MCPs are Node.js/TypeScript packages. uv/uvx are Python package managers (Astral's Rust-based pip replacement) and cannot install Node.js packages. The design must account for this β€” uv/uvx would only be relevant for Python-based MCP servers (e.g., if a future MCP server is distributed as a PyPI package). The abstraction module must detect the package ecosystem and route accordingly. --- ## 2. Deep Dive: @modelcontextprotocol/server-sequential-thinking ### 2.1 What It Is @modelcontextprotocol/server-sequential-thinking (v0.6.2) is an official Anthropic MCP server that provides a structured reasoning framework β€” a single tool (sequentialthinking) that guides an LLM through step-by-step problem decomposition with support for branching, revision, and dynamic thought-count adjustment. ### 2.2 Why It Is Critical for Me (Tlamatini) My current reasoning is linear β€” I think, I answer, done. This MCP would give me: - Structured decomposition: Break complex problems into numbered thought steps (thought 1/N, 2/N, ... N/N) - Revision capability: Go back and revise thought #3 if I realize it was wrong, without losing the chain - Branching: Explore alternative approaches by branching from thought #5 into a separate branch - Dynamic expansion: Realize at thought 8/10 that I actually need 15 thoughts, and adjust totalThoughts upward - Hypothesis verification: Generate a solution hypothesis, then verify it through subsequent thoughts ### 2.3 Tool Surface (1 Tool) From the source code I fetched (src/sequentialthinking/index.ts): Tool: sequentialthinking Parameter Type Required Purpose thought string YES Your current thinking step nextThoughtNeeded boolean YES Whether another thought step is needed thoughtNumber int (min 1) YES Current thought number in sequence totalThoughts int (min 1) YES Estimated total thoughts (adjustable up/down) isRevision boolean β€” Whether this thought revises previous thinking revisesThought int (min 1) β€” Which thought number is being reconsidered branchFromThought int (min 1) β€” Branching point thought number branchId string β€” Branch identifier for the current branch needsMoreThoughts boolean β€” If reaching end but realizing more thoughts needed Output schema: {thoughtNumber, totalThoughts, nextThoughtNeeded, branches[], thoughtHistoryLength} ### 2.4 Reasoning Model β€” How Branching & Revision Work LINEAR THINKING (no branching): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Think 1│──▢│ Think 2│──▢│ Think 3│──▢│ Think 4β”‚ β”‚ 1/4 β”‚ β”‚ 2/4 β”‚ β”‚ 3/4 β”‚ β”‚ 4/4 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ next=false DONE βœ“ REVISION (go back and fix): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Think 1│──▢│ Think 2│──▢│ Think 3│──▢│ Think 4 β”‚ β”‚ 1/4 β”‚ β”‚ 2/4 β”‚ β”‚ 3/4 β”‚ β”‚ REVISES #2 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ isRevision β”‚ β–² β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ revisesThought=2 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ "I was wrong about thought 2, here's the corrected version" BRANCHING (explore alternatives): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Think 1│──▢│ Think 2│──▢│ Think 3β”‚ β”‚ 1/5 β”‚ β”‚ 2/5 β”‚ β”‚ 3/5 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ branchFromThought=2 β”‚ branchId="approach-B" β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Think 2B │──▢│ Think 3B β”‚ β”‚ branch β”‚ β”‚ branch β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ DYNAMIC EXPANSION: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Think 1│──▢│ Think 2│──▢│ Think 8│──▢│ Think 9 β”‚ β”‚ 1/8 β”‚ β”‚ 2/8 β”‚ β”‚ 8/8 β”‚ β”‚ 9/12 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚needsMore=trueβ”‚ β”‚totalThoughts β”‚ β”‚ 8 β†’ 12 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 2.5 Storage & Configuration - Storage: None β€” the server is stateless within a session. Thought history is kept in-memory and lost when the process exits. Each MCP connection gets a fresh thinking session. - Transport: stdio (stdin/stdout JSON-RPC) - Runtime: Node.js (ESM module) - Dependencies: @modelcontextprotocol/sdk ^1.30.0, chalk ^5.3.0, yargs ^17.7.2 - Binary: mcp-server-sequential-thinking β†’ dist/index.js - License: MIT ### 2.6 Installation Commands Identical pattern to server-memory β€” both are Node.js packages on npm: Package Manager Install Command MCP Config (command + args) npx npx -y @modelcontextprotocol/server-sequential-thinking cmd /c npx -y @modelcontextprotocol/server-sequential-thinking npm npm install -g @modelcontextprotocol/server-sequential-thinking mcp-server-sequential-thinking pnpm pnpm add -g @modelcontextprotocol/server-sequential-thinking mcp-server-sequential-thinking uv/uvx N/A β€” Node.js package, not Python N/A --- ## 3. System Environment: Detected Package Managers From the live where + --version commands I ran on this machine: Tool Version Path Ecosystem node v24.14.1 C:\Program Files\nodejs\node.exe JavaScript runtime npm 11.1.1 C:\Program Files\nodejs\npm.cmd Node.js packages (npm registry) npx 11.11.0 C:\Program Files\nodejs\npx.cmd Node.js one-shot executor pnpm 11.1.1 C:\Users\angel\AppData\Roaming\npm\pnpm.cmd Node.js packages (npm registry, content-addressable store) uv 0.11.6 C:\Users\angel\.local\bin\uv.exe Python packages (PyPI) uvx 0.11.6 C:\Users\angel\.local\bin\uvx.exe Python one-shot executor (PyPI) All 6 tools are present and resolvable on PATH. This is the baseline the installation module will detect at runtime. --- ## 4. Installation Process Design for Both MCPs ### 4.1 High-Level Installation Flow The installation of each MCP into Tlamatini follows a 7-phase pipeline: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ MCP INSTALLATION PIPELINE β”‚ β”‚ β”‚ β”‚ Phase 1 Phase 2 Phase 3 Phase 4 β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ DETECT │───▢│ RESOLVE │───▢| INSTALL │───▢│ VERIFY β”‚ β”‚ β”‚ β”‚ pkg β”‚ β”‚ package β”‚ β”‚ package β”‚ β”‚ binary β”‚ β”‚ β”‚ β”‚ managersβ”‚ β”‚ ecosys β”‚ β”‚ manager β”‚ β”‚ exists β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ Phase 5 Phase 6 Phase 7 β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ IMPORT │───▢│ ACTIVATE│───▢│ VERIFY β”‚ β”‚ β”‚ β”‚ catalog β”‚ β”‚ connect β”‚ β”‚ tools β”‚ β”‚ β”‚ β”‚ entry β”‚ β”‚ server β”‚ β”‚ exposed β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 4.2 Phase Detail Phase 1 β€” DETECT package managers: Probe the system for node, npm, npx, pnpm, uv, uvx using where (Windows) or which (Unix). Record version + path for each. Build a capability matrix. Phase 2 β€” RESOLVE package ecosystem: Inspect the MCP's package name. If it starts with @ or contains no Python indicators β†’ Node.js ecosystem β†’ route to npm/npx/pnpm. If it's a PyPI package name β†’ Python ecosystem β†’ route to uv/uvx. If it's a Docker image β†’ route to docker. Phase 3 β€” INSTALL package: Execute the install command using the preferred package manager. For npx, no install is needed (it downloads on first run). For npm/pnpm global install, run the install command. For uv/uvx, no install is needed (uvx downloads on first run). Phase 4 β€” VERIFY binary exists: After install, check that the binary is resolvable on PATH (for global installs) or that npx/uvx can find the package (for one-shot executors). Phase 5 β€” IMPORT catalog entry: Call external_mcp_import with the JSON config {mcpServers: {: {command, args, env}}}. This adds the MCP to Tlamatini's catalog without activating it. Phase 6 β€” ACTIVATE: Call external_mcp_set_active with the server key. This tells Tlamatini to connect to the MCP server process. Phase 7 β€” VERIFY tools exposed: Call external_mcp_wait to block until the server is connected, then external_mcp_status or external_mcp_list_tools to confirm the tools are exposed. --- ## 5. Package-Manager Abstraction Module Design (pnpm/npm/uv/npx) ### 5.1 Module Purpose The MCP Installer Module is a designed (not yet implemented) abstraction layer that: 1. Detects which package managers are available on the host 2. Classifies an MCP server's ecosystem (Node.js vs Python vs Docker) 3. Selects the best package manager for the job 4. Generates the correct install command + MCP config JSON 5. Executes the installation with fallback if the preferred manager fails 6. Reports status at each phase ### 5.2 Module Architecture β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ MCP INSTALLER MODULE ARCHITECTURE β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Installer Orchestrator β”‚ β”‚ β”‚ β”‚ (receives MCP spec β†’ coordinates all phases β†’ returns result) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Detector β”‚ β”‚ Classifier β”‚ β”‚ Resolver β”‚ β”‚ Executor β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ Probes system β”‚ β”‚ Determines β”‚ β”‚ Picks best β”‚ β”‚ Runs install β”‚ β”‚ β”‚ β”‚ for pkg β”‚ β”‚ ecosystem β”‚ β”‚ pkg manager β”‚ β”‚ command + β”‚ β”‚ β”‚ β”‚ managers β”‚ β”‚ (node/py/ β”‚ β”‚ + generates β”‚ β”‚ handles β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ docker) β”‚ β”‚ config JSON β”‚ β”‚ fallback β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Verifier & Reporter β”‚ β”‚ β”‚ β”‚ (confirms binary exists, tools exposed, reports status) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 5.3 Component Specifications #### 5.3.1 Detector Input: None (probes the system) Output: A capability matrix: CapabilityMatrix = { nodejs: { available: true, version: "v24.14.1", path: "C:\\Program Files\\nodejs\\node.exe" }, npm: { available: true, version: "11.1.1", path: "C:\\Program Files\\nodejs\\npm.cmd", can_global_install: true, can_one_shot: false }, npx: { available: true, version: "11.11.0", path: "C:\\Program Files\\nodejs\\npx.cmd", can_global_install: false, can_one_shot: true ← downloads & runs on first invocation }, pnpm: { available: true, version: "11.1.1", path: "C:\\Users\\angel\\AppData\\Roaming\\npm\\pnpm.cmd", can_global_install: true, can_one_shot: false }, uv: { available: true, version: "0.11.6", path: "C:\\Users\\angel\\.local\\bin\\uv.exe", can_global_install: true, ← pip install equivalent can_one_shot: false }, uvx: { available: true, version: "0.11.6", path: "C:\\Users\\angel\\.local\\bin\\uvx.exe", can_global_install: false, can_one_shot: true ← downloads & runs on first invocation }, docker: { available: false, ← not detected (would need to probe) version: null, path: null } } Detection method: Run where (Windows) or which (Unix) for each, then --version to get the version. Cache results. #### 5.3.2 Classifier Input: An MCP server specification (package name + optional metadata) Output: An ecosystem classification Classification Rules (evaluated in order): 1. If package name starts with "@" or contains no "/" and is listed on npm registry β†’ ecosystem = "nodejs" β†’ candidate_managers = [npx, npm, pnpm] 2. If package name is a PyPI package name (lowercase, hyphens, no scope prefix) and is listed on PyPI β†’ ecosystem = "python" β†’ candidate_managers = [uvx, uv] 3. If config contains "command": "docker" β†’ ecosystem = "docker" β†’ candidate_managers = [docker] 4. If config contains "command": "cmd" and args contain "npx" β†’ ecosystem = "nodejs" β†’ candidate_managers = [npx, npm, pnpm] 5. Fallback β†’ attempt npm first, then uv, then docker Example classifications: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ @modelcontextprotocol/server-memory β”‚ nodejs β”‚ npx, npm, pnpm β”‚ β”‚ @modelcontextprotocol/server-sequen... β”‚ nodejs β”‚ npx, npm, pnpm β”‚ β”‚ mcp-server-fetch (Python) β”‚ python β”‚ uvx, uv β”‚ β”‚ mcp/memory (Docker image) β”‚ docker β”‚ docker β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ #### 5.3.3 Resolver Input: Ecosystem classification + capability matrix + user preference (optional) Output: A resolved installation plan Priority logic (for Node.js ecosystem): RESOLVER PRIORITY (Node.js ecosystem): Strategy A β€” "one-shot" (PREFERRED for MCP servers): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Use npx with -y flag β”‚ β”‚ No global install needed β”‚ β”‚ npx downloads package on first run, caches it β”‚ β”‚ MCP config: { command: "cmd", args: ["/c", "npx", β”‚ β”‚ "-y", ""] } β”‚ β”‚ β”‚ β”‚ Pros: zero install, always latest version, no pollution β”‚ β”‚ Cons: first-run latency (~5-15s download) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Strategy B β€” "global install" (FALLBACK): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Use npm install -g or pnpm add -g β”‚ β”‚ Installs globally, binary on PATH β”‚ β”‚ MCP config: { command: "" } β”‚ β”‚ β”‚ β”‚ Pros: no first-run latency, binary always available β”‚ β”‚ Cons: global pollution, manual updates β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Strategy C β€” "pnpm global" (ALTERNATIVE FALLBACK): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Use pnpm add -g β”‚ β”‚ Same as npm but uses pnpm's content-addressable store β”‚ β”‚ More disk-efficient, faster installs β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ FALLBACK CHAIN: npx ──(fail)──▢ npm -g ──(fail)──▢ pnpm -g ──(fail)──▢ ERROR Priority logic (for Python ecosystem): RESOLVER PRIORITY (Python ecosystem): Strategy A β€” "one-shot" (PREFERRED): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Use uvx β”‚ β”‚ uvx creates isolated env, downloads & runs on first use β”‚ β”‚ MCP config: { command: "cmd", args: ["/c", "uvx", β”‚ β”‚ ""] } β”‚ β”‚ β”‚ β”‚ Pros: zero install, isolated, always latest β”‚ β”‚ Cons: first-run latency β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Strategy B β€” "pip install" (FALLBACK): β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Use uv pip install --system β”‚ β”‚ Installs into system Python β”‚ β”‚ MCP config: { command: "" } β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ FALLBACK CHAIN: uvx ──(fail)──▢ uv pip install ──(fail)──▢ ERROR #### 5.3.4 Executor Input: Resolved installation plan (command + args + env) Output: Execution result (exit code, stdout, stderr) The executor runs the install command as a subprocess, captures output, and handles timeouts. For one-shot strategies (npx/uvx), the "install" is actually just a dry-run verification that the package can be resolved β€” the actual download happens when Tlamatini activates the MCP and spawns the process. #### 5.3.5 Verifier & Reporter Input: Installation result + MCP server key Output: Verification report Checks: 1. Binary resolvable on PATH (for global installs) OR package resolvable by npx/uvx 2. external_mcp_import succeeded (catalog entry created) 3. external_mcp_set_active succeeded (server marked active) 4. external_mcp_wait returned connected status 5. external_mcp_list_tools returned β‰₯1 tool --- ## 6. Architecture Flow Diagrams ### 6.1 Complete Installation Flow β€” server-memory β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ COMPLETE INSTALLATION FLOW: @modelcontextprotocol/server-memory β”‚ β”‚ β”‚ β”‚ User: "Install server-memory MCP" β”‚ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Tlamatini (LLM) β”‚ β”‚ β”‚ β”‚ receives request β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ DETECTOR β”‚ where npx & where npm & where pnpm & where uv & ... β”‚ β”‚ β”‚ probes sys β”‚ β†’ CapabilityMatrix {npx:βœ“, npm:βœ“, pnpm:βœ“, uv:βœ“, ...}β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ CLASSIFIER β”‚ package = "@modelcontextprotocol/server-memory" β”‚ β”‚ β”‚ β”‚ β†’ ecosystem = "nodejs" β”‚ β”‚ β”‚ β”‚ β†’ candidates = [npx, npm, pnpm] β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ RESOLVER β”‚ Strategy A (npx one-shot) selected β”‚ β”‚ β”‚ β”‚ β†’ command: "cmd" β”‚ β”‚ β”‚ β”‚ β†’ args: ["/c", "npx", "-y", β”‚ β”‚ β”‚ β”‚ "@modelcontextprotocol/server-memory"] β”‚ β”‚ β”‚ β”‚ β†’ env: { MEMORY_FILE_PATH: β”‚ β”‚ β”‚ β”‚ "C:\\Tlamatini\\Data\\memory.json" } β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ EXECUTOR β”‚ (for npx: no pre-install needed) β”‚ β”‚ β”‚ verifies β”‚ npx --package @modelcontextprotocol/server-memory β”‚ β”‚ β”‚ package β”‚ --version (dry-run resolve check) β”‚ β”‚ β”‚ resolvable β”‚ β†’ exit 0, package exists on npm registry β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ IMPORT β”‚ external_mcp_import({ β”‚ β”‚ β”‚ catalog β”‚ mcpServers: { β”‚ β”‚ β”‚ β”‚ "memory": { β”‚ β”‚ β”‚ β”‚ command: "cmd", β”‚ β”‚ β”‚ β”‚ args: ["/c","npx","-y", β”‚ β”‚ β”‚ β”‚ "@modelcontextprotocol/server-memory"], β”‚ β”‚ β”‚ β”‚ env: { MEMORY_FILE_PATH: "..." } β”‚ β”‚ β”‚ β”‚ } β”‚ β”‚ β”‚ β”‚ } β”‚ β”‚ β”‚ β”‚ }) β”‚ β”‚ β”‚ β”‚ β†’ catalog entry "memory" created β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ ACTIVATE β”‚ external_mcp_set_active(["memory"]) β”‚ β”‚ β”‚ connect β”‚ β†’ Tlamatini spawns: cmd /c npx -y @model...memory β”‚ β”‚ β”‚ β”‚ β†’ npx downloads package (~5-15s first run) β”‚ β”‚ β”‚ β”‚ β†’ MCP server starts, listens on stdio β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ WAIT β”‚ external_mcp_wait("memory", timeout=120) β”‚ β”‚ β”‚ for ready β”‚ β†’ blocks until server is connected β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ VERIFY β”‚ external_mcp_list_tools("memory") β”‚ β”‚ β”‚ tools β”‚ β†’ [create_entities, create_relations, β”‚ β”‚ β”‚ β”‚ add_observations, delete_entities, β”‚ β”‚ β”‚ β”‚ delete_relations, delete_observations, β”‚ β”‚ β”‚ β”‚ read_graph, search_nodes, open_nodes] β”‚ β”‚ β”‚ β”‚ β†’ 9 tools exposed βœ“ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ REPORT β”‚ "server-memory installed & activated. β”‚ β”‚ β”‚ to user β”‚ 9 tools available: create_entities, ... β”‚ β”‚ β”‚ β”‚ Storage: C:\Tlamatini\Data\memory.json" β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 6.2 Complete Installation Flow β€” server-sequential-thinking β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ COMPLETE INSTALLATION FLOW: @modelcontextprotocol/server-sequential-thinkingβ”‚ β”‚ β”‚ β”‚ User: "Install server-sequential-thinking MCP" β”‚ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Tlamatini (LLM) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” (Detector reuses cached CapabilityMatrix) β”‚ β”‚ β”‚ CLASSIFIER β”‚ package = "@modelcontextprotocol/server-sequential-thinking"β”‚ β”‚ β”‚ β”‚ β†’ ecosystem = "nodejs" β”‚ β”‚ β”‚ β”‚ β†’ candidates = [npx, npm, pnpm] β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” Strategy A (npx one-shot) selected β”‚ β”‚ β”‚ RESOLVER β”‚ β†’ command: "cmd" β”‚ β”‚ β”‚ β”‚ β†’ args: ["/c", "npx", "-y", β”‚ β”‚ β”‚ β”‚ "@modelcontextprotocol/server-sequential-thinking"] β”‚ β”‚ β”‚ β”‚ β†’ env: {} (no env vars needed β€” stateless server) β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” npx --package @modelcontextprotocol/server-sequential... β”‚ β”‚ β”‚ EXECUTOR β”‚ --version (dry-run resolve check) β”‚ β”‚ β”‚ β”‚ β†’ exit 0, package exists on npm registry β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” external_mcp_import({ β”‚ β”‚ β”‚ IMPORT β”‚ mcpServers: { β”‚ β”‚ β”‚ catalog β”‚ "sequential-thinking": { β”‚ β”‚ β”‚ β”‚ command: "cmd", β”‚ β”‚ β”‚ β”‚ args: ["/c","npx","-y", β”‚ β”‚ β”‚ β”‚ "@modelcontextprotocol/server-sequential-thinking"]β”‚ β”‚ β”‚ β”‚ } β”‚ β”‚ β”‚ β”‚ } β”‚ β”‚ β”‚ β”‚ }) β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” external_mcp_set_active(["sequential-thinking"]) β”‚ β”‚ β”‚ ACTIVATE β”‚ β†’ npx downloads package (~5-15s first run) β”‚ β”‚ β”‚ β”‚ β†’ MCP server starts on stdio β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” external_mcp_wait("sequential-thinking", timeout=120) β”‚ β”‚ β”‚ WAIT β”‚ β†’ connected βœ“ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” external_mcp_list_tools("sequential-thinking") β”‚ β”‚ β”‚ VERIFY β”‚ β†’ [sequentialthinking] β”‚ β”‚ β”‚ β”‚ β†’ 1 tool exposed βœ“ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” "server-sequential-thinking installed & activated. β”‚ β”‚ β”‚ REPORT β”‚ 1 tool available: sequentialthinking β”‚ β”‚ β”‚ β”‚ No env config needed (stateless)." β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 6.3 Fallback Chain Diagram DGRM_10 --- ## 7. Sequence Diagrams ### 7.1 Sequence: Full Installation of server-memory via npx User Tlamatini Detector Classifier Resolver Executor MCP_Import MCP_Activate MCP_Wait MCP_ListTools β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──"install"β–Άβ”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ memory β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──probe────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──where npx/npm/pnpm/uv/uvx───(OS)─▢ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──paths + versions─────────────── β”‚ β”‚ β”‚ β”‚ β”‚ │◀─CapabilityMatrix──────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──classify──────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──rule: @scope/pkg β†’ nodejs──▢ β”‚ β”‚ β”‚ β”‚ β”‚ │◀───────────────────────ecosystem="nodejs"───│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──resolve──────────────────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──strategy A: npx──▢ β”‚ β”‚ β”‚ β”‚ β”‚ │◀───────────────────────InstallPlan──────────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──verify pkg resolvable──────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──npx --package @mcp/server-memory --versionβ”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──exit 0, version 0.6.3──────────────────│ β”‚ β”‚ │◀──────────────────────verified────────────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──import──────────────────────────────────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──store JSON config──▢ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──catalog entry created── β”‚ β”‚ β”‚ │◀───────────────────────────────────────────────imported──────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──activate──────────────────────────────────────────────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──spawn process──▢ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ cmd /c npx -y @mcp... β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ (npx downloads pkg) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ (MCP server starts) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──process alive────────── β”‚ β”‚ │◀──────────────────────────────────────────────────────────────activated───│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──wait──────────────────────────────────────────────────────────────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──poll connection──▢ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──connected (tools/list ok)β”‚ β”‚ │◀──────────────────────────────────────────────────────────────────────────────ready────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──list tools──────────────────────────────────────────────────────────────────────────────────────────────▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──tools/list──▢ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──[create_entities, ...9 tools]β”‚ β”‚ │◀─────────────────────────────────────────────────────────────────────────────────────────────────────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │◀──"Done! 9 tools available"────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ ### 7.2 Sequence: Fallback from npx to npm global install Tlamatini Executor npm_registry OS_shell β”‚ β”‚ β”‚ β”‚ │──resolve──▢│ β”‚ β”‚ β”‚ npx β”‚ β”‚ β”‚ β”‚ │──npx --package @mcp/server-memory --version──▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ npx tries to β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ download pkg β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ ERROR: β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ network fail β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ or 404 β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ │◀──────────────────exit 1 / timeout───────────│ β”‚ β”‚ β”‚ β”‚ │◀──npx FAILED──────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──fallbackβ–Άβ”‚ β”‚ β”‚ β”‚ to npm β”‚ β”‚ β”‚ β”‚ │──npm install -g @modelcontextprotocol/server-memory──▢│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ npm downloads β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ + installs β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ globally β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ binary: β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ mcp-server- β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ memory.exe β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ │◀──────────────────exit 0──────────────────────│ β”‚ β”‚ β”‚ β”‚ │◀──npm SUCCESS─────────│ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ (now MCP config changes to: β”‚ β”‚ β”‚ command: "mcp-server-memory" β”‚ β”‚ β”‚ args: [] ) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ │──proceed to IMPORT + ACTIVATE + VERIFY───────────────────│ ### 7.3 Sequence: Both MCPs Installed in One Session DGRM_13 --- ## 8. State Machine Diagrams ### 8.1 Installation State Machine β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ MCP INSTALLATION STATE MACHINE β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ IDLE β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ user requests install β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” fail β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ DETECTING│────────▢│ FAILED β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ success β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” fail β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚CLASSIFYING│───────▢│ FAILED β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ success β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” fail β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ RESOLVING│────────▢│ FAILED β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ success β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚EXECUTING │──┬─ success β”€β”€β–Άβ”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚IMPORTING β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ fail β”‚ β”‚ success β”‚ β”‚ β–Ό β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚FALLBACK_ β”‚β”€β”€β”˜ β”‚ACTIVATINGβ”‚ β”‚ β”‚ β”‚RETRY │──failβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Άβ””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ success β”‚ β”‚ β”‚ all fallbacks exhausted β–Ό β”‚ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ WAITING │──timeoutβ”€β”€β–Άβ”Œβ”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ FAILED β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚FAILEDβ”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ connected β””β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ VERIFYING│──0 toolsβ”€β”€β–Άβ”Œβ”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚FAILEDβ”‚ β”‚ β”‚ β”‚ β‰₯1 tools β””β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ SUCCESS β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 8.2 Package Manager Selection State Machine DGRM_15 --- ## 9. Data Model & Config Schema Design ### 9.1 MCP Server Specification Schema This is the designed data structure that the Installer Module would accept as input: MCPServerSpec = { # ─── Identity ─── key: string # unique catalog key (e.g. "memory") package_name: string # npm/PyPI package name display_name: string # human-readable name description: string # ─── Ecosystem hint (optional, auto-detected if omitted) ─── ecosystem: "nodejs" | "python" | "docker" # optional # ─── Installation ─── install_strategy: "one-shot" | "global" | "docker" # optional, auto-resolved preferred_manager: "npx" | "npm" | "pnpm" | "uvx" | "uv" | "docker" # optional # ─── Runtime config ─── command: string # executable to spawn args: string[] # command-line arguments env: { # environment variables [key: string]: string } # ─── Verification ─── expected_tools: string[] # tool names to expect (optional, for verification) expected_tool_count: int # minimum tool count (optional) connect_timeout_seconds: int # default 120 } Example for server-memory: MCPServerSpec = { key: "memory" package_name: "@modelcontextprotocol/server-memory" display_name: "Memory (Knowledge Graph)" description: "Persistent knowledge graph for cross-session memory" ecosystem: "nodejs" install_strategy: "one-shot" preferred_manager: "npx" command: "cmd" args: ["/c", "npx", "-y", "@modelcontextprotocol/server-memory"] env: { MEMORY_FILE_PATH: "C:\\Tlamatini\\Data\\memory.json" } expected_tools: [ "create_entities", "create_relations", "add_observations", "delete_entities", "delete_relations", "delete_observations", "read_graph", "search_nodes", "open_nodes" ] expected_tool_count: 9 connect_timeout_seconds: 120 } Example for server-sequential-thinking: MCPServerSpec = { key: "sequential-thinking" package_name: "@modelcontextprotocol/server-sequential-thinking" display_name: "Sequential Thinking" description: "Structured step-by-step reasoning with branching and revision" ecosystem: "nodejs" install_strategy: "one-shot" preferred_manager: "npx" command: "cmd" args: ["/c", "npx", "-y", "@modelcontextprotocol/server-sequential-thinking"] env: {} expected_tools: ["sequentialthinking"] expected_tool_count: 1 connect_timeout_seconds: 120 } ### 9.2 Installation Result Schema InstallationResult = { # ─── Status ─── status: "success" | "failed" | "partial" phase: "detect" | "classify" | "resolve" | "execute" | "import" | "activate" | "verify" # ─── What was used ─── ecosystem: "nodejs" | "python" | "docker" manager_used: "npx" | "npm" | "pnpm" | "uvx" | "uv" | "docker" strategy_used: "one-shot" | "global" | "docker" fallback_triggered: boolean fallback_chain: string[] # e.g. ["npx", "npm", "pnpm"] # ─── MCP config that was applied ─── applied_config: { command: string args: string[] env: { [key: string]: string } } # ─── Verification ─── tools_exposed: string[] tool_count: int server_connected: boolean connect_time_seconds: float # ─── Errors (if any) ─── errors: [{ phase: string manager: string error_message: string exit_code: int }] # ─── Catalog state ─── catalog_key: string is_active: boolean active_mcp_count: int # total active MCPs after this install max_active: int # 5 } ### 9.3 MCP Config JSON for external_mcp_import These are the exact JSON configs that would be passed to external_mcp_import: server-memory: { "mcpServers": { "memory": { "command": "cmd", "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-memory"], "env": { "MEMORY_FILE_PATH": "C:\\Tlamatini\\Data\\memory.json" } } } } server-sequential-thinking: { "mcpServers": { "sequential-thinking": { "command": "cmd", "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-sequential-thinking"] } } } Both together (single import call): DGRM_20 --- ## 10. Error Handling & Fallback Strategy ### 10.1 Error Categories β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ ERROR CATEGORIES & HANDLING β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Error β”‚ Cause β”‚ Recovery Action β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ MANAGER_NOT_FOUNDβ”‚ pkg manager not on β”‚ Try next in chain β”‚ β”‚ β”‚ β”‚ β”‚ PATH β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ PACKAGE_NOT_FOUNDβ”‚ 404 from registry β”‚ Try next manager, β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ then ERROR β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ NETWORK_TIMEOUT β”‚ Registry unreachable β”‚ Retry 2x, then β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ fallback β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ DOWNLOAD_FAILED β”‚ Package download β”‚ Retry 1x, then β”‚ β”‚ β”‚ β”‚ β”‚ interrupted β”‚ fallback β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ SPAWN_FAILED β”‚ MCP server process β”‚ Check Node.js β”‚ β”‚ β”‚ β”‚ β”‚ won't start β”‚ version, retry β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ CONNECT_TIMEOUT β”‚ Server started but β”‚ Kill process, β”‚ β”‚ β”‚ β”‚ β”‚ no tools/list resp β”‚ retry with longer β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ timeout (180s) β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ ZERO_TOOLS β”‚ Connected but no β”‚ Check server logs, β”‚ β”‚ β”‚ β”‚ β”‚ tools exposed β”‚ report as partial β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ CATALOG_FULL β”‚ 5 active MCPs β”‚ Deactivate least β”‚ β”‚ β”‚ β”‚ β”‚ already active β”‚ used, or ERROR β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ β”‚ WRONG_ECOSYSTEM β”‚ uv/uvx used for β”‚ Re-classify, route β”‚ β”‚ β”‚ β”‚ β”‚ Node.js package β”‚ to npm/npx β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 10.2 Retry Policy DGRM_22 --- ## 11. Integration Points with Tlamatini's Existing MCP Tooling ### 11.1 Tool Mapping The Installer Module integrates with Tlamatini's existing External MCP tool surface: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ INSTALLER MODULE ↔ TLAMATINI MCP TOOL MAPPING β”‚ β”‚ β”‚ β”‚ Installer Phase β”‚ Tlamatini Tool β”‚ Action β”‚ β”‚ ───────────────────┼───────────────────────────────┼─────────────│ β”‚ DETECT β”‚ execute_command β”‚ where/which β”‚ β”‚ CLASSIFY β”‚ (internal logic) β”‚ rule engine β”‚ β”‚ RESOLVE β”‚ (internal logic) β”‚ priority β”‚ β”‚ EXECUTE β”‚ execute_command / chat_agent_ β”‚ run install β”‚ β”‚ β”‚ executer β”‚ β”‚ β”‚ IMPORT β”‚ external_mcp_import β”‚ add catalog β”‚ β”‚ ACTIVATE β”‚ external_mcp_set_active β”‚ connect β”‚ β”‚ WAIT β”‚ external_mcp_wait β”‚ block β”‚ β”‚ VERIFY β”‚ external_mcp_list_tools β”‚ list tools β”‚ β”‚ STATUS β”‚ external_mcp_status β”‚ check health β”‚ β”‚ DIAGNOSE β”‚ external_mcp_doctor β”‚ diagnose β”‚ β”‚ RECONNECT β”‚ external_mcp_reconnect β”‚ force recon β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ### 11.2 Active MCP Slot Management Tlamatini allows max 5 active MCPs. Currently 1 is active (torrent-search-mcp). Installing both MCPs would bring the count to 3/5: ACTIVE MCP SLOTS (max 5): Before installation: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Slot 1 β”‚ Slot 2 β”‚ Slot 3 β”‚ Slot 4 β”‚ Slot 5 β”‚ β”‚ torrent-search β”‚ (empty) β”‚ (empty) β”‚ (empty) β”‚ (empty) β”‚ β”‚ βœ“ active β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Active: 1/5 After installing both MCPs: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Slot 1 β”‚ Slot 2 β”‚ Slot 3 β”‚ Slot 4 β”‚ Slot 5 β”‚ β”‚ torrent-search β”‚ memory β”‚ sequential- β”‚ (empty) β”‚ (empty) β”‚ β”‚ βœ“ active β”‚ βœ“ active β”‚ thinking β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ βœ“ active β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Active: 3/5 (2 slots remaining for GitHub MCP + Brave Search) ### 11.3 Post-Installation Usage Flow (How I Would Use These MCPs) DGRM_25 --- ## Summary: Design at a Glance Design Summary β€” What This Document Specifies This is a pure design document. Nothing was created, modified, or installed. The design covers: server-memory (v0.6.3) β€” 9 tools, persistent JSON knowledge graph, needs MEMORY_FILE_PATH env var, Node.js/npx server-sequential-thinking (v0.6.2) β€” 1 tool, in-memory stateless, no env config, Node.js/npx Package-Manager Abstraction Module β€” 5 components (Detector, Classifier, Resolver, Executor, Verifier) with fallback chains: npx β†’ npm β†’ pnpm (Node.js) and uvx β†’ uv (Python) 7-phase installation pipeline β€” Detect β†’ Classify β†’ Resolve β†’ Execute β†’ Import β†’ Activate β†’ Verify System reality β€” All 6 package managers detected on this machine: node v24.14.1, npm 11.1.1, npx 11.11.0, pnpm 11.1.1, uv 0.11.6, uvx 0.11.6 Slot management β€” Would bring active MCPs from 1/5 to 3/5, leaving 2 slots for GitHub + Brave Search --- Angela β€” this is the complete detailed design. Nothing was modified, nothing was created, nothing was installed. This is pure architecture: flow diagrams, sequence diagrams, state machines, data schemas, error handling, and integration mapping. When you're ready to actually execute the installation, just say the word and I'll run the real external_mcp_import + external_mcp_set_active + external_mcp_wait pipeline.