Skip to content

Commit 27acb53

Browse files
jay-reynoldsclaude
andcommitted
refactor(migration): move migration tools to standalone script
Remove MCP migration tools due to MCP SDK 60-second timeout limitation (DEFAULT_REQUEST_TIMEOUT_MSEC = 60000 in protocol.ts). The timeout cannot be overridden via MCP_TOOL_TIMEOUT or --timeout flags due to SDK bugs. Changes: - Remove register_migration_tools() from MCP server - Enhance scripts/index_graphiti.py with: - Unified database name derivation (--code-path flag) - Deduplication via find_episode_by_chunk_id_async() - Checkpoint/resume support (--resume, --force flags) - Atomic checkpoint saves with fsync - Update docs/MEMORY.md with migration script usage The standalone script completes without timeout since it runs outside the MCP transport layer. See: modelcontextprotocol/typescript-sdk#245 Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent fe13190 commit 27acb53

3 files changed

Lines changed: 311 additions & 29 deletions

File tree

‎docs/MEMORY.md‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,12 +892,26 @@ The following MCP tools provide memory backend integration:
892892
| `watercooler_query_memory` | Query memory backend for facts/entities |
893893
| `watercooler_get_episodes` | Search Graphiti episodes |
894894

895-
#### Migration Tools
895+
#### Migration
896896

897-
| Tool | Description |
898-
|------|-------------|
899-
| `watercooler_migration_preflight` | Check migration prerequisites |
900-
| `watercooler_migrate_to_memory_backend` | Migrate entries to Graphiti/LeanRAG |
897+
Migration tools have been moved to a standalone script due to MCP SDK timeout limitations.
898+
Use `scripts/index_graphiti.py` to migrate threads to Graphiti:
899+
900+
```bash
901+
# Set required environment variables
902+
export LLM_API_KEY=sk-... # or "local" for local LLM
903+
export EMBEDDING_API_KEY=sk-... # or "local" for local embeddings
904+
export LLM_API_BASE=http://localhost:8081/v1 # optional, for local LLM
905+
export EMBEDDING_API_BASE=http://localhost:8080/v1 # optional, for local embeddings
906+
907+
# Migrate specific threads
908+
python scripts/index_graphiti.py --threads auth-feature api-design
909+
910+
# Or migrate from a list file
911+
python scripts/index_graphiti.py --thread-list threads-to-index.txt
912+
```
913+
914+
See [MCP SDK Issue #245](https://github.com/modelcontextprotocol/typescript-sdk/issues/245) for why migration was moved out of MCP.
901915

902916
### Search Routing
903917

0 commit comments

Comments
 (0)