MCP cover image
See in Github
2025-03-14

1

Github Watches

11

Github Forks

57

Github Stars

🧠 MCP - Titan Memory Server implementation

Colaboration between @jasonkneen and @ExpressionsBot

Follow us on X

An implementation inspired by Google Research's paper "Generative AI for Programming: A Common Task Framework". This server provides a neural memory system that can learn and predict sequences while maintaining state through a memory vector, following principles outlined in the research for improved code generation and understanding.

📚 Research Background

This implementation draws from the concepts presented in the Google Research paper (Muennighoff et al., 2024) which introduces a framework for evaluating and improving code generation models. The Titan Memory Server implements key concepts from the paper:

  • Memory-augmented sequence learning
  • Surprise metric for novelty detection
  • Manifold optimization for stable learning
  • State maintenance through memory vectors

These features align with the paper's goals of improving code understanding and generation through better memory and state management.

🚀 Features

  • Neural memory model with configurable dimensions
  • Sequence learning and prediction
  • Surprise metric calculation
  • Model persistence (save/load)
  • Memory state management
  • Full MCP tool integration

📦 Installation

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

🛠️ Available MCP Tools

1. 🎯 init_model

Initialize the Titan Memory model with custom configuration.

{
  inputDim?: number;  // Input dimension (default: 64)
  outputDim?: number; // Output/Memory dimension (default: 64)
}

2. 📚 train_step

Perform a single training step with current and next state vectors.

{
  x_t: number[];    // Current state vector
  x_next: number[]; // Next state vector
}

3. 🔄 forward_pass

Run a forward pass through the model with an input vector.

{
  x: number[]; // Input vector
}

4. 💾 save_model

Save the model to a specified path.

{
  path: string; // Path to save the model
}

5. 📂 load_model

Load the model from a specified path.

{
  path: string; // Path to load the model from
}

6. ℹ️ get_status

Get current model status and configuration.

{} // No parameters required

7. 🔄 train_sequence

Train the model on a sequence of vectors.

{
  sequence: number[][]; // Array of vectors to train on
}

🌟 Example Usage

// Initialize model
await callTool('init_model', { inputDim: 64, outputDim: 64 });

// Train on a sequence
const sequence = [
  [1, 0, 0, /* ... */],
  [0, 1, 0, /* ... */],
  [0, 0, 1, /* ... */]
];
await callTool('train_sequence', { sequence });

// Run forward pass
const result = await callTool('forward_pass', {
  x: [1, 0, 0, /* ... */]
});

🔧 Technical Details

  • Built with TensorFlow.js for efficient tensor operations
  • Uses manifold optimization for stable learning
  • Implements surprise metric for novelty detection
  • Memory management with proper tensor cleanup
  • Type-safe implementation with TypeScript
  • Comprehensive error handling

🧪 Testing

The project includes comprehensive tests covering:

  • Model initialization and configuration
  • Training and forward pass operations
  • Memory state management
  • Model persistence
  • Edge cases and error handling
  • Tensor cleanup and memory management

Run tests with:

npm test

🔍 Implementation Notes

  • All tensor operations are wrapped in tf.tidy() for proper memory management
  • Implements proper error handling with detailed error messages
  • Uses type-safe MCP tool definitions
  • Maintains memory state between operations
  • Handles floating-point precision issues with epsilon tolerance

📝 License

MIT License - feel free to use and modify as needed!

相关推荐

  • 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

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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

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

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

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

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

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

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

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

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

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

    Reviews

    3 (1)
    Avatar
    user_xHHE25AY
    2025-04-17

    The mcp-titan-cognitive-memory by Synthience is an exceptional tool for enhancing cognitive processes. Its stellar design and seamless integration have significantly boosted my memory and productivity. The user-friendly interface and comprehensive documentation make it accessible for both beginners and advanced users. Highly recommend checking it out!