EGC

Created By
Fmarzochi8 hours ago
EGC is a local runtime that gives every AI coding tool you use persistent memory. At the end of each session, the AI saves what it learned about your project: the decisions you made, what failed, your preferences, what comes next. At the start of the next session, it loads that state back. One install covers Claude Code, Cursor, Gemini CLI, Windsurf, and more. This is what EGC looks like in action:- You open Claude Code on a project you haven't touched in two weeks. Without typing anything: State loaded from egc-memory via ~/.egc/state/Projects--MyApp.md Context and preferences acknowledged (terse responses). Ready to pick up the next items: • Test full install on a clean machine • Add GEMINI.md with session memory protocol • Publish v1.0.1 fix to npm after clean install test passes • Add mcp_server_count to audit.js EGC lets you have extremely long context that is shared across sessions and tools, which is required when building production-level applications. Stop using /compact wherever your context reaches 80% and prevent the rot; adopt EGC.
Overview
EGC - Extended Global Context

npm version Node.js >= 20 TypeScript Discord PRs Welcome Stars Forks Issues Maintained OpenSSF Scorecard Quality Gate Security Rating Reliability Rating EGC MCP server

EGC - Extended Global Context

Your AI agents never start from zero again.


EGC is a local runtime that gives every AI coding tool you use a persistent memory. At the end of each session, the AI saves what it learned about your project: the decisions you made, what failed, your preferences, what comes next. At the start of the next session, it loads that state back. One install covers Claude Code, Cursor, Gemini CLI, Windsurf, and more.


This is what EGC looks like in practice

You open Claude Code on a project you haven't touched in two weeks. Without typing anything:

State loaded from egc-memory via ~/.egc/state/Projects--MyApp.md

Context and preferences acknowledged (terse responses).

Ready to pick up the next items:
• Test full install on a clean machine
• Add GEMINI.md with session memory protocol
• Publish v1.0.1 fix to npm after clean install test passes
• Add mcp_server_count to audit.js

The AI already knows what you were building, what decisions you made, what failed, and exactly where you stopped. It knows because EGC saved that state at the end of your last session and loaded it back when this one started. You didn't type anything. You just started working.

EGC demo

Install

npm install -g @egchq/egc && egc install

Or run without installing globally:

npx @egchq/egc install

Full installation guide


What the MCP server gives your AI

EGC ships egc-memory, an MCP server that exposes 13 tools your AI can call during a session:

ToolWhat it does
get_stateLoads project memory at session start
update_stateSaves decisions, preferences, and next steps
store_decisionPersists a single decision to SQLite
query_historyReturns past decisions by timestamp
search_historyFull-text search with BM25 ranking
set_working_memoryStores transient context with a TTL
get_working_memoryReads a transient key
delete_working_memoryRemoves a transient key
add_lessonRecords cross-session knowledge with confidence decay
list_lessonsRetrieves active lessons above a confidence threshold
forget_lessonRemoves a lesson permanently
detect_patternsSurfaces repeated commands and recurring errors from hook events
compress_observationsCompresses raw hook observations into typed summaries to reduce token usage

State files live at ~/.egc/state/<project-slug>.md. One file per project, plain Markdown, human-readable.


Prompt library

479 components: optional. Install to get access to 63 agents, 229 skills, and 76 commands written from real experience. Skip them and EGC still gives you persistent memory.

ComponentTotalClaude CodeGemini CLIClaude Code native
Agents63Shared (AGENTS.md)Shared (AGENTS.md)12
Commands76SharedInstruction-based31
Skills229Shared10 (native format)37
Rules111:::

Support EGC

EGC is built by one developer, maintained in the open, and free.

Sponsors

Support from the community keeps this project alive and independent.

Backers

@chizormaangel-commits

Monthly sponsors · be the first


License: MIT OpenSSF Best Practices OpenSSF Baseline Level 1 OpenSSF Baseline Level 2 OpenSSF Baseline Level 3


OpenSSF Best Practices         EGC

Project Info
Created At
8 hours ago
Updated At
8 hours ago
Author Name
Fmarzochi
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Tatsu55

a day ago
Octoperf

40 minutes ago
PDFGate
@pdfgate

2 days ago