Sponsored by Deepsite.site

EGC - Extended Global Context

Created By
Fmarzochi9 days ago
Persistent memory and shared context for AI coding tools. Two local MCP servers give every AI coding tool a shared, permanent memory of your project across sessions and tools.
Overview

Language: English | Español | Português (Brasil)

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 Socket EGC MCP server

Language / Idioma

English | Español | Português (Brasil)

EGC - Extended Global Context

Your AI agents never start from zero again.

No commands to learn. Just work -- EGC handles the rest.


EGC is a local runtime that gives every AI coding tool you use a persistent memory. At the end of each session, your AI saves what it learned: decisions made, what failed, your preferences, what to pick up next. At the start of the next session, it loads that state back on its own -- no prompting required. Say "let's continue" or "where did we stop?" in any language and your AI already knows what to do. One install covers Claude Code, Cursor, Gemini CLI, Windsurf, and more. Works with Claude, GPT-4o, Gemini, and OpenRouter models including DeepSeek, Qwen3, and Llama 4.


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 -- on its own, without you asking. 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 EGC gives your AI

EGC ships two MCP servers that work together during every session.

Memory - 14 tools that your AI uses automatically

No commands to memorize. Your AI reads this table so you never have to. Say anything in any language -- "continue from yesterday", "remember this decision", "what broke last time?" -- and it calls the right tool. You just work. EGC handles the rest.

egc-memory

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
working_memory_setStores transient context with a TTL
working_memory_getReads a transient key
working_memory_listLists all live transient entries for the current project
lesson_saveRecords cross-session knowledge with confidence decay
lesson_recallRetrieves active lessons above a confidence threshold
lesson_reinforceBoosts confidence on a lesson when the same pattern repeats
detect_patternsSurfaces repeated commands and recurring errors from hook events
compress_observationsCompresses raw hook observations into typed summaries to reduce token usage
get_project_stateReturns server health metadata and storage engine status

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

Context and safety - 5 tools for when things get heavy

egc-guardian

These tools run automatically in the background. Every shell command and every file write is checked before it executes. You never invoke them directly.

ToolWhat it does
validate_commandChecks shell commands against project safety rules before execution
validate_writeValidates file write paths to prevent unsafe writes
reduce_contextCompresses file payloads to save your token budget
orchestrate_taskRoutes prompts with agent/skill context and returns compression metrics
auto_learnMines session failures and writes actionable lessons to CLAUDE.md

Always in sync - across every tool you use

egc watch -- run it once and every tool you use stays in sync. Edit context in Cursor and it appears in Gemini CLI, Copilot, Windsurf, and everywhere else automatically. When your state updates, all your tool config files update with it. No manual steps, no stale state.

egc watch              # watch current project
egc watch /path/proj   # watch a specific project
egc watch --quiet      # suppress output

Prompt library

479 components included as a bonus. Install to get access to 63 agents, 229 skills, and 76 commands written from real engineering sessions. Skip them entirely and EGC still gives you persistent memory.


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 Socket


OpenSSF Best Practices         EGC

Server Config

{
  "mcpServers": {
    "egc-memory": {
      "command": "node",
      "args": [
        "/usr/local/lib/node_modules/@egchq/egc/mcp/servers/egc-memory/build/index.js"
      ]
    },
    "egc-guardian": {
      "command": "node",
      "args": [
        "/usr/local/lib/node_modules/@egchq/egc/mcp/servers/egc-guardian/build/index.js"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code