Skip to content

Claude Desktop

Claude Desktop connects to Spongram with a .mcpb bundle generated per brain by the server. The bundle is a small bridge to the server's /mcp endpoint and nothing more: it has no hooks, so everything Claude Desktop knows about how to use the memory comes from the MCP instructions. This page describes the bundle, its installation, and what that absence of hooks implies.

What the bundle contains

A .mcpb file is a zip archive with four files:

File Content
manifest.json The bundle manifest: name spongram, the brain's display name, the bundle version, the entry point, and a _meta.spongram block with the endpoint URL, the group_id, the language and the model slugs of the brain.
server/entry.sh The entry point. A shell script that starts the bridge to the server, with the brain key.
README.md Installation notes for the end user, with the brain's metadata.
icon.png The icon shown by Claude Desktop.

The entry point is one command:

exec npx -y mcp-remote@latest \
  "https://spongram.example.com/mcp" \
  --header "Authorization: Bearer spt_brain_xxx"

Claude Desktop talks MCP over standard input and output to a local process. mcp-remote is that process: it relays each message to Spongram's streamable HTTP endpoint with the Authorization header.

Consequences for the user's machine:

  • sh and npx (Node.js) must be available.
  • npx downloads mcp-remote from the npm registry the first time. A machine without access to that registry, or to a mirror of it, cannot start the bridge.
  • The machine must reach the server's public URL.

The URL written in the bundle is the server's SPONGRAM_PUBLIC_URL. Set it to the address users reach from outside before generating bundles; its default is http://localhost:8091. See configuration.

Warning

The bundle contains the brain key in clear, in server/entry.sh. Distribute it through a private channel and treat it as a password. If it leaks, regenerate the key: every bundle built with the old key stops working, and a new one must be downloaded.

Getting the bundle

The admin UI offers the .mcpb download when a brain is created and again after a key regeneration. The server stores only a hash of the key, so the clear key has to be presented each time a bundle is built. See admin UI.

The same file is served by the admin API:

curl -fSL -o my-brain.mcpb \
  -H "Authorization: Bearer <admin-token>" \
  -H "X-Spongram-Brain-Key: spt_brain_xxx" \
  https://spongram.example.com/admin/api/spongram/instances/<id>/bundle/desktop.mcpb
Status Meaning
200 The bundle, as application/zip, named after the brain's display name.
403 The key in X-Spongram-Brain-Key is not this brain's key, or the key is inactive, revoked or expired.
404 Unknown brain, or unknown bundle kind.

Installing

  1. Drag the .mcpb file into the main window of Claude Desktop.
  2. Confirm the installation. Claude Desktop lists the Spongram server among its MCP servers.
  3. Start a new conversation and test a write: "Spongram, remember that I prefer short answers."
  4. In another new conversation, test a read: "What preferences have you remembered about me?"

To uninstall, remove the extension from Claude Desktop's settings. This removes the local bundle only. The memory stays in the brain until an operator purges it.

To move to another brain, or after a key regeneration, uninstall the bundle and install the new one.

No hooks: what that changes

The Claude Code plugin adds hooks around the MCP server. A .mcpb bundle has no such mechanism, and Spongram does not pretend otherwise:

Capability Claude Code plugin Claude Desktop bundle
MCP tools Yes Yes
Behavioural contract in the initialize instructions Yes Yes
Proactive tool descriptions Yes Yes
Project context injected at session start Yes No
Recent memory injected at session start Yes No
Reminder to save after many turns or a commit Yes No
Capture of the conversation before compaction or at exit Yes No
Skill file, slash commands Yes No
Code-map refresh after commits Yes No
Persona skills as local skill files Per-instance bundle only No

The only lever on Claude Desktop is the text the server sends: the instructions appended to the initialize answer and the tool descriptions in tools/list. Spongram writes both so that the model saves and recalls without being asked. See client contract.

What follows from that:

  • Memory depends on the model following the contract. Nothing is captured behind its back. To be sure something is kept, say so: "remember that…".
  • Nothing is recalled before the first message. The model searches when the conversation gives it a reason to, as the contract asks. A question such as "what do you know about project X?" triggers a search.
  • Instructions are read at connection time. After a server upgrade, a flag change, or a persona change made from another client, reconnect Spongram in Claude Desktop (or restart the application) to get the new instructions and tool list.

How Claude Desktop is recognised

The bridge sends no X-Spongram-Client header. The server treats a request without that header as a client with no project context:

  • an active persona is delivered in its full variant (role, voice, intent, rules, skills);
  • the server adds no client= tag to writes. The instructions ask the model to tag client=claude-desktop itself;
  • a write that arrives with no project= tag is filed under project=desktop-inbox when topic scoping is on, and under project=global when it is off.

Topic slugs

Claude Desktop has no repository to name a project after. With SPONGRAM_TOPIC_SCOPING_ENABLED on (off in the code, on in the container image), the instructions ask the model to classify each conversation under a topic:

  • deduce a short kebab-case slug for the conversation, and tag every memory project=<topic-slug> client=claude-desktop;
  • prefer the suggested prefixes where they fit: participation-<company>, client-<name>, devis-<name>, formation-<name>;
  • announce the slug in one line the first time something is saved, so the user can correct it;
  • keep the same slug for the whole conversation;
  • reserve project=global for facts that apply to everything the user does.

With SPONGRAM_PROJECT_ALIASES_ENABLED on, the model first calls list_project_aliases to see the projects the brain already knows, and reuses one when it matches the subject. If several labels still end up designating the same project, ask Claude to group them ("group old-name under my-project"); searches of that project then include them, and no memory is rewritten. "Which projects do you have in memory?" lists the labels and their groupings.

With topic scoping off, the model is told to tag project=global when it has no project context, and every such memory is recalled from every project.

The rules are detailed in tagging and scope and project aliases.

Personas

With SPONGRAM_PERSONAS_ENABLED on, personas work in Claude Desktop without any extra file:

  • personas and their skills are created and edited on https://spongram.example.com/v1/personas, a page that asks for the brain key once;
  • activation is requested from Claude in plain words ("activate my marketing specialist"), which calls activate_persona. The page itself never activates a persona;
  • the tool result carries the persona's full block, so the role, voice and rules apply at once for the rest of the conversation;
  • the persona's skills are listed in the block and loaded on demand with get_skill;
  • "go back to your normal behaviour" deactivates it.

A brain has one active persona, shared by every client connected to it. A persona activated from Claude Code is therefore active in Claude Desktop too, after the next reconnection. See personas.