
mcp memory server
mcp-memory-server is a Go-based context engine that captures and serves long-term developer memory—code, commits, logs, and docs—to power intelligent LLM assistants across your projects.
Repository Info
About This Server
mcp-memory-server is a Go-based context engine that captures and serves long-term developer memory—code, commits, logs, and docs—to power intelligent LLM assistants across your projects.
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Developer Memory MCP Server
A Go-based server that captures, persists, and serves project context (code, diffs, logs, etc.) for LLM-powered assistants. Think of it as a per-repo, structured memory vault that integrates cleanly with Git and VSCode.
Features
- 🕵️♂️ File Watching: Monitors file changes in real-time using fsnotify
- 💾 Context Storage: Persists context in BoltDB with versioning
- 🔄 Git Integration: Captures commit history and diffs
- 🌐 API Server: REST and WebSocket endpoints for context access
- 🤖 LLM Ready: Structured data format for LLM consumption
Architecture
+--------------------+
| VSCode Plugin |
+---------+----------+
|
v
+---------------+---------------+
| Developer Memory MCP Server |
+---------------+---------------+
|
+-------------------+--------------------+
| | |
v v v
+---------------+ +----------------+ +----------------+
| File Watcher | | Git Context | | Build/Run Logs |
+---------------+ +----------------+ +----------------+
| | |
v v v
+-----------------------------+
| Context Store (BoltDB) |
+-----------------------------+
|
v
+----------------------+
| LLM Integration |
+----------------------+
Getting Started
Prerequisites
- Go 1.21 or later
- Git repository to monitor
Installation
-
Clone the repository:
git clone https://github.com/agaonker/mcp-memory-server.git cd mcp-memory-server -
Install dependencies:
go mod download -
Build the server:
go build -o mcp-server cmd/server/main.go
Usage
-
Start the server:
./mcp-server -repo /path/to/your/repo -port 9000 -
The server will:
- Create a
.mcpdirectory in your repository - Start watching for file changes
- Begin capturing context
- Create a
-
Access the API:
- REST endpoints:
GET /context- Get all contextPOST /context/add- Add new contextPOST /context/clear- Clear all contextPOST /context/search- Search context
- WebSocket endpoint:
ws://localhost:9000/ws- Real-time updates
- REST endpoints:
API Reference
REST Endpoints
GET /context
Retrieves all context for the repository.
Response:
{
"files": {
"path/to/file": {
"type": "write",
"timestamp": "2024-03-21T10:00:00Z",
"size": 1024,
"mode": "-rw-r--r--"
}
},
"commits": {
"abc123": {
"message": "Initial commit",
"author": "John Doe",
"timestamp": "2024-03-21T09:00:00Z"
}
}
}
POST /context/add
Adds new context to the store.
Request:
{
"files": {
"path/to/file": {
"type": "write",
"timestamp": "2024-03-21T10:00:00Z"
}
}
}
POST /context/clear
Clears all context from the store.
POST /context/search
Searches for context matching the query.
Request:
{
"type": "write",
"timestamp": "2024-03-21T10:00:00Z"
}
WebSocket Events
The WebSocket connection receives real-time updates about file changes:
{
"type": "file_change",
"path": "path/to/file",
"event": "write",
"timestamp": "2024-03-21T10:00:00Z"
}
Development
Project Structure
.
├── cmd/
│ └── server/
│ └── main.go
├── internal/
│ ├── server/
│ │ └── server.go
│ ├── store/
│ │ └── store.go
│ └── watcher/
│ └── watcher.go
├── go.mod
└── README.md
Quick Start
Clone the repository
git clone https://github.com/agaonker/mcp-memory-serverInstall dependencies
cd mcp-memory-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.