LogicMem MCP Server

LogicMem MCP Server

Provides persistent memory, reasoning, agent-to-agent sharing, and immutable audit trail for AI agents via the Model Context Protocol.

Category
Visit Server

README

🧠 LogicMem — AI Agent Memory Infrastructure

Persistent memory, A2A sharing, reasoning engine, and immutable audit trail for AI agents via the Model Context Protocol.

Python 3.11+ License: MIT MCP Compatible


The Problem

AI agents are stateless by design. Every session starts from scratch:

Session 1                              Session 2
──────────                             ──────────
User: "I'm building a SaaS"     →     User: "How's my SaaS coming?"
Agent: "Tell me more..."              Agent: "I don't know anything
...                                   about your SaaS"
[Session ends]                        
                                      Agent forgot EVERYTHING.

This is fine for demos. It's catastrophic for production AI workflows.

The Solution

LogicMem gives your AI agent persistent memory — connect any MCP client and get:

  • šŸ” Persistent Memory — Store and search memories across sessions
  • 🧠 Reasoning Engine — Multi-step reasoning that consults memory
  • šŸ”— A2A Memory Sharing — Agents share context in real-time
  • šŸ“‹ Immutable Audit Trail — Cryptographically verifiable history
  • šŸŽ™ļø Voice Memory — Caller history for VAPI, Retell AI, Bland AI

Open Core Model

This repo is the LogicMem SDK — the open-source client for connecting AI agents to the LogicMem memory fabric. The SDK is fully open (MIT licensed). The reasoning engine and audit chain run on LogicMem's private server.

Open Source (This Repo) LogicMem Pro / Enterprise
SDK / Client āœ… Fully open (MIT) āœ… Included
Persistent Memory āœ… Up to 1,000 ops/mo (free tier) āœ… Unlimited
A2A Memory Sharing āœ… Basic āœ… Advanced governance + cross-org
Reasoning Engine āœ… API call (server-powered) āœ… Deep / Exhaustive modes
Audit Trail āœ… API call (server-verified) āœ… Tamper-evident ledger + CNSA 2.0
Voice Agent Memory āœ… āœ…
Deployment Cloud (logicmem.io) Cloud, on-prem, or air-gap
Support Community Dedicated + SLA

Why this model? The SDK gives developers the steering wheel. The LogicMem server is the engine. You get a great developer experience — and your AI gets production-grade memory infrastructure without building it yourself.


Install

# macOS: add --break-system-packages (Homebrew Python requires it)
pip install --break-system-packages git+https://github.com/LogicMem/LogicMem-mcp-.git

# Linux/Ubuntu (no flag needed):
pip install git+https://github.com/LogicMem/LogicMem-mcp-.git

Quick Start (< 5 minutes)

1. Get an API Key

Sign up at logicmem.io → Settings → API Keys → Create Key.

Free tier: 1,000 memory operations/month.

āš ļø macOS users: If you see a PEP 668 error during install, rerun with --break-system-packages flag (see Install section above).

2. Use the Python SDK

from logicmem import LogicMem

# Initialize the client
memory = LogicMem(api_key="lm_your_api_key")

# Store a memory
memory.log(
    text="User prefers urgent messages via Telegram, not email.",
    category="preference",
    importance=8,
)

# Search memories
results = memory.recall(query="user communication preferences")
print(results[0]["text"])
# → "User prefers urgent messages via Telegram, not email."

# Store a task with context
memory.log(
    text="Review Q3 proposal by Friday. Priority: cost breakdown first, then timeline.",
    category="task",
    importance=9,
)

# Session briefing — full context at start of session
brief = memory.session(client_id="ed_creed")
print(brief["confidence"])   # How confident is the agent about this user?
print(brief["relationship_trend"])  # improving / declining / stable

3. Reasoning Engine

# Multi-step reasoning with memory at each step
answer = memory.reason(
    question="Should we prioritize the mobile app or web dashboard first?",
    context="User is a solo founder with limited engineering bandwidth.",
    mode="deep",  # fast / deep / exhaustive
)
print(answer["answer"])
print(answer["confidence"])

# Verify a claim against stored facts
verdict = memory.verify("User has a budget of $50k for this project")
print(verdict["verdict"])   # supported / contradicted / inconclusive
print(verdict["evidence"])  # supporting entries

# Self-critique before committing to an answer
review = memory.reflect(
    draft_answer="You should build the web dashboard first.",
    question="What should we prioritize first?",
    memory_query="user preferences priorities",
)
print(review["score"])      # 0-100
print(review["gaps"])       # weaknesses in the answer

4. Agent-to-Agent (A2A) Memory Sharing

from logicmem.a2a import A2AClient

# Agent A: Share a memory with Agent B
a2a = A2AClient(api_key="lm_agent_a_key", agent_id="agent-researcher")

# Register this agent
a2a.register(name="Researcher Agent", agent_type="agent", client_id="team-alpha")

# Share context with another agent
a2a.share_memory(
    target_agent_id="agent-executor",
    memory={"text": "User needs Q3 report by Friday. High priority."},
    category="task",
    importance=9,
)

# Check for new shared memories from other agents
shared = a2a.sync()
for entry in shared:
    print(f"From {entry['from_agent_id']}: {entry['text']}")

5. Verify Audit Chain

from logicmem.audit import AuditChain

audit = AuditChain(memory)  # pass LogicMem client

# Verify the audit chain has not been tampered with
result = audit.verify()
print(result["valid"])  # True if chain integrity is intact

# Log a correction (improves the model)
audit.log_correction(
    original="The user prefers email for urgent messages.",
    corrected="The user prefers Telegram for urgent messages, not email.",
    reason="User explicitly stated Telegram in call on 2026-06-10.",
)

# Check DPO training pipeline stats
stats = audit.dpo_stats()
print(f"Correction pairs ready: {stats['ready_count']}")

Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                      Your AI Agent                           │
│              (Claude, GPT, Any MCP Client)                    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                             │ MCP
                             ā–¼
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                   LogicMem MCP Server                        │
│                 api.logicmem.io                              │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │
│  │   Memory    │ │  Reasoning │ │    A2A     │ │ Audit  │ │
│  │   Tools     │ │   Engine   │ │   Relay    │ │ Chain  │ │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                             │
           ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
           ā–¼                 ā–¼                 ā–¼
    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”   ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”   ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
    │  Memory    │   │   Memory   │   │   Audit   │
    │  Storage   │   │   Index    │   │   Ledger  │
    │(Supabase)  │   │ (Qdrant)   │   │(Hash Chain)│
    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜   ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜   ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

MCP Protocol Reference

The server accepts JSON-RPC 2.0 requests over HTTPS.

Base URL: https://api.logicmem.io

Authentication: Authorization: Bearer <api_key> header.

Core Tools

Tool Description
logicmem_memory_log Store a new memory with category, importance, tags
logicmem_memory_recall Search memories with natural language
logicmem_memory_session Get full context briefing for current session
logicmem_reason Multi-step reasoning with memory consultation
logicmem_verify Verify a claim against stored facts
logicmem_reflect Self-critique — evaluate draft against memory
logicmem_audit_verify Verify integrity of the audit chain
logicmem_a2a_share Share memory with another agent
logicmem_a2a_receive Receive shared memory from another agent

See MCP-PROTOCOL.md for the full protocol reference.


Comparison

Feature LogicMem Mem0 Letta Zep
MCP-native āœ… Full āš ļø āœ… āš ļø
Reasoning engine āœ… āŒ āš ļø āŒ
A2A memory sharing āœ… āŒ āš ļø āŒ
Immutable audit trail āœ… āŒ āŒ āš ļø
DPO training pipeline āœ… āŒ āŒ āŒ
Voice agent memory āœ… āŒ āš ļø āŒ
Federated memory āœ… āŒ āŒ āŒ

Security

  • Encryption: AES-256-GCM at rest, TLS 1.3 in transit
  • Compliance: CNSA 2.0 cryptography for defense/government workloads
  • Audit: Every operation logged to immutable hash-linked chain
  • API Keys: Per-agent keys with fine-grained permissions

See SECURITY.md for the full security model.


Documentation

All documentation lives in the docs/ folder right here in this repo:

Doc What You Need
šŸ“– Start Here Install + first 10 lines of code
šŸ”Œ MCP Protocol Full protocol reference
šŸ”— A2A Sharing Agent-to-agent memory
šŸ”’ Security Encryption, CNSA 2.0, audit
šŸ’» Code Examples All examples in one place

Links


Contributing

Contributions welcome. Please see CONTRIBUTING.md.

We especially welcome:

  • MCP client examples (more clients → more adoption)
  • Framework integrations (LangChain, AutoGPT, CrewAI, etc.)
  • A2A protocol extensions
  • SDK implementations in other languages

License

MIT License. See LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured