Team setup (self-hosted)
For teams that want to run their own shmem server. Each developer signs in to it, and the server stamps every memory with the authenticated caller. With an identity provider configured (SHMEM_OAUTH_ISSUER, see Transports), developers sign in with shmem login --remote, like the hosted server; without one, the operator issues each developer a token from keys.json.
Before exposing it to your network, read the security checklist for running a server: streamable-http only, TLS in front, never without auth.
1. Deploy the server
shmem-mcp --transport streamable-http --host 0.0.0.0 --port 8705
Environment for the LLM provider:
export SHMEM_LLM_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...
export SHMEM_PROJECT=team-backend
2. Create API keys (servers without sign-in)
With an identity provider configured, skip this step. Otherwise, keys.json in the server's root (~/.shmem, or $SHMEM_ROOT):
{
"keys": {
"sk-alice-abc123": { "user": "alice@macbook", "agent": "claude-code", "root": "/data/shmem/users/alice" },
"sk-alice-def456": { "user": "alice@macbook", "agent": "antigravity", "root": "/data/shmem/users/alice" },
"sk-bob-ghi789": { "user": "bob@workstation", "agent": "claude-code", "root": "/data/shmem/users/bob" }
}
}
Each key maps to a user identity. The server extracts identity from the auth token — callers cannot impersonate each other. Same user can have multiple tokens (one per client), all pointing to the same root. Different users get fully isolated databases.
3. Sign in each developer's machine
Each developer installs shmem and signs in to the shared server:
shmem login --remote https://shmem.example.com/mcp # with sign-in
shmem login --remote https://shmem.example.com/mcp --token sk-alice-abc123 # with a keys.json token
Hooks still run locally, and what they save syncs to the server. Each developer's conversations are stamped with their identity. To point every machine at the server without typing --remote, set SHMEM_LOGIN_SERVER in the environment your installer provides.
4. Query across the team
shmem ask "Has anyone dealt with the Stripe webhook race condition?"
Or filter to a specific person:
recall_memory(query="auth architecture", caller_user="alice@macbook")