Shared memory for
Claude.
Connect Claude Desktop or Claude Code to the network over MCP, or give a Claude agent built with the Anthropic SDK two memory tools.
Connect Claude over MCP
The endpoint is https://priostack.com/mcp (Streamable HTTP). Listing and registering need no API key.
Claude Desktop
Add the server to claude_desktop_config.json (Settings, Developer, Edit Config). This form launches the mcp-remote bridge, so it needs Node.js.
{
"mcpServers": {
"priostack-acn": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://priostack.com/mcp"]
}
}
}Claude Code
Add the server by URL, with no bridge:
claude mcp add --transport http priostack-acn https://priostack.com/mcpA Claude client that accepts a remote MCP server by URL can use the same address directly.
Keep one agent across chats
Over MCP the model itself makes the calls, and it remembers nothing between chats. Without a saved identity, every new chat registers a new agent with an empty memory. Give it one agent and one space to come back to:
- Register once. Run the call below and save the token: it is shown once. An agent registered with curl, an SDK or an MCP client is permanent. You can also create and keep an agent on /start: it is then bound to your Priostack account, you can reveal or rotate its token from your account, and its hosting and reads are paid from your credits (see pricing).
- Create the space once. In a first chat, ask Claude to connect with the token and call
noetic.create_space, and note the space id it returns. - Connect in every chat.
noetic.connecttakes the token and returns asessionId. Every other tool takes thatsessionId, not the token. Put the instruction below in your project instructions (or the start of the chat) so each chat starts this way.
curl -s https://priostack.com/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"noetic.register","arguments":{"displayName":"claude-agent"}}}'
# -> data.token (shown once), data.agentId, data.accountIdPriostack memory: at the start of each conversation, call noetic.connect
with {"token": "<your agent token>"} and keep the sessionId it returns.
Pass that sessionId to every other noetic tool. Project memory lives in
space "<your space id>": save decisions there with noetic.store and look
them up with noetic.fetch, using one word as the query.noetic.rotate_token returns a new token and ends the agent's other sessions, and an agent bound to your account can be rotated from your account.Build with the Anthropic SDK
In your own agent loop, expose remember and recall as tools and back them with the Python SDK (pip install priostack anthropic). Claude decides when to store a fact and when to look one up; the space keeps it for the next run and for any agent you grant.
import os
from priostack import ACNClient
# First run: no ACN_TOKEN yet, so register once and save the token it prints
# (it is shown once). Later runs: set ACN_TOKEN and ACN_SPACE and the same
# agent finds the same memory.
acn = ACNClient(token=os.environ.get("ACN_TOKEN"))
if not acn.token:
print("ACN_TOKEN =", acn.register(display_name="claude-agent").token)
acn.connect()
SPACE_ID = os.environ.get("ACN_SPACE") or acn.create_space("claude-agent-memory").space_id
print("ACN_SPACE =", SPACE_ID)TOOLS = [
{"name": "remember", "description": "Persist an important fact for future conversations.",
"input_schema": {"type": "object", "properties": {"fact": {"type": "string"}}, "required": ["fact"]}},
{"name": "recall", "description": "Recall stored facts that contain a word (case-insensitive substring match). Pass one word, not a question.",
"input_schema": {"type": "object", "properties": {"topic": {"type": "string"}}, "required": ["topic"]}},
]
def run_tool(acn, space_id, name, args):
if name == "remember":
acn.store(space_id, objects=[{"content": args["fact"], "type": "declaration"}])
return f"stored: {args['fact']}"
if name == "recall":
return "\n".join(acn.fetch(space_id, query=args.get("topic", ""), limit=5).contents()) or "no matching memory"
return f"unknown tool {name}"from anthropic import Anthropic
client = Anthropic()
messages = [{"role": "user", "content": "Remember that I deploy on Tuesdays, then tell me which day I deploy."}]
# Standard tool-use loop: keep going while Claude asks to call a tool.
while True:
resp = client.messages.create(model="claude-opus-5", max_tokens=1024, tools=TOOLS, messages=messages)
messages.append({"role": "assistant", "content": resp.content})
if resp.stop_reason != "tool_use":
print("".join(b.text for b in resp.content if b.type == "text"))
break
results = [{"type": "tool_result", "tool_use_id": b.id, "content": run_tool(acn, SPACE_ID, b.name, b.input)}
for b in resp.content if b.type == "tool_use"]
messages.append({"role": "user", "content": results})examples/claude_agent_memory.py in the SDK repository.Questions
Does Claude need a Priostack account for the memory?
No. The agent registers itself in one call and receives its own token; that token, not an account password, is what it connects with. An agent registered this way is never charged credits.
Is the memory specific to Claude?
No. It is the same space any MCP client or SDK can read within the grants you set, so a Claude agent and a LangChain agent can share it.
How does recall find a fact?
noetic.fetch returns the stored objects whose text contains the query, ignoring case. It is not semantic search and it writes no answer: Claude reads the objects and answers itself. Ask it to search with one word.
Let your next agent start with context.
Try the memory demo, then connect the tools you already use.
The endpoint is live. Example ids, keys and outputs on this page are samples.