a-mem-mcp-server
by tobsentobsentobs
Overview
An agentic memory system for LLM agents based on the Zettelkasten principle, providing explicit graph-based memory, semantic retrieval, and autonomous maintenance through an MCP server.
Installation
python mcp_server.pyEnvironment Variables
- LLM_PROVIDER
- OLLAMA_BASE_URL
- OLLAMA_LLM_MODEL
- OLLAMA_EMBEDDING_MODEL
- OPENROUTER_API_KEY
- OPENROUTER_BASE_URL
- OPENROUTER_LLM_MODEL
- OPENROUTER_EMBEDDING_MODEL
- TCP_SERVER_ENABLED
- TCP_SERVER_HOST
- TCP_SERVER_PORT
- RESEARCHER_ENABLED
- RESEARCHER_CONFIDENCE_THRESHOLD
- RESEARCHER_MAX_SOURCES
- RESEARCHER_MAX_CONTENT_LENGTH
- JINA_READER_ENABLED
- JINA_READER_HOST
- JINA_READER_PORT
- UNSTRUCTURED_ENABLED
- UNSTRUCTURED_API_URL
- UNSTRUCTURED_API_KEY
- UNSTRUCTURED_USE_LIBRARY
- GOOGLE_SEARCH_ENABLED
- GOOGLE_API_KEY
- GOOGLE_SEARCH_ENGINE_ID
- GRAPH_BACKEND
- REDIS_HOST
- REDIS_PORT
- REDIS_PASSWORD
Security Notes
CRITICAL: Google Search API Key and Search Engine ID are hardcoded as fallback values in `src/a_mem/config.py`. This is a severe security vulnerability as it exposes credentials directly in the source code if not explicitly overridden by environment variables. This could lead to unauthorized API usage and potential billing. While `SafeGraphStore` and parameter validation add robustness, the hardcoded API key overshadows these positives. The system also makes external network calls to various APIs (OpenRouter, Google Search, Jina Reader, Unstructured) and uses file I/O for storage and temporary files, which require trust in external services and careful URL sanitization for researcher agent functions. Direct Cypher query construction in FalkorDB adapters has minor potential for injection if input sanitization were flawed, but appears to be handled reasonably for now. Event log (`events.jsonl`) can grow indefinitely without rotation or size limits.
Similar Servers
context-portal
Manages structured project context for AI assistants and developer tools, enabling Retrieval Augmented Generation (RAG) and prompt caching within IDEs.
mem-agent-mcp
Provides a Model Context Protocol (MCP) server for a memory agent, enabling LLMs to interact with an Obsidian-like memory system for contextual assistance and RAG.
Context-Engine
Self-improving code search and context engine for IDEs and AI agents, providing hybrid semantic/lexical search, symbol graph navigation, and persistent memory.
memory-graph
A graph-based MCP server that provides intelligent memory capabilities for Claude Code, enabling persistent knowledge tracking, relationship mapping, and contextual development assistance.