Логотип Sharedcontext

Sharedcontext

Спільнота
Eversmile12

MCP server that gives AI coding assistants persistent cross-client memory. Facts and conversations stored in SQLite, encrypted with AES-256-GCM, synced to Arweave. No server, no account, recoverable with a 12-word phrase.

ВидавецьEversmile12
Репозиторійsharedcontext
МоваTypeScript
Форки
9
Зірки
50
Доступні інструменти
0
Тип транспортуstdio
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    Sharedcontext надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 50, форки: 9 — у пов’язаному репозиторії.


What Is It

SharedContext is a local-first memory layer for LLM agents. It gives Cursor, Claude Code, and Codex persistent memory that you own, synced to Arweave so it follows you across sessions and machines.

Your AI assistant forgets everything the moment a session ends. Project decisions, coding preferences, architectural context — all gone. You re-explain the same things every day.

SharedContext fixes that. It runs as an MCP server that your AI client connects to. Agents store and recall facts through MCP tools. A background watcher syncs your conversation history. Everything is encrypted client-side and uploaded to Arweave. Restore it all on a new machine with a 12-word recovery phrase.

Why Shared Context

Your AI memory is fragmented:

  • Cursor stores transcripts in ~/.cursor/projects/
  • Claude Code stores sessions in ~/.claude/projects/
  • Codex has its own isolated context

None of them talk to each other. None of them persist structured knowledge. None of them let you move to a new machine and pick up where you left off.

SharedContext collapses all of that into one encrypted, portable layer that every client reads from and writes to. One memory. One identity. One place to look.

What It Does

CapabilityDescription
Fact memoryAgents store and recall structured facts (preferences, decisions, architecture) across sessions
Conversation recallRetrieve past conversations from any client — "continue the discussion about auth"
Encrypted syncAll data is encrypted locally with AES-256-GCM before leaving your machine
Arweave persistenceEncrypted blobs are uploaded to Arweave for permanent, censorship-resistant storage
Cross-machine restore12-word recovery phrase reconstructs your entire context on any machine
Conversation sharingShare a specific conversation via encrypted link — recipient imports with one command
Auto-setupDetects installed AI clients and configures MCP automatically on init

What It Is Now

SharedContext is early (v0.1.x). It works, it's tested, but it's not battle-hardened yet.

Supported clients: Cursor, Claude Desktop, Claude CLI, Codex

Current limitations:

  • Ranking is heuristic/keyword-based, not semantic vector search
  • Single-user only — no collaborative memory
  • Not a hosted service — you run everything locally

How It Works

Identity

A 12-word recovery phrase deterministically derives a secp256k1 keypair. The phrase + a random salt derive an AES encryption key via Argon2id. The private key is stored encrypted at ~/.sharedcontext/identity.enc. The phrase is stored in the OS keychain for background MCP access.

Local Storage

SQLite is the runtime store. Three tables:

  • facts — structured memory (key/value with tags, scope, confidence)
  • pending_deletes — tombstones queued for remote sync
  • meta — version cursors, offsets, sync state

All reads are local. Fast and offline-capable.

Fact Sync

  1. New or updated facts are written to SQLite with dirty=1
  2. Background loop collects dirty facts + pending deletes
  3. Changes are converted into shard operations (upsert / delete)
  4. Operations are chunked to keep payload size bounded
  5. Each shard is encrypted (AES-256-GCM) and signed (secp256k1)
  6. Encrypted blob is uploaded to Arweave with index tags
  7. On success, dirty flags are cleared and version cursors advance

Conversation Sync

  1. Watcher polls ~/.cursor/projects/ and ~/.claude/projects/ for changes
  2. Each file uses a saved offset from SQLite meta
  3. Only new messages since last offset are extracted
  4. Segments are encrypted, chunked, signed, and uploaded
  5. Offset advances after successful upload

Delta-only uploads keep network writes small.

Restore

  1. User provides recovery phrase via init --existing
  2. Identity is re-derived and Arweave is queried by wallet address
  3. Encrypted identity material is fetched and validated
  4. Shard history is downloaded, signatures verified, then decrypted
  5. Valid shards are replayed by version into a fresh SQLite database
  6. Local identity files are persisted for normal operation

Malformed, unsigned, or bad-signature payloads are skipped.

Quick Start

Install

bash
npm install -g ai-sharedcontext

Initialize

bash
sharedcontext init

This generates a 12-word recovery phrase, derives your identity, creates ~/.sharedcontext/, and auto-configures any detected AI clients (Cursor, Claude, Codex).

Write down the recovery phrase. It's the only way to restore your context.

Use It

Once initialized, your AI client connects to SharedContext automatically via MCP. No extra steps.

Storing facts — the agent calls store_fact when you express preferences or make decisions:

You: "We're using Drizzle ORM with PostgreSQL for this project"

→ Agent stores:  key=project:database:orm  value="Drizzle ORM with PostgreSQL"  tags=["database","orm","drizzle"]

Recalling context — the agent calls recall_context to retrieve relevant facts:

You: "What database setup are we using?"

→ Agent recalls: project:database:orm → "Drizzle ORM with PostgreSQL"

Recalling conversations — the agent calls recall_conversation to find past sessions:

You: "Continue the conversation about the auth refactor"

→ Agent retrieves the most relevant conversation matching "auth refactor"

Restore on Another Machine

bash
sharedcontext init --existing

Enter your 12-word phrase. SharedContext queries Arweave, downloads your encrypted shards, verifies signatures, decrypts, and rebuilds local state.

Manual Client Setup

If auto-setup didn't configure your client, run one of:

bash
sharedcontext setup --cursor
sharedcontext setup --claude
sharedcontext setup --claude-cli
sharedcontext setup --codex

Then restart the client app.

Share Context Flow

Share a conversation with someone (or with yourself on another machine):

bash
# 1. List your conversations
sharedcontext list conversations

# 2. Share one by ID
sharedcontext share <conversationId>
# → outputs: sharedcontext://share/<token>

# 3. Import on the other end
sharedcontext sync sharedcontext://share/<token>

The conversation is encrypted with a random key embedded in the token. Only someone with the full URL can decrypt it. The encrypted blob lives on Arweave — the link works forever.

Security Model

LayerImplementation
EncryptionAES-256-GCM — all data encrypted client-side before upload
Key derivationArgon2id — passphrase + salt → 256-bit key
Signaturessecp256k1 — every shard is signed, verified on pull
Key storagePassphrase in OS keychain, private key encrypted at rest
Pull integritySignature verification before decrypt — bad shards are rejected
Share isolationEach share uses a unique random 256-bit key, separate from identity

What this means: Arweave stores opaque encrypted blobs. Without your recovery phrase (or a share token for shared conversations), the data is unreadable. There is no server, no account, no API key. You are the only keyholder.

Command Reference

CommandDescription
sharedcontext initGenerate recovery phrase, derive identity, create local storage, auto-configure clients
sharedcontext init --existingRestore from a 12-word recovery phrase
sharedcontext serveStart the MCP server over stdio (used by AI clients; also useful for debugging)
sharedcontext setup --cursor|--claude|--claude-cli|--codexWrite MCP config for a specific client
sharedcontext identityShow wallet address, balance, and sync status
sharedcontext list conversationsList discovered conversations (local + remote)
sharedcontext list contextList stored context facts
sharedcontext share <id>Create an encrypted share URL for a conversation
sharedcontext sync <url>Import a shared conversation
sharedcontext inspectList all stored facts
sharedcontext delete --key <key>Delete a fact

Shorthand: sc is an alias for sharedcontext.

Architecture

src/
├── cli/          # Command workflows (init, setup, share, sync, etc.)
├── core/         # Crypto, identity, storage, sync engine, parsers, watcher
│   ├── backends/ # Arweave upload backend (Turbo)
│   └── parsers/  # Cursor transcript + Claude Code JSONL parsers
├── mcp/          # MCP server with tool definitions (store_fact, recall_context, etc.)
└── test/         # Unit and integration tests

Contributing

bash
git clone https://github.com/Eversmile12/sharme.git
cd sharme
npm install
npm run build
npm test

PRs welcome. Keep changes focused and tests passing.

License

MIT

Використовуйте MCP Sharedcontext з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення Sharedcontext ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте Sharedcontext як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP Sharedcontext.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "sharedcontext": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для Sharedcontext, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для Sharedcontext.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через Sharedcontext?
Sharedcontext
Звісно. Я це прочитав.
Ось що я знайшов за допомогою Sharedcontext.

Поширені запитання

Для чого використовується сервер MCP Sharedcontext?

Sharedcontext — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP Sharedcontext з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати Sharedcontext з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP Sharedcontext із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши Sharedcontext, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP Sharedcontext до TypingMind?

Sharedcontext працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP Sharedcontext у TypingMind?

Sharedcontext надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP Sharedcontext?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо Sharedcontext потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇