At a Glance
| Type | Name | What it does | Who uses it |
|---|---|---|---|
| Tool | add_memory | Save context to long-term memory | Agent calls automatically when it learns something worth remembering |
| Tool | search_memory | Search past memories by meaning | Agent calls when past context would help its response |
| Tool | get_about_me | Get a broad overview of the user | Agent calls at the start of a session |
| Resource | User Profile | Read-only user profile from memories | Agent reads to understand who you are |
| Resource | Recent Memories | Read-only list of recent memories | Agent reads to see latest context |
| Prompt | context | Instructions + recent memories injected into system context | Loaded automatically at session start |
MCP Server
Membase runs a remote MCP server accessible at:| Property | Value |
|---|---|
| Transport | Streamable HTTP |
| Authentication | OAuth (browser-based) |
| Package | membase (npm) |
npx -y membase@latest --client <client> CLI command handles registration and auth automatically for supported clients. See the Agents guide for per-client setup.
Tools
Membase exposes 3 tools that agents can call during conversations:add_memory
add_memory
Stores long-term memory that persists across sessions. Agents use this proactively when the user shares durable context worth remembering: preferences, recurring habits, ongoing projects, goals, constraints, etc. Transient one-off information is skipped unless the user explicitly asks to save it.
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string (max 50,000 chars) | Yes | The memory content to store |
metadata | object | No | Optional metadata for categorization (e.g., tags, source) |
search_memory
search_memory
Searches stored memories by semantic similarity. Agents use this when the user asks to recall something from a previous session, or proactively when past context would improve their response. Results are returned as episode-centric bundles with related context.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string (max 1,000 chars) | Yes | Natural-language search query. Use empty string to fetch recent memories. |
limit | integer (1-100) | No | Max results to return (default: 10) |
offset | integer | No | Pagination offset (default: 0) |
get_about_me
get_about_me
Retrieves the user’s profile and related memories as an overview. Typically used at the start of a new session to give the agent a broad understanding of who the user is. For targeted lookups, agents use
search_memory instead.No parameters.Resources
MCP resources provide read-only data that agents can pull into their context:| Resource | URI | Description |
|---|---|---|
| User Profile | membase://profile | Your recent memories formatted as a user profile overview |
| Recent Memories | membase://recent | The 10 most recently created or updated memories with details |

Prompts
MCP prompts inject pre-built instructions and context into the agent’s system prompt:| Prompt | Description |
|---|---|
| context | Teaches the agent how to use Membase (when to save, what to save, what to skip) and includes your recent memories so the agent has immediate context about you. |
context prompt is loaded at the start of a session and gives the agent two things:
- Instructions on when to proactively call
add_memory(preferences, goals, projects, constraints) and what to avoid (transient info, secrets) - Your recent memories so the agent already knows about you before you say anything
How It All Works Together
When a connected agent starts a conversation:- The context prompt gives the agent background about the user and instructions on when to save memories
- The agent uses search_memory to find relevant past context for the current topic
- As the conversation progresses, the agent proactively calls add_memory when it learns something durable about the user
- All saved memories become instantly available to every connected agent

