MCP cover image
See in Github
2025-03-20

该工具是一种尖端的内存引擎,可将实时学习,持续的三层上下文意识以及无缝的插件N-Play LLM集成融合,​​以连续发展和丰富您的AI智能。

3

Github Watches

6

Github Forks

47

Github Stars

Titan Memory MCP Server

I'm aware its broken right now, I'll fix it! Ideally this just runs in yolo mode in cursor (or claude desktop) without human intervention and creates a "brain" available independent of LLM version.

A neural memory system for LLMs that can learn and predict sequences while maintaining state through a memory vector. This MCP (Model Context Protocol) server provides tools for Claude 3.7 Sonnet and other LLMs to maintain memory state across interactions.

Features

  • Perfect for Cursor: Now that Cursor automatically runs MCP in yolo mode, you can take your hands off the wheel with your LLM's new memory
  • Neural Memory Architecture: Transformer-based memory system that can learn and predict sequences
  • Memory Management: Efficient tensor operations with automatic memory cleanup
  • MCP Integration: Fully compatible with Cursor and other MCP clients
  • Text Encoding: Convert text inputs to tensor representations
  • Memory Persistence: Save and load memory states between sessions

Installation

# Clone the repository
git clone https://github.com/yourusername/titan-memory.git
cd titan-memory

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

Available Tools

The Titan Memory MCP server provides the following tools:

help

Get help about available tools.

Parameters:

  • tool (optional): Specific tool name to get help for
  • category (optional): Category of tools to explore
  • showExamples (optional): Include usage examples
  • verbose (optional): Include detailed descriptions

init_model

Initialize the Titan Memory model with custom configuration.

Parameters:

  • inputDim: Input dimension size (default: 768)
  • hiddenDim: Hidden dimension size (default: 512)
  • memoryDim: Memory dimension size (default: 1024)
  • transformerLayers: Number of transformer layers (default: 6)
  • numHeads: Number of attention heads (default: 8)
  • ffDimension: Feed-forward dimension (default: 2048)
  • dropoutRate: Dropout rate (default: 0.1)
  • maxSequenceLength: Maximum sequence length (default: 512)
  • memorySlots: Number of memory slots (default: 5000)
  • similarityThreshold: Similarity threshold (default: 0.65)
  • surpriseDecay: Surprise decay rate (default: 0.9)
  • pruningInterval: Pruning interval (default: 1000)
  • gradientClip: Gradient clipping value (default: 1.0)

forward_pass

Perform a forward pass through the model to get predictions.

Parameters:

  • x: Input vector or text
  • memoryState (optional): Memory state to use

train_step

Execute a training step to update the model.

Parameters:

  • x_t: Current input vector or text
  • x_next: Next input vector or text

get_memory_state

Get the current memory state and statistics.

Parameters:

  • type (optional): Optional memory type filter

manifold_step

Update memory along a manifold direction.

Parameters:

  • base: Base memory state
  • velocity: Update direction

prune_memory

Remove less relevant memories to free up space.

Parameters:

  • threshold: Pruning threshold (0-1)

save_checkpoint

Save memory state to a file.

Parameters:

  • path: Checkpoint file path

load_checkpoint

Load memory state from a file.

Parameters:

  • path: Checkpoint file path

reset_gradients

Reset accumulated gradients to recover from training issues.

Parameters: None

Usage with Claude 3.7 Sonnet in Cursor

The Titan Memory MCP server is designed to work seamlessly with Claude 3.7 Sonnet in Cursor. Here's an example of how to use it:

// Initialize the model
const result = await callTool("init_model", {
  inputDim: 768,
  memorySlots: 10000,
  transformerLayers: 8,
});

// Perform a forward pass
const { predicted, memoryUpdate } = await callTool("forward_pass", {
  x: "const x = 5;", // or vector: [0.1, 0.2, ...]
  memoryState: currentMemory,
});

// Train the model
const result = await callTool("train_step", {
  x_t: "function hello() {",
  x_next: "  console.log('world');",
});

// Get memory state
const state = await callTool("get_memory_state", {});

Memory Management

The Titan Memory MCP server includes sophisticated memory management to prevent memory leaks and ensure efficient tensor operations:

  1. Automatic Cleanup: Periodically cleans up unused tensors
  2. Memory Encryption: Securely stores memory states
  3. Tensor Validation: Ensures tensors have the correct shape
  4. Error Recovery: Handles tensor errors gracefully

Architecture

The Titan Memory MCP server is built with a modular architecture:

  • TitanMemoryServer: Main server class that registers tools and handles requests
  • TitanMemoryModel: Neural memory model implementation
  • VectorProcessor: Handles input processing and text encoding
  • MemoryManager: Manages tensor operations and memory cleanup

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • metorial
  • 数百个MCP服务器的容器化版本📡📡

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • langgenius
  • Reviews

    2 (1)
    Avatar
    user_vUQJOp2u
    2025-04-18

    As an avid user of mcp applications, I can confidently say that mcp-titan by henryhawke is a game-changer. This tool is incredibly efficient and user-friendly. The seamless integration and powerful features make it a must-have for any developer looking to streamline their workflow. Highly recommended! Check it out at https://github.com/henryhawke/mcp-titan.