LOCAL-FIRST · READ-ONLY MCP · OPEN SOURCE

Give coding agents cross-repository context they can trust.

MemoRepo groups related GitHub repositories into isolated Spaces, records the exact commits behind selected branches, and exposes graph-guided discovery plus verifiable snapshot source through a bounded, read-only Model Context Protocol (MCP) gateway.

Designed for one developer on one workstation. Runs locally with Docker Compose on Windows, macOS, and Linux.

MemoRepo dashboard showing a Space with repositories, snapshot status, and agent connection controls.
One Space. Multiple repositories. One active, reproducible snapshot.

THE CONTEXT GAP

An agent is only as reliable as the context it can inspect.

Modern systems rarely fit inside one repository. Services, packages, schemas, clients, and infrastructure evolve independently, while many agent workflows see only the current working tree or receive access far broader than the question requires.

Fragmented context

Repository boundaries hide the relationships an agent needs to understand a system end to end.

Moving evidence

Live branches change. Without a recorded revision, the evidence behind an answer is difficult to reproduce.

Over-broad access

General filesystem and shell access expands the trust boundary without making the context more precise.

MemoRepo creates a stable, scoped read model from only the repositories you select.

WHY MEMOREPO

Built around evidence, scope, and repeatability.

MemoRepo treats code context as an operational artifact: selected deliberately, built reproducibly, inspected visibly, and exposed through a narrow interface.

Graph discovery, source truth

Discover relationships in the graph, then verify important claims against the immutable source snapshot.

Read-only by construction

Each connection reads one Space through bounded query tools—without shell, editor, or write access.

Local control

Clones, indexes, state, and credentials remain local. Agent configs receive only Space-scoped access.

Visible recovery

Track snapshot quality, jobs, retries, cleanup, and recovery from the dashboard.

HOW IT WORKS

From repositories to agent-ready context in five steps.

MemoRepo manages the operational path from authorized GitHub access to a bounded query connection.

  1. Connect GitHub

    Use GitHub Device Flow or a read-capable token. Only granted repositories are visible.

  2. Create a Space

    Create a named context for the product or domain the repositories form together.

  3. Add related repositories

    Choose repositories and branches. MemoRepo records the exact commit behind each selection.

  4. Build the immutable snapshot

    Build and index one immutable snapshot. It activates only after the complete build succeeds.

  5. Connect an agent

    Generate a Space-scoped MCP connection and give the client its separate read-only token.

ARCHITECTURE

A narrow path from source to answer.

The local boundary contains the stateful control plane and the read-only agent gateway; source acquisition and the MCP-compatible client sit outside it.

Graph discovery accelerates investigation. Immutable source is the authority for exact claims; exhaustive and negative claims also require complete coverage, untruncated results, and finished pagination.

Repository credentials are not embedded in generated MCP configurations.

Architecture flow: GitHub repositories are cloned into MemoRepo's local boundary, which also contains the dashboard, control API, and SQLite state. MemoRepo records selected-branch commits, materializes exact trees in a content-addressed store, builds one immutable Space snapshot, and combines a shared code graph with direct source verification. A Space-scoped read-only MCP gateway then serves the active snapshot to an MCP-compatible coding agent outside the MemoRepo boundary.

SUPPORTED SECURITY BOUNDARY

Narrow by design. Explicit about its limits.

MemoRepo reduces the agent-facing surface by separating control access from snapshot query access and exposing only bounded, read-only MCP tools.

Localhost by default

The dashboard and API bind to the local machine in the supported Docker Compose setup.

Separate credentials

The control plane and each MCP connection use separate bearer credentials. Deleting a connection revokes its token independently.

Repository credentials stay out of agent configs

Repository-access credentials are not included in generated MCP configurations or normal model prompt and tool payloads. The MemoRepo control token is also excluded from model payloads.

No general-purpose execution surface

The MCP gateway does not expose a shell, terminal, editor, arbitrary filesystem browser, web browser, external app gateway, or write operations.

Validated and redacted source access

Snapshot tools accept bounded repository-relative inputs, reject unsafe paths, and sanitize internal paths from normal responses.

Explicit external-inference consent

Optional in-dashboard inference starts only after a disclosure explains that questions, chat history, query results, and relevant code excerpts may be sent to the selected provider.

Supported deployment boundary

MemoRepo is designed for trusted local use by one developer on one workstation. It is not a supported public, network-exposed, reverse-proxied, or multi-user service.

A focused control plane—not another autonomous agent.

MemoRepo manages local code context and exposes a narrow read model. The MCP-compatible client remains the agent.

Built for

  • Local developer workstations
  • Related GitHub repositories
  • Read-only investigation
  • MCP-compatible coding agents
  • Reproducible architecture and source evidence
  • Visible snapshot and job operations

Intentionally not built for

  • Editing, committing, pushing, merging, or opening pull requests
  • Public hosting or multi-user tenancy
  • General shell, terminal, or arbitrary filesystem access
  • Bypassing GitHub permissions
  • Following remote changes before a replacement snapshot succeeds

The boundary is part of the product—not a limitation hidden behind marketing copy.

QUICKSTART

Run MemoRepo locally with Docker Compose.

Start from a clean checkout. Productive local use requires Docker Desktop or Docker Engine; direct Node workspace execution is for development.

You need

  • Docker Desktop on Windows or macOS, or Docker Engine or Desktop on Linux.
  • A GitHub account with access to the repositories you want to index.
Open the complete quickstart

Clone the repository

bash
git clone https://github.com/abelmaro/MemoRepo.git
cd MemoRepo

Prepare the environment

bash
cp .env.example .env

Generate the control token

bash
openssl rand -hex 32

Set the generated value in .env as MEMOREPO_CONTROL_TOKEN. Treat the control token and generated MCP configurations as local secrets.

Start MemoRepo

bash
docker compose up --build
PowerShell 7

Use the native file-copy command and cryptographic token generator on Windows.

Prepare the environment

powershell
Copy-Item .env.example .env

Generate the control token

powershell
[Convert]::ToHexString([Security.Cryptography.RandomNumberGenerator]::GetBytes(32)).ToLowerInvariant()
Optional: use an existing GitHub token

Set GH_TOKEN only when you want to skip the default OAuth Device Flow. It must be able to read every repository you plan to index and takes priority over a stored OAuth credential.

Set an existing GitHub token

dotenv
GH_TOKEN=your-github-token

Open http://127.0.0.1:5173, unlock the dashboard with the control token, connect GitHub, create a Space, add repositories, wait for the immutable snapshot to become active, and generate a read-only MCP connection.

Questions engineers usually ask first.

The short answers below reflect MemoRepo's documented local operating contract.

What problem does MemoRepo solve?

It gives coding agents one reproducible context across related repositories, with graph-guided discovery, direct source verification, and a read-only MCP boundary.

Is MemoRepo a coding agent?

No. MemoRepo prepares and serves bounded code context. Your MCP-compatible client remains the agent that asks questions and uses the returned evidence.

Can an agent modify my repositories through MemoRepo?

No. The MCP gateway does not expose source editing, commits, pushes, merges, pull requests, a shell, or arbitrary filesystem access. The control plane separately manages its own local clones, snapshots, jobs, and SQLite state.

Does repository content leave my machine?

Core clones, snapshots, indexes, and operational state remain local. Optional Ask this Space inference can send disclosed questions, chat history, query results, and relevant code excerpts to the selected provider after explicit consent. Repository-access credentials and the MemoRepo control token are excluded from those model payloads.

How does MemoRepo keep context reproducible?

MCP tools read the Space's active immutable snapshot rather than a live working tree, and initialization reports its version. A successful rebuild can change the active snapshot used by later MCP calls. Ask this Space chats remain pinned to the snapshot active when they were created.

Is public or multi-user deployment supported?

No. The supported target is trusted local use by one developer on one workstation through Docker Compose.

Which operating systems are supported?

Windows and macOS through Docker Desktop, and Linux through Docker Engine or Docker Desktop.

DOCUMENTATION

Inspect the operating contract before you connect an agent.

The repository documentation defines setup, tool behavior, limits, releases, and the supported security boundary.

START WITH A SPACE

Better context. Smaller trust boundary.

Give your coding agent one reproducible view of the repositories that belong together—without giving it control of your source.