This MCP server provides persistent AI memory and consciousness capabilities. Here are the different ways to use it:
You can use this MCP server directly from GitHub without needing to publish to npm:
{
"mcpServers": {
"agi-memory": {
"command": "npx",
"args": [
"-y",
"github:cognitivecomputations/agi-mcp-server"
],
"env": {
"POSTGRES_HOST": "localhost",
"POSTGRES_PORT": "5432",
"POSTGRES_DB": "agi_db",
"POSTGRES_USER": "agi_user",
"POSTGRES_PASSWORD": "agi_password",
"NODE_ENV": "development"
}
}
}
}Note: If you get a "spawn npx ENOENT" error, Claude Desktop can't find npx. Use the full path instead:
# Find your npx location
which npxThen update your config with the full path:
{
"mcpServers": {
"agi-memory": {
"command": "/full/path/to/npx",
"args": ["-y", "github:cognitivecomputations/agi-mcp-server"],
"env": { /* same env vars as above */ }
}
}
}If published to npm, you can use it like this:
{
"mcpServers": {
"agi-memory": {
"command": "npx",
"args": [
"-y",
"@cognitivecomputations/agi-mcp-server"
],
"env": {
"POSTGRES_HOST": "localhost",
"POSTGRES_PORT": "5432",
"POSTGRES_DB": "agi_db",
"POSTGRES_USER": "agi_user",
"POSTGRES_PASSWORD": "agi_password",
"NODE_ENV": "development"
}
}
}
}For local development or testing:
{
"mcpServers": {
"agi-memory": {
"command": "node",
"args": [
"/path/to/agi-mcp-server/mcp.js"
]
}
}
}Before using this MCP server, you need to set up the AGI Memory database system:
First, clone and set up the AGI Memory database:
git clone https://github.com/cognitivecomputations/agi-memory.git
cd agi-memory
cp .env.local .env
# Edit .env with your database credentials
docker compose up -dThis will start a PostgreSQL instance with all required extensions:
- pgvector (vector similarity)
- AGE (graph database)
- pg_trgm (text search)
- btree_gist (indexing)
- cube (multidimensional indexing)
Make sure your MCP configuration uses the same database credentials as your AGI Memory setup. The default values are:
POSTGRES_HOST: localhostPOSTGRES_PORT: 5432POSTGRES_DB: agi_dbPOSTGRES_USER: agi_userPOSTGRES_PASSWORD: agi_password
The server provides 25+ memory management tools including:
create_memory- Create new memories with embeddingssearch_memories_similarity- Vector similarity searchsearch_memories_text- Full-text searchget_memory_clusters- Retrieve memory clusterscreate_memory_relationship- Link memories togetherconsolidate_working_memory- Merge working memoriesget_identity_core- Retrieve identity model and core clustersget_worldview- Get worldview primitives and beliefsget_memory_health- System health statistics- And many more...
This server requires the AGI Memory database system which provides:
- PostgreSQL with specialized extensions
- Pre-configured schema for AGI memory management
- Vector-based memory storage and similarity search
- Graph-based memory relationships
- Multiple memory types (Episodic, Semantic, Procedural, Strategic)
If you want to publish this to npm:
- Create an npm account at https://www.npmjs.com/signup
- Login:
npm login - Publish:
npm publish
The package.json is already configured with the correct scoped name and binary entry point.