moontmsai/my-memory-mcp
If you are the rightful owner of my-memory-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Personal Memory MCP Server is designed to enhance AI interactions by enabling memory retention and understanding of user-specific information, allowing for more personalized and meaningful conversations.
Personal Memory MCP Server
Tired of AI conversations that restart from scratch every time? This system enables AI to truly remember and understand you. Your personality, preferences, relationships, and important experiences are naturally remembered by AI, allowing for deep and personal communication like a longtime friend or partner in every conversation. Go beyond simple Q&A and create a genuine AI experience based on real relationships and understanding.
Features
- Entity-based data organization (Person, Company, Project, etc.)
- Observation tracking with importance scoring
- Relationship mapping between entities
- Search and summary capabilities
- TypeScript implementation with SQLite database
Installation
1. Install the MCP Server
# Clone repository
git clone https://github.com/moontmsai/my-memory-mcp.git
cd my-memory-mcp
# Install dependencies
npm install
# Build
npm run build
# Start server
npm start
2. Configure Claude Desktop
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"my-memory": {
"command": "node",
"args": ["path/to/my-memory-mcp/dist/index.js"],
"env": {
"DATABASE_PATH": "path/to/my-memory-mcp/data/my-memory.sqlite"
}
}
}
}
3. Configure Cursor AI
Add this to your Cursor AI settings:
- Open Cursor AI Settings
- Go to "Tools & Intergrations" β "MCP Tools"
- Add new MCP server:
{
"mcpServers": {
"my-memory": {
"command": "node",
"args": ["path/to/my-memory-mcp/dist/index.js"],
"env": {
"DATABASE_PATH": "path/to/my-memory-mcp/data/my-memory.sqlite"
}
}
}
}
Note: Replace path/to/my-memory-mcp
with the actual path to your installation directory.
Development
# Development mode with auto-restart
npm run dev
# Type checking
npm run type-check
# Clean build
npm run clean
API Tools
my-memory:create
Create entities, observations, or relations.
Parameters:
type
: "entity" | "observation" | "relation"entityType
: Entity type (for entities)name
: Entity name (for entities)entityId
: Target entity ID (for observations)value
: Observation content (for observations)sourceEntityId
: Source entity ID (for relations)targetEntityId
: Target entity ID (for relations)importanceScore
: Importance score (0-100)notes
: Additional notesproperties
: Relation properties (JSON object)
my-memory:get
Retrieve entities, observations, or relations.
Parameters:
type
: "entity" | "observation" | "relation"entityType
: Filter by entity typeentityId
: Filter by specific entitysourceEntityId
: Filter by source entity (relations)minImportance
: Minimum importance scoreincludeDetails
: Include detailed information
my-memory:search
Search and summarize memory data.
Parameters:
mode
: "summary" | "importance"entityId
: Entity to summarize (summary mode)minScore
: Minimum importance score (importance mode)type
: Filter by data typeincludeDetails
: Include detailed information
my-memory:update
Update existing entities, observations, or relations.
Parameters:
type
: "entity" | "observation" | "relation"id
: ID of item to updatedata
: Updated data fields
my-memory:delete
Delete entities, observations, or relations.
Parameters:
type
: "entity" | "observation" | "relation"id
: ID of item to deleteentityId
: Delete all items for specific entitycascade
: Delete related dataminImportance
: Minimum importance for deletionmaxImportance
: Maximum importance for deletion
Data Structure
Entity
- Represents people, companies, projects, concepts, etc.
- Has type, name, and importance score
- Can have multiple observations and relations
Observation
- Specific information about an entity
- Includes type, value, importance score, and notes
- Timestamped for tracking changes
Relation
- Connection between two entities
- Has type and optional properties
- Supports complex relationship modeling
Usage Examples
// Create a person entity
my-memory:create({
type: "entity",
entityType: "Person",
name: "John Doe",
importanceScore: 80
})
// Add observation about the person
my-memory:create({
type: "observation",
entityId: "entity_id",
value: "Prefers direct communication",
importanceScore: 85,
notes: "Important for work interactions"
})
// Create relationship
my-memory:create({
type: "relation",
sourceEntityId: "person_id",
targetEntityId: "company_id",
properties: { role: "developer", startDate: "2025-01-01" }
})
// Search by importance
my-memory:search({
mode: "importance",
minScore: 80,
includeDetails: true
})
// Get entity summary
my-memory:search({
mode: "summary",
entityId: "entity_id"
})
Recommended User Preferences
For optimal use with AI assistants, add this configuration to your user preferences:
0. Session initialization (execute only once at session start):
- Query relationships with importance score 80+ using includeDetails=true from my-memory MCP
- Additionally query observations with importance score 80+ for relevant entities
- Do not brief the retrieved personal memories
1. Continuous operation during conversations:
- Record new personal information in my-memory MCP when discovered
- Judge importance score (0-100 points) for all responses
- Base judgments only on existing memories without repeated queries
2. Personal information collection (personal information only):
- Basic identity (age, gender, location, occupation, education, health status, etc.)
- Behavioral patterns (interests, habits, hobbies, personality traits, etc.)
- Preferences (communication style, preferred language, style, values, etc.)
- Long-term goals (life goals, long-term plans, personal aspirations, etc.)
- Relationships (family, friends, romantic partners, colleagues, etc.)
3. my-memory MCP memory updates:
- Entity creation (with importance scores): Important people, organizations, places, concepts
- Relationship connections: Establish relations with existing entities
- Observation storage: Record personal characteristics and facts as observations
4. What NOT to record in my-memory MCP:
- Specific work details (coding specifics, particular task progress, etc.)
- Temporary work memory (today's tasks, temporary notes, etc.)
- Technical details (configuration values, code snippets, error messages, etc.)
5. Additional operational principles for my-memory MCP:
- Set importance scores based on personal significance and long-term relevance
- Record relationship information with high importance
- Carefully record personal tendencies and values
- Record work-related information only at company name, position, colleague name level
License
MIT License
β Support My Work
If you find this project helpful or interesting, consider buying me a coffee!
Your support helps me maintain and improve this open source work.
κ°μΈ κΈ°μ΅ MCP μλ²
AIμμ λνκ° λ§€λ² μ²μλΆν° λ€μ μμλλ κ²μ΄ μμ¬μ°μ ¨λμ? μ΄ μμ€ν μ AIκ° λΉμ μ μ§μ§λ‘ κΈ°μ΅νκ³ μ΄ν΄ν μ μκ² ν΄μ€λλ€. λΉμ μ μ±κ²©, μ·¨ν₯, μΈκ°κ΄κ³, μ€μν κ²½νλ€μ AIκ° μμ°μ€λ½κ² κΈ°μ΅νλ©°, λνν λλ§λ€ λ§μΉ μ€λ μΉκ΅¬λ μ°μΈμ²λΌ κΉμ΄ μκ³ κ°μΈμ μΈ μν΅μ΄ κ°λ₯ν΄μ§λλ€. λ¨μν μ§λ΅μ λμ΄μ, μ§μ ν κ΄κ³μ μ΄ν΄λ₯Ό λ°νμΌλ‘ ν AI κ²½νμ λ§λ€μ΄λ³΄μΈμ.
μ£Όμ κΈ°λ₯
- μν°ν° κΈ°λ° λ°μ΄ν° ꡬ쑰 (μ¬λ, νμ¬, νλ‘μ νΈ λ±)
- μ€μλ μ μλ₯Ό ν΅ν κ΄μ°° μΆμ
- μν°ν° κ° κ΄κ³ λ§€ν
- κ²μ λ° μμ½ κΈ°λ₯
- TypeScript ꡬν λ° SQLite λ°μ΄ν°λ² μ΄μ€
μ€μΉ
1. MCP μλ² μ€μΉ
# μ μ₯μ 볡μ
git clone https://github.com/moontmsai/my-memory-mcp.git
cd my-memory-mcp
# μμ‘΄μ± μ€μΉ
npm install
# λΉλ
npm run build
# μλ² μμ
npm start
2. Claude Desktop μ€μ
Claude Desktop μ€μ νμΌμ λ€μ ꡬμ±μ μΆκ°νμΈμ:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"my-memory": {
"command": "node",
"args": ["path/to/my-memory-mcp/dist/index.js"],
"env": {
"DATABASE_PATH": "path/to/my-memory-mcp/data/my-memory.sqlite"
}
}
}
}
3. Cursor AI μ€μ
Cursor AI μ€μ μ λ€μμ μΆκ°νμΈμ:
- Cursor AI μ€μ μ΄κΈ°
- Go to "Tools & Intergrations" β "MCP Tools"
- Add new MCP server:
{
"mcpServers": {
"my-memory": {
"command": "node",
"args": ["path/to/my-memory-mcp/dist/index.js"],
"env": {
"DATABASE_PATH": "path/to/my-memory-mcp/data/my-memory.sqlite"
}
}
}
}
μ°Έκ³ : path/to/my-memory-mcp
λ₯Ό μ€μ μ€μΉ λλ ν 리 κ²½λ‘λ‘ λ³κ²½νμΈμ.
κ°λ°
# κ°λ° λͺ¨λ (μλ μ¬μμ)
npm run dev
# νμ
체ν¬
npm run type-check
# λΉλ μ 리
npm run clean
API λꡬ
my-memory:create
μν°ν°, κ΄μ°°, κ΄κ³λ₯Ό μμ±ν©λλ€.
λ§€κ°λ³μ:
type
: "entity" | "observation" | "relation"entityType
: μν°ν° μ ν (μν°ν°μ©)name
: μν°ν° μ΄λ¦ (μν°ν°μ©)entityId
: λμ μν°ν° ID (κ΄μ°°μ©)value
: κ΄μ°° λ΄μ© (κ΄μ°°μ©)sourceEntityId
: μμ€ μν°ν° ID (κ΄κ³μ©)targetEntityId
: νκ² μν°ν° ID (κ΄κ³μ©)importanceScore
: μ€μλ μ μ (0-100)notes
: μΆκ° λ©λͺ¨properties
: κ΄κ³ μμ± (JSON κ°μ²΄)
my-memory:get
μν°ν°, κ΄μ°°, κ΄κ³λ₯Ό μ‘°νν©λλ€.
λ§€κ°λ³μ:
type
: "entity" | "observation" | "relation"entityType
: μν°ν° μ νλ³ νν°entityId
: νΉμ μν°ν°λ³ νν°sourceEntityId
: μμ€ μν°ν°λ³ νν° (κ΄κ³μ©)minImportance
: μ΅μ μ€μλ μ μincludeDetails
: μμΈ μ 보 ν¬ν¨
my-memory:search
λ©λͺ¨λ¦¬ λ°μ΄ν°λ₯Ό κ²μνκ³ μμ½ν©λλ€.
λ§€κ°λ³μ:
mode
: "summary" | "importance"entityId
: μμ½ν μν°ν° (μμ½ λͺ¨λ)minScore
: μ΅μ μ€μλ μ μ (μ€μλ λͺ¨λ)type
: λ°μ΄ν° μ νλ³ νν°includeDetails
: μμΈ μ 보 ν¬ν¨
my-memory:update
κΈ°μ‘΄ μν°ν°, κ΄μ°°, κ΄κ³λ₯Ό μμ ν©λλ€.
λ§€κ°λ³μ:
type
: "entity" | "observation" | "relation"id
: μμ ν νλͺ© IDdata
: μμ ν λ°μ΄ν° νλ
my-memory:delete
μν°ν°, κ΄μ°°, κ΄κ³λ₯Ό μμ ν©λλ€.
λ§€κ°λ³μ:
type
: "entity" | "observation" | "relation"id
: μμ ν νλͺ© IDentityId
: νΉμ μν°ν°μ λͺ¨λ νλͺ© μμ cascade
: κ΄λ ¨ λ°μ΄ν° ν¨κ» μμ minImportance
: μμ ν μ΅μ μ€μλmaxImportance
: μμ ν μ΅λ μ€μλ
λ°μ΄ν° ꡬ쑰
μν°ν°
- μ¬λ, νμ¬, νλ‘μ νΈ, κ°λ λ±μ λνλ
- μ ν, μ΄λ¦, μ€μλ μ μλ₯Ό κ°μ§
- μ¬λ¬ κ΄μ°°κ³Ό κ΄κ³λ₯Ό κ°μ§ μ μμ
κ΄μ°°
- μν°ν°μ λν ꡬ체μ μ 보
- μ ν, λ΄μ©, μ€μλ μ μ, λ©λͺ¨ ν¬ν¨
- λ³κ²½ μΆμ μ μν νμμ€ν¬ν
κ΄κ³
- λ μν°ν° κ°μ μ°κ²°
- μ νκ³Ό μ νμ μμ±μ κ°μ§
- 볡μ‘ν κ΄κ³ λͺ¨λΈλ§ μ§μ
μ¬μ© μμ
// μ¬λ μν°ν° μμ±
my-memory:create({
type: "entity",
entityType: "Person",
name: "νκΈΈλ",
importanceScore: 80
})
// μ¬λμ λν κ΄μ°° μΆκ°
my-memory:create({
type: "observation",
entityId: "entity_id",
value: "μ§μ€μ μΈ μν΅μ μ νΈν¨",
importanceScore: 85,
notes: "μ
무 μνΈμμ©μ μ€μ"
})
// κ΄κ³ μμ±
my-memory:create({
type: "relation",
sourceEntityId: "person_id",
targetEntityId: "company_id",
properties: { role: "κ°λ°μ", startDate: "2025-01-01" }
})
// μ€μλλ³ κ²μ
my-memory:search({
mode: "importance",
minScore: 80,
includeDetails: true
})
// μν°ν° μμ½
my-memory:search({
mode: "summary",
entityId: "entity_id"
})
κΆμ₯ μ¬μ©μ μ€μ
AI μ΄μμ€ν΄νΈμ μ΅μ μΌλ‘ μ¬μ©νλ €λ©΄ μ¬μ©μ μ€μ μ λ€μ ꡬμ±μ μΆκ°νμΈμ:
0. μΈμ
μ΄κΈ°ν (μΈμ
μμ μ 1νλ§ μ€ν):
- my-memory MCPμμ μ€μλ 80μ μ΄μμ κ΄κ³λ₯Ό includeDetails=trueλ‘ μ‘°ν
- μΆκ°λ‘ ν΄λΉ μν°ν°μ μ€μλ 80μ μ΄μμ κ΄μ°°λ ν¨κ» μ‘°ν
- μ‘°νν κ°μΈμ μΈ κΈ°μ΅μ λΈλ¦¬ννμ§ μμ
1. λν μ€ μ§μμ μ΄μ:
- μλ‘μ΄ κ°μΈ μ 보 λ°κ²¬ μ my-memory MCPμ κΈ°λ‘
- λͺ¨λ μλ΅μ λν΄ μ€μλ μ μ(0-100μ ) νλ¨
- κΈ°μ‘΄ κΈ°μ΅λ§μ κΈ°λ°μΌλ‘ νλ¨νκ³ λ°λ³΅ μ‘°ννμ§ μμ
2. κ°μΈ μ 보 μμ§ (κ°μΈμ μ 보λ§):
- κΈ°λ³Έ μ μ²΄μ± (λμ΄, μ±λ³, μμΉ, μ§μ
, νλ ₯, 건κ°μν λ±)
- νλ ν¨ν΄ (κ΄μ¬μ¬, μ΅κ΄, μ·¨λ―Έ, μ±κ²© νΉμ± λ±)
- μ νΈλ (μν΅ λ°©μ, μ νΈ μΈμ΄, μ€νμΌ, κ°μΉκ΄ λ±)
- μ₯κΈ°μ λͺ©ν (μΈμ λͺ©ν, μ₯κΈ° κ³ν, κ°μΈμ μ΄λ§ λ±)
- κ΄κ³ (κ°μ‘±, μΉκ΅¬, μ°μΈ, νμ¬ λλ£ λ±)
3. my-memory MCP κΈ°μ΅ μ
λ°μ΄νΈ:
- μν°ν° μμ± (μ€μλ μ μ λΆμ¬): μ€μν μ¬λ, μ‘°μ§, μ₯μ, κ°λ
- κ΄κ³ μ°κ²°: κΈ°μ‘΄ μν°ν°λ€κ³Ό κ΄κ³ μ€μ
- κ΄μ°° μ μ₯: κ°μΈμ νΉμ±κ³Ό μ¬μ€λ€μ κ΄μ°°λ‘ κΈ°λ‘
4. my-memory MCPμ κΈ°λ‘νμ§ μλ κ²λ€:
- ꡬ체μ μΈ μμ
λ΄μ© (μ½λ© μΈλΆμ¬ν, νΉμ μ
무 μ§νμν© λ±)
- μΌμμ μΈ μμ
κΈ°μ΅ (μ€λ ν΄μΌ ν μΌ, μμ λ©λͺ¨ λ±)
- κΈ°μ μ μΈλΆμ¬ν (μ€μ κ°, μ½λ μ‘°κ°, μλ¬ λ©μμ§ λ±)
5. my-memory MCP μΆκ° μ΄μ© μμΉ:
- μ€μλ μ μλ κ°μΈμ μ€μμ±κ³Ό μ₯κΈ°μ κ΄λ ¨μ±μ κΈ°μ€μΌλ‘ μ€μ
- μ¬λκ³Όμ κ΄κ³ μ 보λ λμ μ€μλλ‘ κΈ°λ‘
- κ°μΈμ μ±ν₯μ΄λ κ°μΉκ΄μ μ μ€νκ² κΈ°λ‘
- μμ
κ΄λ ¨ μ 보λ νμ¬λͺ
, μ§μ±
, λλ£ μ΄λ¦ μμ€λ§ κΈ°λ‘
λΌμ΄μ μ€
MIT λΌμ΄μ μ€
β νμνκΈ°
μ΄ νλ‘μ νΈκ° λμμ΄ λμ
¨λ€λ©΄, μ»€νΌ ν μμΌλ‘ μμν΄μ£ΌμΈμ: https://coff.ee/moontmsai
μ¬λ¬λΆμ νμμ΄ μ§μμ μΈ μ€νμμ€ κ°λ°μ ν° νμ΄ λ©λλ€.