Frinus MCP Server
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.
README
Frinus MCP Server
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.
Overview
The MCP Memory Server acts as a bridge between Claude agents and the Memory Service REST API. It enables agents to:
- Store and retrieve memories (episodic, semantic, procedural)
- Search memories using semantic similarity
- Manage working memory for session context
- Capture interactions to the memory stream for learning
- Register agents and projects in the knowledge graph
Requirements
- Node.js 18+
- Memory Service running at
http://localhost:8001(configurable viaMEMORY_SERVICE_URL)
Installation
npm install
npm run build
Usage
Running the Server
# Development mode
npm run dev
# Production mode
npm run build
npm start
Environment Variables
| 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 |
Claude Desktop Configuration
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"
}
}
}
}
Tools Reference
Memory Tools
1. memory_store
Store 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"
}
2. memory_search
Search 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
}
3. memory_get_context
Get 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
}
4. memory_list
List 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 Tools
5. graph_register_agent
Register 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"
}
6. graph_register_project
Register 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"
}
7. graph_assign_agent_project
Assign 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 Tools
Working memory provides short-term context persistence during sessions. It follows Miller's Law (7 items max) and auto-evicts older items.
8. working_memory_get
Get 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 memory
Example:
{
"context_id": "agent:ffffffff-ffff-ffff-ffff-ffffffffffff"
}
9. working_memory_add
Add 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
}
10. working_memory_clear
Clear 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"
}
Stream Tools
The memory stream captures all interactions for continuous learning. Important items are periodically promoted to long-term memory.
11. stream_capture
Capture 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/decision
Example:
{
"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
}
12. stream_stats
Get 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 score
Example:
{}
User Authentication Tools
13. user_login
Login/identify user for personalized memories.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | User email address |
username |
string | No | Optional username/alias |
Example:
{
"email": "igor.tavares@monetizze.com.br",
"username": "igor"
}
Response:
Logged in as igor.tavares@monetizze.com.br. Found 3 personal memories.
14. user_get_context
Get 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:
- User memories (scope: user)
- Project memories (scope: project)
- Combined context
Architecture
+------------------+ +-------------------+ +------------------+
| Claude Agent | <---> | MCP Memory | <---> | Memory Service |
| (via MCP) | | Server (stdio) | | (REST API) |
+------------------+ +-------------------+ +------------------+
|
+-------------------------+
| |
+-------v------+ +-------v------+
| PostgreSQL | | Neo4j |
| + pgvector | | (Knowledge |
| (Memories) | | Graph) |
+--------------+ +--------------+
Development
Project Structure
mcp/
src/
index.ts # Main server with all tool definitions
dist/ # Compiled JavaScript
package.json
tsconfig.json
Building
npm run build
Type Checking
The project uses TypeScript 5.6+ with ES modules.
Memory Types Explained
| 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 Levels
| 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 |
Best Practices
- Always read working memory first: Call
working_memory_getat the start of every task - Update working memory when done: Save progress with
working_memory_add - Capture important interactions: Use
stream_capturefor learnings - Use appropriate memory types: Match content to episodic/semantic/procedural
- Set importance scores: Higher scores (0.7+) for critical information
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。