whimsicality-mcp
Officialwhimsicality-mcp
Сервер MCP (Model Context Protocol), который даёт AI-агентам постоянную память — хранение контекста, фактов, планов, RAG-поиск, фрагменты кода и сжатие разговоров, которые сохраняются между сессиями и процессами.
Работает с любым MCP-совместимым агентом: Devin CLI, Claude Desktop, Cursor и другими.
Быстрый старт
# Install globally
npm install -g whimsicality-mcp
# Or run without installing
npx whimsicality-mcpЗатем добавьте его в конфигурацию MCP вашего агента:
{
"mcpServers": {
"whimsicality": {
"command": "npx",
"args": ["whimsicality-mcp"]
}
}
}Всё. Сервер работает из коробки с дисковым хранением — не требуется никаких нативных зависимостей. Данные хранятся в ~/.whimsicality/kernel-storage/.
Related MCP server: Memory MCP
Инструменты
Сервер предоставляет 14 инструментов, все с префиксом whim_:
Инструмент | Назначение |
| Постоянные слоты текстового контекста |
| Факты в формате «ключ-значение» (предпочтения пользователя, проектные решения) |
| Документы планов для долгосрочной работы |
| Индексация документов и семантический поиск |
| Переиспользуемые фрагменты кода |
| Сжатие истории разговора в сводки |
Как агенты должны это использовать
В начале сессии — восстановить состояние от предыдущих агентов:
1. whim_plan_get({}) → read the current plan
2. whim_facts_list({}) → list all facts
3. whim_facts_get({name: "..."}) → read relevant facts
4. whim_context_list({}) → list all context slots
5. whim_context_get({key: "..."}) → read relevant slotsВ процессе работы — сохранить состояние для следующего агента:
whim_plan_save({plan: "updated plan with progress and next steps"})
whim_facts_save({name: "new_fact", value: "..."})
whim_context_set({key: "what_i_learned", text: "..."})Бэкенды
Сервер поддерживает четыре способа найти ядро, которые пробуются по порядку:
1. Дисковый запасной вариант (по умолчанию, нулевая настройка)
Работает из коробки. Данные сохраняются в JSON-файл по пути ~/.whimsicality/kernel-storage/whim-mcp-store.json. Поиск по пересечению слов для RAG/фрагментов. Без нативных зависимостей.
2. Готовый бинарник ядра (самое простое обновление)
npm install @whimsicalitylabs/kernel-prebuiltГотовые бинарники для конкретных платформ распространяются через npm optionalDependencies. Сервер автоматически находит бинарник в node_modules.
Примечание: Готовые бинарники пока доступны не для всех платформ. См. kernel-prebuilt для статуса.
3. Указать на существующий бинарник
{
"mcpServers": {
"whimsicality": {
"command": "npx",
"args": ["whimsicality-mcp"],
"env": {
"WHIMSICALITY_KERNEL_BIN": "/path/to/whimsicality-kernel"
}
}
}
}4. Сборка из исходников
Клонируйте Rust workspace и соберите:
git clone https://github.com/WhimsicalityLabs/whimsicality-kernel.git
cd whimsicality-kernel
cargo build --releaseЗатем установите WHIMSICALITY_KERNEL_BIN в target/release/whimsicality-kernel.
Что добавляет ядро
Rust-ядро предоставляет:
Многоуровневое хранение: горячее (RAM) → тёплое (mmap) → холодное (zstd на диске) с автоматическим продвижением/понижением
Дедупликацию по содержимому: одинаковые значения разделяют хранилище через хеширование blake3
Безблокировочный горячий путь: DashMap для конкурентного чтения
Журнал сессий только для добавления: записи bincode с ветвлением/форкингом
Структурированную сборку контекста: именованные переменные, а не плоские потоки токенов
Когда ядро доступно, сервер двойной записи — и в ядро, и на диск. Это даёт быстрый доступ в рамках сессии от ядра плюс дисковое хранение для надёжности между сессиями (горячий уровень ядра — только RAM и теряется при выходе из процесса).
Конфигурация
Вся конфигурация через переменные окружения:
Переменная | По умолчанию | Описание |
|
| Корневая директория для всех хранимых данных |
| (автоопределение) | Путь к бинарнику Rust-ядра |
|
| Бюджет RAM для горячего уровня в МБ (только ядро) |
Разработка
git clone https://github.com/WhimsicalityLabs/Whimsicality-MCP.git
cd whimsicality-mcp
npm install
npm run build
node bin/whimsicality-mcp.jsЛицензия
MIT
Available Tools
14 toolswhim_compactA
Truncate conversation history to fit a token budget. Keeps first and last messages intact, truncates the middle. This is truncation, not summarization.
Inputs: messages (required), maxTokens.
whim_context_deleteB
Delete a context slot.
Inputs: key (required), namespace.
whim_context_getB
Retrieve text from a named context slot.
Inputs: key (required), namespace.
whim_context_listB
List all context slot keys.
Inputs: namespace.
whim_context_setA
Store text in a named context slot. Use for persistent memory that survives across agent sessions.
Inputs: key (required), text (required), namespace.
whim_facts_getC
Retrieve a named fact.
Inputs: name (required).
whim_facts_listC
List all saved fact names.
Inputs: no named parameters.
whim_facts_saveB
Save a named fact. Facts are key-value pairs that persist across sessions.
Inputs: name (required), value (required).
whim_plan_getC
Retrieve a saved plan.
Inputs: name.
whim_plan_saveA
Save a plan document. The plan persists across sessions and can be retrieved later by another agent.
Inputs: plan (required), name.
whim_rag_indexB
Index a document for keyword search retrieval.
Inputs: id (required), text (required).
whim_rag_searchB
Search indexed documents by keyword overlap. Returns relevant chunks ranked by word-boundary match score.
Inputs: query (required), topK.
whim_snippet_saveB
Save a reusable code snippet.
Inputs: code (required), name (required), language (required), description.
whim_snippet_searchB
Search saved snippets by keyword overlap.
Inputs: query (required), topK.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have distinct purposes: facts, context slots, RAG search, plans, snippets, and compaction each serve different needs. However, facts and context both act as persistent key-value stores, which could cause some confusion, though the descriptions clarify context as memory and facts as factual data.
The naming follows a consistent pattern of 'whim_<resource>_<action>' for most tools (e.g., whim_facts_get, whim_context_set, whim_rag_search). Minor exceptions include whim_compact, which lacks a resource category, and slight verb placement variations, but overall the pattern is predictable.
14 tools is a reasonable count for a multi-purpose memory and utility server. Each tool covers a distinct functional area, though some areas like facts and context could potentially be merged, but the count is within the well-scoped range and does not feel excessive.
The server covers core operations for facts, context, and RAG, but has notable gaps: no delete for facts, plans, or snippets; no list for plans or snippets; and no way to retrieve a snippet by name (only search). These missing operations may force agents to work around or leave orphaned data.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory for AI agents: save, search and connect context across tools and sessions.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.14-
- FlicenseNot gradedqualityDmaintenanceProvides persistent AI agent memory using a local vector database for long-term semantic storage and short-term session scratchpads. It enables low-latency memory operations including search, storage, and bulk management without external cloud dependencies.-
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory storage for AI agents with full-text search, tagging, and importance levels, enabling agents to store and retrieve memories efficiently.MIT
- AlicenseAqualityCmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.191MIT