Skip to content

Program hub over MCP (read-only)

Local agents read MMDEP's rules, ADRs, registers, skills and plans from one read-only copy of the repository, served by the MCP filesystem server. They never write to it: changes go through issues and PRs in their own repository (rules §19).

1. Create or refresh the hub copy (laptop)

python -m mmdep.cli worktree add hub moneymarche-dev/MMDEP main --read-only
  • Creates C:\Projects\_worktrees\hub\MMDEP, detached at origin/main, with every file write-protected.
  • Run the same command again to update it: fetch, move to the new origin/main, protect again. Local changes in it are discarded. A scheduled task can run it hourly (it is cheap when nothing changed).
  • mmdep worktree list shows it as (read-only main); mmdep worktree prune never removes it.

2. MCP filesystem server on that folder

Needs Node.js (npx). In the MCP client's configuration (for example Claude desktop's claude_desktop_config.json, or any client that takes the same mcpServers block):

{
  "mcpServers": {
    "mmdep-hub": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Projects\\_worktrees\\hub\\MMDEP"]
    }
  }
}

The server only serves the folders it is given, so the agent sees the hub and nothing else. The files are write-protected as well, so a write through the server fails.

3. Aider with a local Ollama model

Aider takes the hub files as read-only context (--read), and edits only the agent's own repository:

$env:OLLAMA_API_BASE = 'http://127.0.0.1:11434'
cd C:\Projects\_worktrees\gemini\portfolio-engine
aider --model ollama_chat/qwen2.5-coder:7b --no-auto-commits `
  --read C:\Projects\_worktrees\hub\MMDEP\docs\agents\mmdep-agent-rules.md `
  --read C:\Projects\_worktrees\hub\MMDEP\docs\skills\routing-block\SKILL.md `
  --read C:\Projects\_worktrees\hub\MMDEP\docs\registers\components.md

Or the same in .aider.conf.yml in the agent's repository:

model: ollama_chat/qwen2.5-coder:7b
auto-commits: false
read:
  - C:\Projects\_worktrees\hub\MMDEP\docs\agents\mmdep-agent-rules.md
  - C:\Projects\_worktrees\hub\MMDEP\docs\skills\routing-block\SKILL.md
  - C:\Projects\_worktrees\hub\MMDEP\docs\registers\components.md

Rules

  • Hub content is read-only for every local agent. Questions go to ask-mmdep issues; decisions to decision-log.
  • No secrets live in the hub (it is a repository checkout), so serving it locally exposes nothing new.