Logo van Sharedcontext

Sharedcontext

Community
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.

UitgeverEversmile12
Repositorysharedcontext
TaalTypeScript
Forks
9
Sterren
50
Beschikbare tools
0
Transporttypestdio
Links
  • Koppel tools aan AI-workflows

    Sharedcontext biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    50 sterren en 9 forks in de gekoppelde repository.


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

Gebruik Sharedcontext MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Sharedcontext is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Sharedcontext toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Sharedcontext.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "sharedcontext": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Sharedcontext in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Sharedcontext in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Sharedcontext gebruiken om me hiermee te helpen?
Sharedcontext
Zeker. Ik heb het gelezen.
Dit vond ik met Sharedcontext.

Veelgestelde vragen

Waarvoor wordt de MCP-server Sharedcontext gebruikt?

Sharedcontext is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Sharedcontext MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Sharedcontext gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Sharedcontext MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Sharedcontext verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Sharedcontext MCP met TypingMind?

Sharedcontext werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Sharedcontext MCP in TypingMind?

Sharedcontext biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Sharedcontext MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Sharedcontext authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇