Skip to main content
Glama

MemOS-MCP

by qinshu1109
Apache 2.0
3
  • Linux
  • Apple
migrate_to_server.py1.44 kB
#!/usr/bin/env python3 """ 数据迁移脚本:从embedded模式迁移到服务器模式 """ import sys import json from pathlib import Path from qdrant_client import QdrantClient from qdrant_client.models import Distance, VectorParams, PointStruct def migrate_data(): """迁移数据""" print("🔄 开始数据迁移...") # 连接新的Qdrant服务器 client = QdrantClient(url="http://localhost:6333") # 创建统一集合 collection_name = "memos_unified" try: # 检查集合是否存在 collections = client.get_collections() collection_exists = any(c.name == collection_name for c in collections.collections) if not collection_exists: print(f"📝 创建集合: {collection_name}") client.create_collection( collection_name=collection_name, vectors_config=VectorParams(size=768, distance=Distance.COSINE) ) else: print(f"✅ 集合已存在: {collection_name}") print("🎉 数据迁移准备完成!") print("📋 下一步:") print("1. 启动新的MemOS CLI") print("2. 重新添加重要记忆") print("3. 验证CLI和MCP可以同时运行") except Exception as e: print(f"❌ 迁移失败: {e}") return False return True if __name__ == "__main__": migrate_data()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qinshu1109/memos-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server