Zanny's Persistent Memory Manager

by zannyonear1h1
Verified
# Zanny's Persistent Memory Manager A custom MCP (Model Capabilities Provider) server that functions as a persistent memory bank. This TypeScript-based server allows you to store, retrieve, and manage memories with flexible keyword detection and commands. ## Features - **Store Memories**: Save any text-based information for later retrieval - **Retrieve Memories**: Search and retrieve stored memories by content or ID - **Delete Memories**: Remove memories when they're no longer needed - **Smart Keyword Detection**: Automatically detect relevant commands in natural language - **Unlimited Storage**: No artificial limits on memory storage size - **Comprehensive Logging**: Detailed logging for troubleshooting and monitoring - **MCP Compatibility**: Full JSON-RPC implementation for Smithery.ai deployment ## Installation 1. Ensure you have Node.js and npm installed on your system 2. Install project dependencies: ``` npm install ``` 3. Build the TypeScript project: ``` npm run build ``` ## Usage ### Starting the Server Start the server with: ``` npm start ``` The server will begin listening on port 3000 by default. ### API Endpoints #### REST API (Legacy) - `GET /health` - Check server health - `POST /api/memories` - Store a new memory - `GET /api/memories` - List or search memories - `GET /api/memories/:id` - Retrieve a specific memory - `DELETE /api/memories/:id` - Delete a memory - `POST /api/detect` - Detect trigger keywords in text #### JSON-RPC Endpoints (MCP Compatible) - `POST /tools/list` - List available tools - `POST /tools/call` - Call a specific tool ### Memory Commands The MCP server understands natural language commands related to memory management. Examples: #### Storing Memories ``` remember: This is important information I want to store store: The meeting is scheduled for March 15th at 2pm ``` #### Retrieving Memories ``` recall information about meetings remember anything related to schedules ``` #### Deleting Memories ``` delete memory with id 5f4dcc3b5aa765d61d8327deb882cf99 forget id 5f4dcc3b5aa765d61d8327deb882cf99 ``` #### Listing All Memories ``` list all memories show all memories ``` ## Project Structure ``` ├── dist/ # Compiled JavaScript output ├── logs/ # Log files ├── src/ # TypeScript source code │ ├── config.ts # Server configuration │ ├── index.ts # Entry point │ ├── logger.ts # Logging configuration │ ├── mcpServer.ts # Main MCP server implementation │ └── memoryManager.ts # Memory storage and retrieval ├── package.json # Project dependencies ├── smithery.json # Smithery.ai configuration ├── tsconfig.json # TypeScript configuration └── README.md # This file ``` ## Configuration Configuration is managed in `src/config.ts`. The main settings include: - Server name - Server port - Memories directory - Logger configuration - Trigger keywords ## Deploying to Smithery.ai This MCP server is compatible with Smithery.ai deployments. To deploy: 1. Make sure your code is in a Git repository 2. Create a Smithery.ai account if you don't have one 3. Connect your repository to Smithery.ai 4. The included `smithery.json` file will guide the deployment process ## Logging Logs are stored in the `logs/` directory. All logs are formatted as JSON to ensure compatibility with the MCP specification. ## License ISC