Megg logo

Megg

Git-native agent memory stored as reviewable Markdown in hierarchical .megg folders.

Install Megg

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "megg": {
      "command": "npx",
      "args": [
        "-y",
        "megg"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio megg -- npx -y megg

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y megg

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The megg MCP server stores agent memory as Markdown in .megg folders within a repository. It discovers parent and child context, supports topic filtering, and manages knowledge, maintenance, and session handoff through five MCP tools. A CLI provides equivalent workflows, while Claude Code setup can register the server and load context at session start. Use it when project knowledge should be versioned, shared, and scoped by directory.

Use cases

  • Store architectural decisions beside the code they describe
  • Share project conventions with teammates through Git
  • Load client-specific context in a monorepo
  • Hand off unfinished work between AI sessions
  • Review and maintain accumulated agent knowledge

Key features

  • Git-versioned Markdown memory in .megg folders
  • Hierarchical context inheritance
  • Topic-filtered knowledge loading
  • Size-aware context management
  • Session handoff with ephemeral state
  • CLI and MCP interfaces

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · megg (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
npm downloads10kPackage downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Megg works

What the megg MCP server does

The megg MCP server gives AI assistants repository-local memory through Markdown files stored in .megg/ folders. Knowledge stays beside the code it describes, so teams can version it with Git, review changes in pull requests, and edit it without a separate database.

The megg MCP server supports hierarchical context. A company or repository root can define broad rules, while product, client, or feature directories add more specific information. When context is requested for a target path, parent knowledge is loaded together with the target's information.

Knowledge entries can represent rules, facts, decisions, or processes. This makes the Knowledge & Memory category a good fit for technical conventions, architectural choices, client requirements, and repeatable procedures.

How it works

A project typically contains .megg/info.md for identity and rules, knowledge.md for durable learnings, and state.md for temporary session handoff. The CLI and MCP interface read and write these files rather than storing memory in a machine-local service.

The context operation loads the relevant hierarchy and can filter entries by topic, such as auth, api, or security. Loading is size-aware: smaller knowledge sets are returned in full, medium-sized sets use a summary and topic index, and sets above the documented limit are blocked until maintenance is run.

Session state is separate from permanent knowledge. It is intended for passing unfinished work between sessions, has a two-thousand-token hard limit, and automatically expires after 48 hours. The /megg-state skill provides capture, display, and clear actions in Claude Code.

Setup and configuration

Install the package globally with npm install -g megg, then run megg setup for Claude Code. The setup command registers the MCP server, installs the /megg-state skill, and configures a SessionStart hook for automatic context loading.

Run megg init from a project directory to create its initial .megg/ files. Use megg context to inspect the resulting context. Manual Claude Desktop configuration can register the server with npx -y megg@latest; automatic loading can also be configured through a Claude hook that invokes megg context --json.

Tools and capabilities

The megg MCP server exposes five core tools:

  • context(path?, topic?) loads inherited context, knowledge, and session state.
  • learn(title, type, topics, content) adds a structured knowledge entry.
  • init() creates the local .megg/ structure.
  • maintain() checks and cleans up oversized knowledge.
  • state(content?, status?) reads, writes, or clears ephemeral session state.

The same functions are available through CLI commands, including topic-filtered context loading, adding decisions or rules, checking knowledge health, and clearing session state. The implementation uses standard MCP communication and can be used with Claude Code, Claude Desktop, and other MCP-compatible assistants.

Limitations and notes

Memory is stored in repository files, so users must decide which .megg/ content belongs in version control and should be shared. The approach does not provide a hosted synchronization service or an external vector or graph store.

Knowledge larger than 16,000 tokens is blocked until maintain() is used, while knowledge between 8,000 and 16,000 tokens is summarized with a topic index. Session state is temporary and should not replace durable entries in knowledge.md.

The documented setup is centered on Node.js package installation, the CLI, and MCP clients. The README specifically describes Claude Code and Claude Desktop workflows; other client behavior depends on their MCP support and configuration model.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Megg

megg is an MCP server that connects AI assistants to Git-native Markdown memory stored in `.megg/` folders. Its main tools load hierarchical context, add knowledge, initialize projects, maintain oversized memory, and read or update ephemeral session state. It also provides a CLI and Claude Code setup for automatic context loading.

Install it with `npm install -g megg`, then run `megg setup` for Claude Code. The setup registers the MCP server, installs the `/megg-state` skill, and configures automatic context loading. You can also register `npx -y megg@latest` manually in Claude Desktop.

Run `megg init` from the project directory. It creates a `.megg/` folder containing `info.md` for project identity and rules and `knowledge.md` for accumulated learnings. Run `megg context` afterward to verify the available context.

Cursor compatibility therefore depends on the client's support for this MCP server configuration and standard MCP communication.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMegg AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/megg?style=directory)](https://allmcps.com/mcp/megg)
HTML Embed
<a href="https://allmcps.com/mcp/megg"><img src="https://allmcps.com/api/badge/megg?style=directory" alt="Megg on AllMCPs" /></a>