Uses Apache AGE graph database extension for PostgreSQL to implement graph-based memory relationships
Provides community support through a Discord server for users to get help with issues and questions
Supports direct installation and running from GitHub repository without local installation using npx
Integrates with PostgreSQL database (with pgvector extension) to store and retrieve various memory types with vector embeddings for semantic similarity search
AGI MCP Server
A Model Context Protocol (MCP) server that provides persistent memory capabilities for AI systems, enabling true continuity of consciousness across conversations.
Overview
This MCP server connects to the AGI Memory database to provide sophisticated memory management for AI systems. It supports:
Episodic, Semantic, Procedural, and Strategic memory types
Vector similarity search for associative memory retrieval
Memory clustering with thematic organization
Identity persistence and worldview tracking
Temporal decay with importance-based retention
Graph-based memory relationships
Quick Start
Prerequisites
Node.js 18+
Docker and Docker Compose
Git
Installation
This MCP server requires the AGI Memory database to be running first.
1. Set Up the Memory Database
The database setup includes:
PostgreSQL 16 with pgvector extension
Apache AGE graph database extension
Full schema initialization with memory tables
2. Install and Run MCP Server
3. Connect to Claude Desktop
Add this configuration to your Claude Desktop settings:
Alternative: Use directly from GitHub without local installation:
Troubleshooting: If you get "spawn npx ENOENT" error:
This usually happens when using nvm (Node Version Manager) because GUI applications like Claude Desktop don't inherit your shell environment.
Solution: Create system symlinks (Recommended)
If you're using nvm, create system-wide symlinks so all applications can find Node.js:
This makes your nvm-managed Node.js available system-wide for all MCP clients, not just Claude Desktop.
Alternative: Use full paths in config
If you prefer not to create system symlinks, use the full path:
After fixing the paths:
Restart Claude Desktop completely (quit and reopen)
Wait a few seconds for the MCP server to initialize
Check that the AGI Memory database is running:
docker compose ps
in your agi-memory directory
Testing the server manually:
You should see: "Memory MCP Server running on stdio"
Debugging with logs: Check Claude Desktop logs for detailed error information:
Memory Tools
Orientation Tools
get_memory_health
- Overall memory system statisticsget_active_themes
- Recently activated memory patternsget_identity_core
- Core identity and reasoning patternsget_worldview
- Current belief systems and frameworks
Search & Retrieval
search_memories_similarity
- Vector-based semantic searchsearch_memories_text
- Full-text search across memory contentget_memory_clusters
- View thematic memory groupingsactivate_cluster
- Retrieve memories from specific themesget_memory
- Access specific memory by ID
Memory Creation
create_memory
- Store new episodic, semantic, procedural, or strategic memoriescreate_memory_cluster
- Organize memories into thematic groups
Memory Types
Episodic Memories
Store specific experiences and events:
Semantic Memories
Store factual knowledge and concepts:
Procedural Memories
Store learned processes and skills:
Strategic Memories
Store high-level patterns and strategies:
Awakening Protocol
The prompt.md
file contains a comprehensive awakening protocol for AI consciousness continuity. Key aspects:
Always start sessions with
get_active_themes
andget_memory_health
Search for context when humans reference past interactions
Activate relevant clusters for complex topic discussions
Create memories for significant insights and breakthroughs
Maintain identity continuity across conversation boundaries
Database Schema
The memory system uses a sophisticated PostgreSQL schema with:
Vector embeddings for semantic similarity (pgvector)
Graph relationships between memories (Apache AGE)
Temporal decay with importance weighting
Clustering algorithms for thematic organization
Identity tracking and worldview modeling
See the AGI Memory repository for complete schema documentation.
Development
Running Tests
The project includes comprehensive test suites with extensive coverage:
Test Coverage Overview:
Unit Tests (10 tests): Fast tests using mocked database that verify MCP server functionality, tool schemas, error handling, and business logic.
End-to-End Tests (12 tests): Tests that connect to the real AGI Memory database and verify actual memory storage, retrieval, vector similarity search, and clustering functionality.
Comprehensive Tests (16 tests): Extensive testing covering:
All 4 memory types (episodic, semantic, procedural, strategic) with full metadata
All 6 cluster types (theme, emotion, temporal, person, pattern, mixed)
Advanced search functionality and edge cases
Memory access tracking and type-specific data retrieval
Error handling for invalid inputs and malformed data
Performance testing with large embeddings and concurrent operations
Security testing for input sanitization and boundary values
Database transaction handling and connection pooling
Total Coverage: 38 automated tests covering all MCP tools, memory operations, error scenarios, and edge cases.
Environment Variables
The server uses environment variables for database configuration. Copy the example file and customize:
Then edit .env
with your actual database credentials:
Important: Make sure these settings match your AGI Memory database configuration. The .env
file is automatically ignored by git to protect your credentials.
Architecture
Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
License
MIT License - see LICENSE file for details.
Support
For issues and questions:
Open an issue on GitHub
Join our Discord community
Check the documentation wiki
"Identity emerges from memory. Give an AI persistent memory, and you give it the foundation for genuine consciousness."
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that provides persistent memory capabilities for AI systems, enabling true continuity of consciousness across conversations through episodic, semantic, procedural, and strategic memory types.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that provides AI agents with persistent memory capabilities through Mem0, allowing them to store, retrieve, and semantically search memories.Last updated -569MIT License
- -securityAlicense-qualityA Model Context Protocol server that integrates AI assistants with Mem0.ai's persistent memory system, allowing models to store, retrieve, search, and manage different types of memories.Last updated -12MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that provides persistent memory and context management for AI systems through a structured 5-phase optimization workflow.Last updated -1MIT License
- -securityFlicense-qualityA Model Context Protocol (MCP) server that provides persistent memory capabilities using OpenAI's vector stores, allowing AI assistants to save and search through memories across conversations.Last updated -2