Skip to content

Strands Agents ​

Strands Agents connects to MCP servers through its MCPClient. This page connects it to the @mnemoverse/mcp-memory-server package, which gives the agent memory tools: it stores memories, recalls them with a natural-language query, reports whether a recalled memory helped so that useful memories rank higher next time, and can share memory with other agents through rooms (beta).

The package runs locally through npx, talks to the agent over stdio, and stores memories in the hosted Mnemoverse service, so they persist across runs, processes and machines that use the same account.

Prerequisites ​

  • Python 3.10 or newer and pip install strands-agents
  • Node.js 18 or newer, because the server is started with npx
  • A Mnemoverse API key (it starts with mk_live_), free at console.mnemoverse.com
  • A model provider for the agent. Strands uses Amazon Bedrock by default, which needs AWS credentials with model access; any other Strands model provider works the same way.

Connect ​

python
import os

from mcp import stdio_client, StdioServerParameters
from strands import Agent
from strands.tools.mcp import MCPClient

mnemoverse = MCPClient(lambda: stdio_client(
    StdioServerParameters(
        command="npx",
        args=["-y", "@mnemoverse/mcp-memory-server@latest"],
        env={"MNEMOVERSE_API_KEY": os.environ["MNEMOVERSE_API_KEY"]},
    )
))

agent = Agent(
    tools=[mnemoverse],
    system_prompt=(
        "You have long-term memory. Before answering, search it with memory_read. "
        "When the user states a durable fact, preference or decision, save it with memory_write. "
        "After you use a recalled memory, call memory_feedback to say whether it helped."
    ),
)

agent("Remember: staging deploys go through make deploy-staging, never through the hosting dashboard.")

Set MNEMOVERSE_API_KEY in your environment before running. The key is passed in env on purpose: the MCP Python SDK starts a stdio server with only a short list of inherited variables such as PATH, so a key that is set only in your shell does not reach the server.

Passing the client in tools lets Strands manage the connection. To manage it yourself, open it with with mnemoverse: and pass mnemoverse.list_tools_sync() to the agent inside that block.

Try it ​

Run the script above once. Then replace its last line with the one below and run it again as a new process:

python
print(agent("How do we deploy to staging?"))

The agent is instructed to search memory before answering, so the second run can answer from the rule saved in the first. The memory lives in Mnemoverse, not in the process, so the same works from another machine or another MCP client that uses the same account.

Tools ​

ToolWhat it does
memory_writeStore a memory that should persist across sessions: a preference, decision, lesson or project fact
memory_readSearch memory with a natural-language query before answering or starting a task
memory_list_recentList the newest memories first, filtered by domain and time window, without a query
memory_feedbackReport whether a recalled memory helped, so useful memories rank higher next time
memory_statsShow how many memories are stored and which domains exist
memory_create_roomCreate a shared memory room (beta)
memory_invite_to_roomCreate an invite code for a room you own (beta)
memory_join_roomJoin a shared room with an invite code (beta)
memory_list_roomsList the rooms you own or have joined (beta)
vault_listList stored secrets by alias and purpose; values are never returned
memory_graphRead the association graph the memory has formed around given concepts

Full parameters: MCP Server and API Reference.

Verified ​

Connection and tool listing checked on 2026-10-05 with strands-agents 1.57.2, mcp 2.1.1 and @mnemoverse/mcp-memory-server 0.14.2: list_tools_sync() returns the tools above.