M
MCP Memory Graph
Memory Graph implementation for Model Context Protocol (MCP) with separate Python and TypeScript implementations
创建于 11/30/2024
更新于 over 1 year ago
README
Repository documentation and setup instructions
MCP Memory Graph
A Model Context Protocol (MCP) implementation of the Memory Graph system for Claude Desktop, available in both Python and TypeScript.
Overview
This project provides a semantic layer that enhances Claude Desktop's memory capabilities with pattern matching and type inference. It allows Claude to understand and categorize different types of documents and data structures based on their attributes.
Features
- Real-time type inference with confidence scoring
- Pattern matching with attribute validation
- SQLite-based pattern storage
- Available in both Python and TypeScript
- Full MCP integration for Claude Desktop
Quick Start
Python Implementation
pip install mcp-memory-graph
from mcp_memory_graph import MemoryGraphMCP
from mcp_core import register_tool
# Initialize the tool
memory_graph = MemoryGraphMCP()
# Register with Claude Desktop
register_tool('memory_graph', memory_graph)
TypeScript Implementation
npm install mcp-memory-graph-ts
import { MemoryGraphMCP } from 'mcp-memory-graph-ts';
import { registerTool } from 'mcp-core';
// Initialize the tool
const memoryGraph = new MemoryGraphMCP();
// Register with Claude Desktop
registerTool('memory_graph', memoryGraph);
Usage in Claude Desktop
Once registered, you can use the memory_graph tool with the following commands:
- Add a pattern:
{
"command": "add_pattern",
"parameters": {
"name": "pdf_document",
"required_attributes": {
"format": "string",
"title": "string"
},
"optional_attributes": {
"author": "string",
"pages": "number"
},
"confidence_threshold": 0.7
}
}
- Infer types:
{
"command": "infer",
"parameters": {
"id": "doc1",
"attributes": {
"title": "Project Report",
"format": "pdf",
"author": "John Doe"
}
}
}
- Get patterns:
{
"command": "get_patterns",
"parameters": {}
}
Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
快速设置
此服务器的安装指南
安装包 (如果需要)
npx mcp-memory-graph
Cursor 配置 (mcp.json)
{
"mcpServers": {
"dmontgomery40-mcp-memory-graph": {
"command": "npx",
"args": [
"mcp-memory-graph"
]
}
}
}
作者服务器
其他服务器由 DMontgomery40