GitHub Code Memory
An MCP (Model Context Protocol) server that builds a knowledge graph of your GitHub organization's repositories, dependencies, languages, teams, and topics. It ingests data from the GitHub API into FalkorDB and exposes query and exploration tools over MCP's Streamable HTTP transport.
Features
- Organization-wide knowledge graph — maps repos, dependencies, languages, topics, teams, and files
- Cross-repo dependency resolution — discovers when repos depend on other repos within the same org
- Multi-org and GitHub Enterprise — supports multiple orgs across github.com and GHE instances
- Manifest parsing — extracts dependencies from Cargo.toml, package.json, go.mod, requirements.txt, and pyproject.toml
- MCP-native — exposes tools via the Model Context Protocol for use by AI assistants
- Dual transport — Streamable HTTP for remote access, stdio for local MCP clients
Prerequisites
- Rust (edition 2021+)
- Docker or Podman componse (for FalkorDB)
- A GitHub org to ingest
ghCLI (if usinggh_cliauth mode)
Quick Start
1. Start FalkorDB:
docker compose up -d
# or
podman compose up -d
2. Configure environment variables (or create a .env file):
# Minimal setup with gh CLI auth (easiest for local dev)
export ECMEM_AUTH_MODE=gh_cli
export ECMEM_GITHUB_ORG=my-org
3. Run the server:
cargo build
cargo run # HTTP mode (default, serves at 127.0.0.1:8080)
cargo run -- --stdio # Stdio mode (for MCP client integration)
MCP Client Configuration
Single Org (stdio)
{
"mcpServers": {
"enterprise-code-memory": {
"command": "enterprise-code-memory",
"args": ["--stdio"],
"env": {
"ECMEM_AUTH_MODE": "gh_cli",
"ECMEM_GITHUB_ORG": "my-org",
"ECMEM_REPOS": "repo-a,repo-b"
}
}
}
}
Multiple Orgs / GitHub Enterprise (stdio)
{
"mcpServers": {
"enterprise-code-memory": {
"command": "enterprise-code-memory",
"args": ["--stdio"],
"env": {
"ECMEM_AUTH_MODE": "gh_cli",
"ECMEM_GITHUB_ORGS": "[email protected],[email protected],org-c",
"ECMEM_REPOS": "org-a:repo-1,repo-2;org-b:repo-3"
}
}
}
}
MCP Tools
Search
Explore
Graph Schema
Organization -[HAS_REPO]-> Repository
Repository -[USES_LANGUAGE]-> Language
Repository -[HAS_DEPENDENCY]-> Dependency
Repository -[HAS_TOPIC]-> Topic
Repository -[OWNED_BY]-> Team
Repository -[HAS_FILE]-> File
Repository -[DEPENDS_ON_REPO]-> Repository (cross-repo)
Authentication
Three modes, selected via ECMEM_AUTH_MODE:
Environment Variables
All variables use the ECMEM_ prefix.
Development
cargo build # Compile
cargo test # Run all tests
cargo test --lib parsers # Manifest parser tests only
cargo test --lib client # FalkorDB param tests only