Sponsored by Deepsite.site

Memory server for AI Chat with MCP interface

Created By
Gelembjuk8 months ago
This is the MCP server with memory interface. It can be used with an AI Chat tool as a memory service
Content

Memory server for AI Chat with MCP interface

This is an example of the memory server for AI chat. It follows the interface supported by the tool CleverChatty.

The interface for the MCP server is:

{
    "tools": [
    {
      "name": "remember",
      "description": "Remember a chat message to extract a context later for the memory",
      "inputSchema": {
        "properties": {
          "role": { "type": "string" },
          "message": { "type": "string" }
        },
        "required": ["role", "message"]
      }
    },
    {
      "name": "recall",
      "description": "Returns the summary of the previous conversations",
      "inputSchema": {
        "properties": {
        },
        "required": []
      }
    }
    ]
}

This tool can be used together with the CleverChatty CLI to create an AI chat with memory. The server will remember the messages and return the summary of the previous conversations when requested.

How to run the server

  1. Clone the repository
git clone git@github.com:Gelembjuk/cleverchatty-memory.git
cd cleverchatty-memory
  1. Install uv if not already installed
curl -Ls https://astral.sh/uv/install.sh | sh
  1. Create the virtual environment
uv venv
  1. Activate the virtual environment on Linux/macOS (can be different on other platforms)
source .venv/bin/activate
  1. Install the dependencies
uv sync
  1. Run the server
fastapi run mcp_server.py --port 8001

This will start the MCP server with SSE transport on port 8001. You can change the port by modifying the --port argument. It will be accessible by the URL http://localhost:8001/mcp. You can also use the --host argument to change the host. By default, it will be accessible only from localhost. You can change it to --host 0.0.0.0 to make it accessible from any IP address.

Test ad debug

This tool contains also the CLI to test the server.

python manager.py COMMAND

Examples:

python manager.py clear-memory
python manager.py remember "user" "Some message from user"
python manager.py remember "assistant" "Some response from assistant"
python manager.py patch-memories
python manager.py recall
python manager.py history-dump
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.