A modern, containerized knowledge graph visualization and management system with hybrid protocol architecture optimized for both web browsers and AI clients.
- 🎯 Interactive Knowledge Graph Visualization - Explore your memory graph with dynamic, interactive visuals
- 🔍 Smart Search & Filtering - Find nodes and relationships quickly
- 📊 Entity Relationship Explorer - Deep dive into connections between entities
- 🚀 Real-time Graph Updates - Live data through unified HTTP transport
- 🎨 Modern Clean UI - Beautiful, responsive web interface built with TypeScript
- ⚡ High Performance - Direct StreamableHTTP MCP integration
- 🤖 GitHub Copilot Integration - Access all memory tools via VS Code
- 📦 One-Command Deployment -
docker-compose upand you're running! - 🔒 Type-Safe Frontend - Full TypeScript implementation with comprehensive type definitions
Hybrid Protocol Architecture:
┌─────────────────────────────────────────────────────────────────┐
│ Frontend - Client Layer │
├─────────────────┬─────────────────┬─────────────────────────────┤
│ Web Browser │ GitHub Copilot │ Future AI Clients │
│ (HTTP/REST) │ (MCP) │ (MCP) │
│ │ │ │
│ Web Server │ │ │
│ (MCP) │ │ │
└─────────────────┴─────────────────┴─────────────────────────────┘
│
│
MCP (StreamableHTTP)
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Backend - MCP Server │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Memory Tools │ │
│ │ • create_entities • read_graph │ │
│ │ • create_relations • search_nodes │ │
│ │ • add_observations • get_relations │ │
│ │ • delete_entities • open_nodes │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ KnowledgeGraphManager │ │
│ │ JSON Storage │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
- 🌐 Hybrid Protocol Design - HTTP/REST for browsers, MCP for AI clients
- 🔒 Same-Origin Policy - Web assets and API from single endpoint
- 🏗️ Modular Architecture - Clean separation of concerns
- 📦 Container-First - Production-ready deployment
- ☁️ Cloud-Ready - Designed for Azure deployment without CORS issues
- 🤖 Multi-Client Support - Optimized protocols for each client type
For an isolated, consistent development environment:
GitHub Codespaces:
- Click Code → Codespaces → Create codespace on main
- Wait for automatic setup (~3-5 minutes)
- Start developing! 🎉
Local VS Code:
- Install Docker Desktop and VS Code Dev Containers extension
- Open repository in VS Code
- Press
F1→ Dev Containers: Reopen in Container - Wait for automatic setup
- Start developing! 🎉
See .devcontainer/README.md for detailed information.
docker-compose upThat's it! 🎉
What this starts:
- 🔧 MCP Server on port 3000 (StreamableHTTP)
- 🌐 Web Interface on port 8080
- 📊 Knowledge Graph loaded from your data
- 🤖 GitHub Copilot ready to connect
- Web Interface: http://localhost:8080
- GitHub Copilot: Configure VS Code with the MCP server at
http://localhost:3001/mcp(see setup below) - Health Check: http://localhost:8080/api/health
- Start the system:
docker-compose up - Configure VS Code: Add this to your workspace settings (
.vscode/settings.jsonor workspace file):
{
"mcp": {
"servers": {
"memory-graph": {
"url": "http://localhost:3000/mcp",
"type": "http"
}
},
"inputs": []
}
}- Use GitHub Copilot: Start asking questions about your knowledge graph!
create_entities- Create new entities with observationscreate_relations- Link entities with relationshipsadd_observations- Add observations to existing entitiesread_graph- Get complete knowledge graphsearch_nodes- Search entities by name/contentopen_nodes- Get specific entity detailsget_node_relations- Get all relations for an entitydelete_entities- Remove entitiesdelete_relations- Remove relationshipsdelete_observations- Remove observations
- "Show me all entities related to Github"
- "Create a new entity for John Doe with email john@example.com"
- "What connections does John Doe have?"
- "Search for automotive companies in my knowledge graph"
- "Add an observation to the John doe entity that he works at Microsoft"
💡 Pro Tip: The MCP server is automatically ready after docker-compose up - no additional setup needed!
# Start in development mode
docker-compose up --build
# View logs
docker-compose logs -f
# Stop everything
docker-compose downMemoryGraphExplorer/
├── backend/ # StreamableHTTP MCP Server
│ ├── mcp-server/
│ │ ├── index.ts # Main server entry
│ │ ├── src/ # Modular architecture
│ │ │ ├── KnowledgeGraphManager.ts
│ │ │ ├── tools/ # Individual tool handlers
│ │ │ └── types/ # TypeScript interfaces
│ │ └── package.json
│ └── Dockerfile # MCP server container
├── frontend/ # Web Interface
│ ├── web_viewer/
│ │ ├── server.py # Flask server with HTTP client
│ │ ├── index.html # Web interface
│ │ ├── main.ts # TypeScript app coordinator
│ │ ├── src/types/ # TypeScript type definitions
│ │ ├── modules/ # Modular TypeScript components
│ │ │ ├── core/ # State, data, event management
│ │ │ ├── graph/ # D3.js graph rendering
│ │ │ ├── features/ # Search, filter, panels
│ │ │ └── services/ # MCP client, utilities
│ │ ├── styles.css # Styling
│ │ ├── tsconfig.json # TypeScript configuration
│ │ └── package.json # Frontend dependencies
│ └── Dockerfile.http # Web server container
├── docker-compose.yml # Complete orchestration
├── mcp.json # VS Code MCP configuration
└── README.md # This file
The frontend is built entirely with TypeScript for type safety and better developer experience:
Type System (src/types/):
graph.ts- Entity, Relation, GraphData from MCP serverd3-graph.ts- GraphNode, GraphLink with D3 SimulationNodeDatum extensionsevents.ts- Type-safe EventMap for pub/sub (15+ event types)state.ts- AppState interface with nested data structuresrenderer.ts- Graph visualization configurationglobal.d.ts- Window and d3 global type declarations
Modular Architecture:
- Core - State management, data loading, event bus, app coordination
- Graph - D3.js rendering, interactions, and graph state management
- Features - Search, filtering, info panel, legend, theme management
- Services - MCP client for server communication, color management
Build & Development:
- TypeScript compilation configured via
tsconfig.json - Vite for fast development and optimized production builds
- Type checking ensures correctness across the entire frontend
For detailed architecture documentation, see Frontend Architecture.
Your knowledge graph data is stored in /app/data/memory.json inside the container. To use your own data:
- Place your
memory.jsonfile in the project directory - Update
docker-compose.ymlvolume mapping if needed - Restart with
docker-compose up --build
MCP Server Port:
# docker-compose.yml
services:
mcp-server:
ports:
- "3000:3000" # Change first port for different host portWeb Interface Port:
# docker-compose.yml
services:
memory-graph-explorer:
ports:
- "8080:8080" # Change first port for different host portFor comprehensive documentation, see the docs/ directory:
- System Architecture - Detailed hybrid protocol architecture
- Frontend Architecture - Web interface design patterns
- Testing Strategy - Quality assurance approach
- Project Roadmap - Future enhancements and timeline
The repository may contain temporary issue/task drafts under docs/tasks/ while issues are being prepared for GitHub. These files are ignored by git by default (see .gitignore) so you can draft locally without committing them to the main project history. Once an issue is finalized, create it on GitHub and remove the local draft.
If you prefer to keep reusable templates, consider adding a canonical template under .github/ISSUE_TEMPLATE/ instead.
External Analysis:
- DeepWiki Project Analysis - AI-powered project documentation and Q&A
Memory Graph Explorer is a production-ready, containerized knowledge graph system built with modern web technologies and unified MCP architecture. The system provides both a web interface for visual exploration and programmatic access through GitHub Copilot integration.
- Fork the repository
- Create a feature branch
- Test with
docker-compose up --build - Submit a pull request
Built with TypeScript, Express.js, Flask, D3.js, MCP StreamableHTTP, and Docker 🚀
This project is inspired by the MCP Memory Server from the Model Context Protocol project. This project extends the concept with a hybrid architecture and web visualization capabilities.