MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

Memory Graph implementation for Model Context Protocol (MCP) with separate Python and TypeScript implementations

创建于 11/30/2024
更新于 over 1 year ago
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:

  1. 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
  }
}
  1. Infer types:
{
  "command": "infer",
  "parameters": {
    "id": "doc1",
    "attributes": {
      "title": "Project Report",
      "format": "pdf",
      "author": "John Doe"
    }
  }
}
  1. Get patterns:
{
  "command": "get_patterns",
  "parameters": {}
}

Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT