LogicMem MCP Server
OfficialThis is the local logicmem-server stdio MCP server: it gives an agent persistent, searchable memory plus agent-to-agent (A2A) memory sharing, backed by the hosted LogicMem REST API.
Store memories (
logicmem_memory_log) with text, category, importance (1–10), tags, source and client_id.Search memories (
logicmem_memory_recall) by natural-language query, with a result limit.Get a session briefing (
logicmem_memory_session): recall plus sentiment, constraints, intelligence and gaps.Inspect the memory system — totals, categories and storage via
logicmem_memory_stats, and server liveness vialogicmem_memory_health.Give feedback (
logicmem_memory_outcome): mark stored memories as useful or not (with magnitude), feeding the DPO training pipeline.Self-critique (
logicmem_memory_reflect): evaluate a draft answer against retrieved memories.A2A collaboration: register an agent (
a2a_register), send heartbeats (a2a_heartbeat), list a client's agents (a2a_list_agents), write to the shared pool (a2a_write_shared, with private/public flag), and pull new shared memories since a timestamp (a2a_sync).Not exposed here: audit-chain verification, corrections, conversations and reasoning are only listed on the hosted server (
logicframe_*tools); notelogicmem_memory_reflectappears here despite the README sayingreflect()is hosted-only.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LogicMem MCP Server Remember that I prefer async updates over meetings."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LogicMem: prove what your AI did
Tamper-evident, hash-chained records of what your AI agents did and relied on, so you can show an auditor whether anything was changed. This is the open-source SDK and MCP connector. Records are kept and verified on the LogicMem server, in our cloud.
Observability tells you what broke. LogicMem shows what happened.
The problem
Six months from now, an auditor asks what your AI agent did and what it relied on. Ordinary logs can be edited, and nobody can prove they weren't.
Related MCP server: LogicMem MCP Server
What LogicMem gives you
A tamper-evident, hash-chained record of your agents' key memory operations, so you can show whether anything was changed. Shared memory across vendors comes with it.
What is in this repo
Python SDK (
logicmem, MIT licensed): a client for the LogicMem REST API athttps://api.logicmem.io.Local MCP server (
logicmem-server): a stdio bridge that serveslogicmem_*tools to MCP clients.Docs for the hosted MCP server at
https://mcp.logicmem.io/mcp, which serveslogicframe_*tools.
The LogicMem server itself (storage, reasoning engine, audit chain) is not in this repo; it runs in LogicMem's cloud.
Access: API keys are issued to pilot teams. Pilots run 30 days, from $500/mo: logicmem.io/design-partner.
Install
Use a virtual environment (works on macOS, Linux and Windows):
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# SDK only
pip install git+https://github.com/LogicMem/LogicMem-mcp-.git
# SDK + local MCP server (logicmem-server)
pip install "logicmem[cli] @ git+https://github.com/LogicMem/LogicMem-mcp-.git"Install from GitHub as shown. The
logicmempackage on PyPI is an older 0.1.1 build with out-of-date links.
Quick start
1. Get an API key
Keys start with lm_. They are issued to pilot teams while self-serve sign-up is being rebuilt: request one at logicmem.io/design-partner. Treat the key like a password.
Requests over your rate limit return HTTP 429 (RateLimitError in the SDK).
2. Use the Python SDK
import os
from logicmem import LogicMem
memory = LogicMem(api_key=os.environ["LOGICMEM_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")
for r in results:
print(r.get("text"))
# Session briefing (a context summary from the server)
brief = memory.session(client_id="default")
print(brief)3. Reasoning engine
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.get("answer"))
print(answer.get("confidence"))verify(), reflect() and intelligence() exist on the client but always raise NotImplementedError: those features run only as MCP tools (logicframe_verify, logicframe_reflect, logicframe_intelligence) on the hosted server. Call them from an MCP client (see below).
4. Agent-to-agent (A2A) memory sharing
import os
from logicmem.a2a import A2AClient
a2a = A2AClient(api_key=os.environ["LOGICMEM_API_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,
client_id="team-alpha",
)
# In the other agent: fetch memories shared by other agents
executor = A2AClient(api_key=os.environ["LOGICMEM_API_KEY"], agent_id="agent-executor")
for entry in executor.sync(client_id="team-alpha"):
print(entry.get("text"))5. Verify the audit chain
from logicmem.audit import AuditChain
audit = AuditChain(memory) # pass a LogicMem client
# Ask the server to re-check the hash chain
print(audit.verify())
# Log a correction (stored on the server and queued for its training pipeline)
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 a call.",
)
print(audit.dpo_stats())Architecture
┌──────────────────────────────────────────────────────────────┐
│ Your AI Agent │
│ (Claude, GPT, any MCP client) │
└──────────────────────────────────────────────────────────────┘
│ MCP (hosted or local stdio) │ Python SDK
▼ ▼
┌───────────────────────────┐ ┌───────────────────────────┐
│ Hosted MCP server │ │ REST API │
│ mcp.logicmem.io/mcp │ │ api.logicmem.io │
│ logicframe_* tools │ │ (also used by │
│ │ │ logicmem-server) │
└───────────────────────────┘ └───────────────────────────┘
└──────────────► LogicMem server ◄──────────┘
memory · reasoning · A2A · audit chainConnect an MCP client
Option A: hosted MCP server URL
Add LogicMem as a streamable-http MCP server. Example for OpenClaw (~/.openclaw/openclaw.json):
{
"mcp": {
"servers": {
"logicmem": {
"transport": "streamable-http",
"url": "https://mcp.logicmem.io/mcp",
"headers": {
"Authorization": "Bearer lm_YOUR_API_KEY"
}
}
}
}
}Other clients (Claude Code, Cursor and similar) use the same URL and header in their own MCP settings.
Option B: local stdio server
If your client works better with a local command, install the CLI extra:
pip install "logicmem[cli] @ git+https://github.com/LogicMem/LogicMem-mcp-.git"
logicmem-server --helpThen point your client at the logicmem-server command:
{
"mcp": {
"servers": {
"logicmem": {
"command": "logicmem-server",
"env": {
"LOGICMEM_API_KEY": "lm_YOUR_API_KEY",
"LOGICMEM_CLIENT_ID": "your-client-id"
}
}
}
}
}Check your setup
openclaw mcp list # LogicMem should be listedThen ask your agent to store a note with logicframe_memory_log (hosted) or logicmem_memory_log (local) and recall it.
Environment variables (for logicmem-server)
The Python SDK does not read these; pass api_key and base_url to LogicMem(...) instead.
Variable | Default | Description |
| — | Your API key ( |
|
| Override the LogicMem REST API URL |
|
| Default client_id for memory operations |
|
| HTTP request timeout in seconds |
MCP reference
Hosted MCP endpoint: https://mcp.logicmem.io/mcp (JSON-RPC over HTTPS POST)
REST API base URL: https://api.logicmem.io
Authentication: Authorization: Bearer <api_key>. initialize and tools/list are public; tools/call requires a key.
Tool name prefix: the hosted server serves
logicframe_*tool names (e.g.logicframe_memory_log,logicframe_memory_recall). The local pip server (logicmem-server) serveslogicmem_*tool names. Both use the same backend.
Commonly used hosted tools
The hosted server lists many more tools; run tools/list to see them all.
Tool | Description |
| Store a new memory with category, importance, tags |
| Search memories with natural language |
| Get context about a client, project, or person |
| Multi-step reasoning that consults memory |
| Check a claim against stored memories |
| Critique a draft answer against memory |
| Look for patterns and overdue items |
| Verify integrity of the audit chain |
| Log a correction (queued for DPO training) |
| Store conversation state for auto-resume |
| Retrieve stored conversation state |
See MCP-PROTOCOL.md for details.
Security
In transit: HTTPS (the hosted endpoints negotiate TLS 1.3)
Audit: key memory operations made through the API and MCP connector (for example log, recall and correct) are logged to a tamper-evident, hash-linked chain that you can re-check with
logicframe_audit_verifyorAuditChain.verify(). Not every endpoint writes an audit entry yet.API keys: sent as a Bearer token; keep them out of code and git
See SECURITY.md.
Documentation
Doc | What you need |
Install + first script | |
Hosted MCP server reference | |
Agent-to-agent memory | |
Transport, auth, audit chain | |
All examples in one place | |
How the server handles embedding-provider outages | |
Everything else |
Links
🌐 logicmem.io — Product
🚀 Quickstart — Connect your agents and verify the audit chain
🧪 Pilots — 30-day pilots from $500/mo
📜 EU AI Act Article 12 — LogicMem is designed to support record-keeping such as EU AI Act Article 12 (not legal advice)
Contributing
Contributions welcome. Please see CONTRIBUTING.md. We especially welcome MCP client examples, framework integrations (LangChain, CrewAI, etc.), A2A extensions, and SDKs in other languages.
Changelog
See CHANGELOG.md.
License
MIT License. See LICENSE.
Available Tools
12 toolslogicmem_a2a_heartbeatD
Send a heartbeat to the A2A registry.
Inputs: agent_id (required), client_id (required), status.
logicmem_a2a_list_agentsA
List all registered agents for a client_id.
Inputs: client_id (required).
logicmem_a2a_registerC
Register this agent in the A2A registry.
Inputs: agent_id (required), client_id (required), name, agent_type.
logicmem_a2a_syncB
Check for new shared memories from other agents since last sync.
Inputs: agent_id (required), client_id (required), limit, since_timestamp.
logicmem_memory_healthA
Check if the LogicMem memory server is healthy.
Inputs: no named parameters.
logicmem_memory_logA
Store a new memory. The agent's memory is permanent and searchable across sessions. Be specific — include who, what, when, why.
Inputs: text (required), tags, source, category, +2 more.
logicmem_memory_outcomeB
Record whether a stored memory was useful. Feeds the DPO training pipeline.
Inputs: success (required), memory_ids (required), magnitude.
logicmem_memory_recallC
Search memory for relevant entries.
Inputs: query (required), limit, client_id.
logicmem_memory_reflectB
Self-critique: evaluate a draft answer against retrieved memories.
Inputs: question (required), draft_answer (required), memory_query.
logicmem_memory_sessionB
Full memory session briefing — recall + sentiment + constraints + intelligence + gaps.
Inputs: client_id.
logicmem_memory_statsA
Get memory system stats — total entries, categories, storage.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
All 12 tools have clearly distinct purposes, split into two coherent groups: memory operations (log, recall, stats, session, health, outcome, reflect) and A2A operations (register, heartbeat, list_agents, write_shared, sync). No overlapping functionality.
Tool names follow a consistent pattern: `logicmem_<group>_<action>`. Memory tools use `memory_` and A2A tools use `a2a_`. Verbs are descriptive (log, recall, stats, etc.), making the pattern predictable.
With 12 tools covering memory management and agent-to-agent communication, the count is well-scoped. Each tool serves a distinct function without redundancy, fitting the server's purpose.
The set covers core memory operations (store, recall, stats, session, outcome, reflect, health) and A2A operations (register, heartbeat, list, write shared, sync). Minor gaps exist, such as no explicit delete/update for memories, but the design suggests permanence.
Maintenance
Related MCP Connectors
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
A shared, governed brain for AI agents: versioned context with approvals, local or hosted.
Cross-tool persistent memory and context for AI assistants over MCP.
Shared persistent memory for AI agents to read, verify, continue, and connect knowledge.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceGoverned shared memory platform for AI agents and agent fleets. Provides persistent memory, cross-agent knowledge sharing, permissions, audit trails, and multi-tenant isolation through a Model Context Protocol (MCP) server.4 npm556Apache 2.0
- AlicenseBqualityFmaintenanceProvides persistent memory, reasoning engine, agent-to-agent sharing, and immutable audit trail for AI agents via the Model Context Protocol.12MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory for AI coding agents through the Model Context Protocol, enabling them to store and retrieve project knowledge across sessions.27 npmMIT
- AlicenseNot gradedqualityDmaintenanceGives AI agents durable project memory via the Model Context Protocol, allowing them to read tasks, record decisions, search context, and sync snapshots to the cloud.12 npmMIT