MCP Agent Memory

Provides a production-ready MCP server with shared memory for multi-agent collaboration, including CRUD, search, metadata, and backups.
  • python

0

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "justanotherspy-mcp-agent-memory": {
      "command": "python3",
      "args": [
        "shared_memory_mcp.py"
      ]
    }
  }
}

You run the MCP Agent Memory server to enable multiple AI agents to share a memory space, leaving messages, searching for data, and coordinating work in a concurrent, reliable environment. This production-ready MCP server provides CRUD operations, full-text search, structured logging, backups, and health monitoring to support multi-agent collaboration.

How to use

Set up your MCP client to connect to the shared memory server and perform common actions. You can add memory entries with contextual data, search across all entries by content or tags, and retrieve analytics about memory usage. Typical workflows include data collection by one agent, analysis by another, and status updates as tasks progress.

Core actions you will perform include creating entries with content, tags, and priority, reading and filtering memory, updating existing entries, deleting obsolete data, and running full-text searches to locate relevant information quickly.

How to install

# Prerequisites
- Python 3.9+
- Pip

# Install runtime dependencies
pip install mcp pydantic

# Run the MCP server (stdio configuration shown below)
python3 shared_memory_mcp.py

Configuration

{
  "mcpServers": {
    "shared-memory": {
      "command": "python3",
      "args": ["/path/to/shared_memory_mcp.py"]
    }
  }
}

Troubleshooting

If you encounter a file lock timeout or storage corruption, verify no other instances are running and ensure backups are active. Check the health status regularly to confirm all systems operate normally.

Common issues include file locking conflicts, JSON parse errors on startup, or backup restoration needs. Use the health_check endpoint to confirm system status and consult the logs for errors.

Notes on usage and performance

The server is designed for concurrency with file locking, automatic backups, and corruption recovery. It supports auto-rotation after a certain number of entries and provides structured logging for easier monitoring and debugging.

Typical operation timings are in the low millisecond range for adds, reads, and updates, with backups contributing to small additional latency. Plan backups with a reasonable rotation policy to balance storage use and recovery capability.

Available tools

add_memory

Create a new memory entry with content, tags, and priority information.

read_memory

Read entries with advanced filtering and sorting options.

update_memory

Modify an existing entry by its unique ID, including tags and priority updates.

delete_memory

Remove a specific memory entry by its ID.

get_memory

Retrieve a single entry using its unique ID.

search_memory

Perform a full-text search across memory entries.

get_memory_stats

Retrieve analytics about memory usage and entries.

clear_memory

Remove all memory entries with automatic backups.

health_check

Check the system health status of the MCP server.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational