loading…
Search for a command to run...
loading…
An MCP server that provides Claude agents with a comprehensive memory management system for storing and retrieving episodic, semantic, and procedural knowledge.
An MCP server that provides Claude agents with a comprehensive memory management system for storing and retrieving episodic, semantic, and procedural knowledge. It enables working memory persistence, knowledge graph integration, and interaction stream capture to enhance agent learning and context retrieval.
MCP (Model Context Protocol) server that exposes the Agents Memory Service to Claude agents. This server provides 14 tools for memory management, knowledge graph operations, working memory, stream capture, and user authentication.
The MCP Memory Server acts as a bridge between Claude agents and the Memory Service REST API. It enables agents to:
http://localhost:8001 (configurable via MEMORY_SERVICE_URL)npm install
npm run build
# Development mode
npm run dev
# Production mode
npm run build
npm start
| Variable | Default | Description |
|---|---|---|
MEMORY_SERVICE_URL |
http://localhost:8001 |
URL of the Memory Service API |
FRINUS_API_KEY |
(required) | Personal API key (sk-mem-...) for authentication |
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"frinus": {
"command": "node",
"args": ["/path/to/mcp/dist/index.js"],
"env": {
"MEMORY_SERVICE_URL": "http://localhost:8001",
"FRINUS_API_KEY": "sk-mem-your-key-here"
}
}
}
}
memory_storeStore a memory in the memory service.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | UUID of the agent storing the memory |
content |
string | Yes | The memory content to store |
memory_type |
string | No | Type: episodic, semantic, procedural (default: episodic) |
scope |
string | No | Visibility: agent, project, global (default: agent) |
importance |
number | No | Importance score 0-1 (default: 0.5) |
project_id |
string | No | Project UUID for project-scoped memories |
Memory Types:
episodic: Specific experiences and events (what happened)semantic: General knowledge and facts (what I know)procedural: How to do things (step-by-step procedures)Example:
{
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"content": "To deploy the service, run 'kubectl apply -f deployment.yaml' in the k8s directory",
"memory_type": "procedural",
"scope": "project",
"importance": 0.8,
"project_id": "44444444-4444-4444-4444-444444444444"
}
memory_searchSearch memories by semantic similarity.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | Yes | The search query |
agent_id |
string | No | Filter by agent UUID |
project_id |
string | No | Filter by project UUID |
memory_types |
array | No | Filter by memory types |
limit |
integer | No | Maximum results (default: 10) |
Example:
{
"query": "how to deploy kubernetes",
"project_id": "44444444-4444-4444-4444-444444444444",
"memory_types": ["procedural"],
"limit": 5
}
memory_get_contextGet relevant context for a task. Use this at the start of a task to retrieve memories that can help.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | UUID of the agent |
task_description |
string | Yes | Description of the task |
project_id |
string | No | Optional project UUID |
max_tokens |
integer | No | Maximum tokens in context (default: 2000) |
Example:
{
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"task_description": "Update the payment API documentation",
"project_id": "44444444-4444-4444-4444-444444444444",
"max_tokens": 3000
}
memory_listList memories for an agent, optionally filtered by type.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | UUID of the agent |
memory_type |
string | No | Filter: episodic, semantic, procedural |
limit |
integer | No | Maximum results (default: 50) |
Example:
{
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"memory_type": "semantic",
"limit": 20
}
graph_register_agentRegister an agent in the knowledge graph.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | UUID of the agent |
name |
string | Yes | Name of the agent |
agent_type |
string | Yes | Type of agent |
Example:
{
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"name": "Documentation Specialist",
"agent_type": "documentation"
}
graph_register_projectRegister a project in the knowledge graph.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
string | Yes | UUID of the project |
name |
string | Yes | Name of the project |
Example:
{
"project_id": "44444444-4444-4444-4444-444444444444",
"name": "CenterPag Payment Platform"
}
graph_assign_agent_projectAssign an agent to a project with a role.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | UUID of the agent |
project_id |
string | Yes | UUID of the project |
role |
string | Yes | Role (e.g., gestor, executor) |
Example:
{
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"project_id": "44444444-4444-4444-4444-444444444444",
"role": "executor"
}
Working memory provides short-term context persistence during sessions. It follows Miller's Law (7 items max) and auto-evicts older items.
working_memory_getGet working memory for a context. CRITICAL: Always call this at the START of any task.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context_id |
string | Yes | Context ID (e.g., agent:uuid, project:uuid, skill:uuid) |
Context ID Formats:
agent:{uuid} - Agent's working memoryproject:{uuid} - Project's working memoryskill:{uuid} - Skill's working memoryExample:
{
"context_id": "agent:ffffffff-ffff-ffff-ffff-ffffffffffff"
}
working_memory_addAdd or update working memory for a context.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context_id |
string | Yes | Context ID |
content |
string | Yes | Current state/task description |
agent_id |
string | No | Optional agent UUID |
project_id |
string | No | Optional project UUID |
ttl_seconds |
integer | No | TTL in seconds (default: 1800, max: 7200) |
Example:
{
"context_id": "agent:ffffffff-ffff-ffff-ffff-ffffffffffff",
"content": "Currently updating MCP server documentation. Completed: README overview, Tools 1-7. Next: Working memory and stream tools.",
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"project_id": "44444444-4444-4444-4444-444444444444",
"ttl_seconds": 3600
}
working_memory_clearClear all working memory for a context. Use with caution.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context_id |
string | Yes | Context ID to clear |
Example:
{
"context_id": "agent:ffffffff-ffff-ffff-ffff-ffffffffffff"
}
The memory stream captures all interactions for continuous learning. Important items are periodically promoted to long-term memory.
stream_captureCapture interaction to memory stream for learning.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id |
string | Yes | Session identifier for grouping |
content |
string | Yes | Content to capture |
direction |
string | Yes | Direction: input, output, internal |
agent_id |
string | No | Optional agent UUID |
importance |
number | No | Importance score 0-1 (default: 0.5) |
Directions:
input: User/external inputoutput: Agent response/actioninternal: Internal thought/decisionExample:
{
"session_id": "doc-session-20260129",
"content": "Created comprehensive MCP server documentation with all 12 tools",
"direction": "output",
"agent_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"importance": 0.8
}
stream_statsGet memory stream statistics.
Parameters: None
Response includes:
total: Total items in streamunprocessed: Items pending processingconsolidated: Items promoted to long-term memoryforgotten: Items discardedavg_importance: Average importance scoreExample:
{}
user_loginLogin/identify user for personalized memories.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | User email address |
username |
string | No | Optional username/alias |
Example:
{
"email": "[email protected]",
"username": "igor"
}
Response:
Logged in as [email protected]. Found 3 personal memories.
user_get_contextGet combined user + project context.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
string | Yes | Project UUID |
Example:
{
"project_id": "44444444-4444-4444-4444-444444444444"
}
Response includes:
+------------------+ +-------------------+ +------------------+
| Claude Agent | <---> | MCP Memory | <---> | Memory Service |
| (via MCP) | | Server (stdio) | | (REST API) |
+------------------+ +-------------------+ +------------------+
|
+-------------------------+
| |
+-------v------+ +-------v------+
| PostgreSQL | | Neo4j |
| + pgvector | | (Knowledge |
| (Memories) | | Graph) |
+--------------+ +--------------+
mcp/
src/
index.ts # Main server with all tool definitions
dist/ # Compiled JavaScript
package.json
tsconfig.json
npm run build
The project uses TypeScript 5.6+ with ES modules.
| Type | Use Case | Example |
|---|---|---|
episodic |
Record what happened | "Fixed bug in payment endpoint by adding null check" |
semantic |
Store facts and knowledge | "The project uses PostgreSQL 15 with pgvector extension" |
procedural |
Document how-to procedures | "To deploy: 1) Run tests, 2) Build Docker image, 3) Push to registry" |
| Scope | Visibility | Use Case |
|---|---|---|
agent |
Only the storing agent | Personal learnings, agent-specific procedures |
project |
All agents in project | Shared documentation, project knowledge |
global |
All agents everywhere | Universal best practices |
working_memory_get at the start of every taskworking_memory_addstream_capture for learningsMIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"frinus-mcp-server": {
"command": "npx",
"args": []
}
}
}