Skip to main content
Glama

multi-coding-agents-mcp

A persistent shared memory MCP server for multi-agent coding workflows.

Stores project context, session handoff state, and task status across Antigravity, Claude Code, Codex, GitHub Copilot, and Gemini CLI — so agents can resume each other's work without losing context.


What it does

Each AI agent connects to this server via the Model Context Protocol (MCP). Instead of starting every session blind, agents call init_session() first to load the full project state: tech stack, conventions, architectural decisions, ownership, and any open tasks left by previous agents.

Agent A finishes work  →  save_state()   →  DB
Agent B starts work    →  init_session() →  picks up exactly where A left off

Related MCP server: coding-memory-mcp

Tools

Tool

Purpose

init_session

Always call first. Returns full project context, open tasks, and session rules

register_project

Add or update a project entry

list_projects

List all tracked projects

get_context

Read project context keys (includes version for conflict detection)

set_context

Write a context key with optional optimistic concurrency (expected_version)

append_decision

Push an architectural decision onto the decisions log

save_state

Save agent session state (phase, completed, pending, blockers, next steps)

load_state

Load a previous session's full handoff record

list_tasks

List all handoff records for a project, newest first


Quick start

# 1. Install
pnpm install

# 2. Build
pnpm build

# 3. Test interactively (browser UI at localhost:5173)
npx @modelcontextprotocol/inspector node dist/index.js

# 4. Register with your agent (example: Claude Code)
claude mcp add multi-coding-agents -- node /absolute/path/to/dist/index.js

Database

Supports SQLite (default, zero config) and PostgreSQL (team/remote use).

Variable

Default

Purpose

DB_PATH

./agent-state.db

SQLite file path

DATABASE_URL

(unset)

PostgreSQL connection string — activates PG mode when set

SQLite mode: agent-state.db is committed to git — it is the persistent state, not a build artifact.


Architecture

src/
  index.ts              ← wiring only: DB init, createHandlers(), transport
  utils.ts              ← safeJsonParse(), serialize()
  db/
    index.ts            ← createDb() — engine selected from DATABASE_URL env var
    schema-sqlite.ts    ← Drizzle SQLite schema
    schema-pg.ts        ← Drizzle PostgreSQL schema
  handlers/
    index.ts            ← createHandlers(server, engine, db) — ONLY engine branch
    projects/
      sqlite.ts  pg.ts  ← list_projects, register_project
    context/
      sqlite.ts  pg.ts  ← get_context, set_context, append_decision
    handoffs/
      sqlite.ts  pg.ts  ← save_state, load_state, list_tasks
    session/
      sqlite.ts  pg.ts  ← init_session

Each sqlite.ts / pg.ts file uses only its own DB type — no branching, no type casts.


Agent configuration

Claude Code:

claude mcp add multi-coding-agents -- node /absolute/path/to/multi-coding-agents-mcp/dist/index.js

Antigravity / Gemini CLI (~/.gemini/mcp.json):

{
  "mcpServers": {
    "multi-coding-agents": {
      "command": "node",
      "args": ["/absolute/path/to/multi-coding-agents-mcp/dist/index.js"]
    }
  }
}

GitHub Copilot (.vscode/mcp.json):

{
  "servers": {
    "multi-coding-agents": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/multi-coding-agents-mcp/dist/index.js"]
    }
  }
}

Codex (~/.openai/mcp.json):

{
  "mcpServers": {
    "multi-coding-agents": {
      "command": "node",
      "args": ["/absolute/path/to/multi-coding-agents-mcp/dist/index.js"]
    }
  }
}

Use absolute paths. Relative paths fail silently.


Tech stack

  • TypeScript — strict mode, ES modules

  • Drizzle ORM — engine-agnostic queries for SQLite and PostgreSQL

  • @modelcontextprotocol/sdk — stdio transport

  • Zod — input validation for all tools

  • pnpm — package manager


Contributing / agent rules

See AGENTS.md for the mandatory session startup protocol and hard rules all agents must follow.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.
      6 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a local long-term memory layer for AI coding tools like Cursor and Claude Code, enabling cross-session, cross-tool sharing of project facts, user preferences, decisions, and workflows.
      24 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents to read and write persistent local memory during sessions, storing and semantically searching project decisions, preferences, error patterns, guidelines, and cross-project standards from SQLite stores on the user's machine. An optional companion server also exposes an autonomous task queue for executing queued work.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Provides a local-first persistent memory layer that AI coding agents can read and write during sessions, enabling semantic search and recall of project decisions, preferences, error patterns, research, and cross-project guidelines stored in local SQLite. It also exposes an optional task queue and orchestration tools for delegating autonomous coding work that reuses the same stored context.
      -