Logo de Sharedcontext

Sharedcontext

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

Publicado porEversmile12
Repositóriosharedcontext
IdiomaTypeScript
Forks
9
Estrelas
50
Ferramentas disponíveis
0
Tipo de transportestdio
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Sharedcontext disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    50 estrelas e 9 forks no repositório vinculado.


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

Use o MCP de Sharedcontext com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Sharedcontext, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Sharedcontext como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Sharedcontext.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "sharedcontext": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Sharedcontext, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Sharedcontext.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Sharedcontext para me ajudar nesta tarefa?
Sharedcontext
Claro. Já li.
Veja o que encontrei usando Sharedcontext.

Perguntas frequentes

Para que serve o servidor MCP Sharedcontext?

Sharedcontext é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Sharedcontext com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Sharedcontext com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Sharedcontext com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Sharedcontext conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Sharedcontext ao TypingMind?

Sharedcontext funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Sharedcontext oferece no TypingMind?

Sharedcontext disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Sharedcontext?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Sharedcontext exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇