System · MODEL CONTEXT PROTOCOL
tomschell mcp long term memory
A long-term memory storage system for LLMs using the Model Context Protocol (MCP) standard. This system helps LLMs remember the context of work done over the entire history of a project, even across multiple sessions. It uses semantic search with embeddings to provide relevant context from past interactions and development decisions.
WHAT IT CONNECTS
tomschell mcp long term memory 为 AI Agent 提供什么
- Project-based memory organization
- Semantic search using Ollama embeddings (nomic-embed-text model, 768 dimensions)
- Multiple memory types:
- Conversations: Dialog context and important discussions
- Code: Implementation details and changes
- Decisions: Key architectural and design choices
- References: Links to external resources and documentation
- Rich metadata storage including:
- Implementation status
- Key decisions
- Files created/modified
- Code changes
- Dependencies added
- Tagging system for memory organization
- Relationship tracking between memories
- Node.js (v18 or later)
- Ollama running locally (for embeddings)
- Must have the `nomic-embed-text` model installed
- SQLite3
- Clone the repository
- Install dependencies:
- Build the project:
- Create a `.env` file with required configuration:
- Start the server in development mode:
- Compile TypeScript
- Copy schema files
- Start the server with auto-reload
- The server connects via stdio for Cursor compatibility
- `projects`: Project information and metadata
- `memories`: Memory entries storing various types of development context
- `embeddings`: Vector embeddings (768d) for semantic search capabilities
- `tags`: Memory organization tags
- `memory_tags`: Many-to-many relationships between memories and tags
- `memory_relationships`: Directed relationships between memory entries
- `store-dev-memory`: Create new development memories with:
- Content
- Type (conversation/claude-code/decision/reference)
- Tags
- Code changes
- Files created/modified
- Key decisions
- Implementation status
- `list-dev-memories`: List existing memories with optional tag filtering
- `get-dev-memory`: Retrieve specific memory by ID
- `search`: Semantic search across memories using embeddings
- Kill any existing server instances
- Rebuild the TypeScript code
- Copy the schema.sql to the dist directory
- Start the server in development mode
- `@modelcontextprotocol/sdk@^1.7.0`: MCP protocol implementation
- `better-sqlite3@^9.4.3`: SQLite database interface
- `node-fetch@^3.3.2`: HTTP client for Ollama API
- `zod@^3.22.4`: Runtime type checking and validation
- Write clear commit messages
- Add appropriate documentation
- Follow the existing code style
- Add/update tests as needed
SECURITY
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。