Skip to main content
Membase connects to AI agents via the Model Context Protocol (MCP), providing a standard way for agents to store, search, and retrieve memories.

At a Glance

TypeNameWhat it doesWho uses it
Tooladd_memorySave personal context to long-term memoryAgent calls automatically when it learns something worth remembering
Toolsearch_memorySearch past memories by meaningAgent calls when past context would help its response
Toolget_current_dateGet current date and time in a timezoneAgent calls before date-filtered memory search
Tooladd_wikiAdd a factual knowledge document to the wikiAgent calls when user shares stable, reference-style knowledge
Toolsearch_wikiHybrid search across wiki documentsAgent calls when factual knowledge would improve its response
Toolupdate_wikiEdit an existing wiki documentAgent calls to keep a document current
Tooldelete_wikiPermanently remove a wiki documentAgent calls with user confirmation
Resourcemembase://profileRead-only user settings profileAgent reads when stable profile context matters
Resourcemembase://recentRead-only recent memory timelineAgent reads for latest updates and recency checks
PromptstartGuidance for memory workflow and safetyAgent can load at session start
You don’t need to call any of these yourself. Your agent handles everything automatically based on the conversation.

Memory vs Wiki

Membase exposes two complementary stores through MCP:
  • Memory (add_memory, search_memory): Personal context that describes the user: preferences, decisions, habits, ongoing projects.
  • Wiki (add_wiki, search_wiki, update_wiki, delete_wiki): Factual knowledge that the user wants to keep as reference material: docs, specs, notes, and anything else that is stable and addressable by title.
For user questions, agents should generally call both search_memory and search_wiki, then combine the results. See the Knowledge Wiki guide for details.

MCP Server

Membase runs a remote MCP server accessible at:
https://mcp.membase.so/mcp
PropertyValue
TransportStreamable HTTP
AuthenticationOAuth (browser-based)
Packagemembase (npm)
For MCP setups, the npx -y membase@latest --client <client> CLI command handles registration and auth automatically for supported clients. See the Agents guide for per-client setup.
Claude Code users should start with the Membase Claude Code plugin. The plugin exposes the same Membase memory and wiki tools directly inside Claude Code, plus slash commands, hooks, and project-aware workflows. The remote MCP server remains available for other clients and as a Claude Code fallback.

Tools

Membase exposes tools that agents can call during conversations. They split into two groups: memory tools for personal context and wiki tools for factual knowledge.

Memory Tools

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.
ParameterTypeRequiredDescription
contentstring (max 50,000 chars)YesThe memory content to store
projectstring (max 60 chars)NoProject or category slug to file this memory under. Agents should only set this when the user explicitly mentions a project name, tag, label, or category (e.g. “save this under project X”, “tag this as Y”). Do not guess or infer. See Projects.
metadataobjectNoReserved for internal use. Agents should not populate this field.
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.
ParameterTypeRequiredDescription
querystring (max 1,000 chars)YesNatural-language search query. Use empty string to fetch recent memories.
limitinteger (1-30)NoMax results to return (default: 20)
offsetintegerNoPagination offset (default: 0)
date_fromISO date/datetime stringNoInclusive lower bound for date filtering
date_toISO date/datetime stringNoInclusive upper bound for date filtering
timezoneIANA timezone stringNoDate-only parsing timezone, for example America/Los_Angeles
sourcesarray of stringsNoFilter by source. Supports integrations (Slack, Gmail, Google Calendar), AI clients (Cursor, Claude, Claude Code, VS Code, ChatGPT, Codex, Gemini CLI, OpenCode, Poke, OpenClaw, Hermes), imports (ChatGPT, Claude, Gemini), and dashboard-created memories. If omitted, all sources are searched.
projectstring (max 60 chars)NoRestrict search to a single project slug (exact match). Use only when the user explicitly asks for a project or category scope. See Projects.
Each result includes a relevance score (0–1) indicating how closely it matches the query.
Returns the current date and time in the user’s Membase timezone (and UTC). Agents call this before search_memory to resolve relative phrases like “today”, “yesterday”, “this week”, or “next weekend” into ISO 8601 date_from/date_to values.This tool takes no input parameters. The response contains four fields:
FieldDescription
now_utcCurrent UTC timestamp in ISO 8601 (e.g., 2025-01-15T02:30:00.000Z)
timezoneThe effective IANA timezone used (from the user’s saved Membase timezone)
local_dateLocal date in that timezone (e.g., 2025-01-15)
local_timeLocal time in that timezone (e.g., 11:30:00)

Projects

Memories can be grouped into projects (lightweight category/tag slugs). Both add_memory and search_memory accept an optional project field.
  • User-driven, not inferred: Agents should set project on add_memory only when the user explicitly mentions a project, tag, label, or category (for example, “save this under acme-rewrite”, “tag this as personal”). Agents must not guess or invent a project.
  • Known projects hint: The Membase MCP server injects the current user’s existing project slugs into each tool’s description, so agents can reuse existing slugs instead of creating new ones for the same concept.
  • Filtered search: Pass project: "acme-rewrite" to search_memory to restrict results to that project. Exact slug match only.
  • Managed in the dashboard: Users can move memories between projects and filter by project from the Memories tab. See the Memory guide.
Users who want hands-off project tagging can drop a line in their profile instructions such as “When I mention acme or side-project, tag those memories under the corresponding project.” The agent will then apply the tag automatically during matching conversations.

Wiki Tools

Creates a new document in the user’s knowledge wiki. Agents use this for factual, reference-style knowledge (documentation, specs, stable notes). Personal preferences and habits should go through add_memory instead.
ParameterTypeRequiredDescription
titlestring (1-500 chars)YesTitle of the wiki document
contentstring (max 100,000 chars)YesMarkdown content. Use [[wikilinks]] to reference related documents.
collectionstring (max 200 chars)NoPlace the document in a collection by name. New collections are created on first use.
summarizebooleanNoIf true, Membase runs a context-aware LLM summarization pass over the content before saving (default: false)
Document creation respects the user’s plan quota. If the limit is reached the call returns a quota error.
Searches the user’s wiki using hybrid search: a full-text keyword index (BM25-style) and semantic similarity, fused with Reciprocal Rank Fusion (RRF). Results include each document’s full body so the agent has enough context to answer immediately.
ParameterTypeRequiredDescription
querystring (max 1,000 chars)YesNatural-language or keyword search query. Use empty string "" to fetch recent wiki documents.
limitinteger (1-20)NoMax results to return (default: 10)
collectionstring (max 200 chars)NoRestrict results to a specific wiki collection by name. If omitted, all collections are searched.
Edits an existing wiki document. Use search_wiki first to resolve the document ID.
ParameterTypeRequiredDescription
doc_idUUIDYesID of the document to update
titlestring (1-500 chars)NoNew title
contentstring (max 100,000 chars)NoNew markdown content
collectionstring or null (max 200 chars)NoMove the document to a collection by name. New collections are created on first use. Set collection to null to move it to Basic Collection.
Permanently deletes a wiki document. This action cannot be undone; agents should ask for user confirmation before calling it.
ParameterTypeRequiredDescription
doc_idUUIDYesID of the document to delete

Resources

MCP resources provide read-only data that agents can pull into their context:
ResourceURIDescription
User Profilemembase://profileUser settings payload (display_name, role, interests, instructions, timezone)
Recent Memoriesmembase://recentTop 10 recent memories, ordered by event time when available and capture time otherwise
Membase MCP resources in Claude

Prompts

MCP prompts inject pre-built instructions and context into the agent’s system prompt:
PromptDescription
startTeaches the agent when to use search_memory, when to use resources, when to save memory, and what to avoid storing.
The start prompt can be used at session start to provide:
  1. Workflow guidance for memory retrieval and memory write behavior
  2. Safety guidance for secrets and transient information
  3. Resource usage guidance for profile versus recent timeline reads
Use these patterns for best results:
  1. For user questions, call both search_memory and search_wiki and combine results: memory returns personal context, wiki returns factual knowledge.
  2. For stable user profile context, read membase://profile.
  3. For latest updates or “what changed” questions, read membase://recent.
  4. For date-filtered searches, call get_current_date and then pass explicit date filters to search_memory.
  5. Save durable user context with add_memory, and skip secrets or one-off transient data unless explicitly requested.
  6. Save factual, reference-style knowledge with add_wiki (documentation, specs, stable notes). Do not use add_wiki for personal preferences or habits.

Connection Setup

For detailed setup instructions for each agent, see the Agents guide.

Cursor

One-click install

Claude Code

Plugin recommended

Claude

Custom connector

ChatGPT

Manual config

Next Steps

Memory

Explore and manage memories.

Knowledge Wiki

Deep dive on wiki documents, collections, imports, and search.

Chat in Dashboard

Talk to your knowledge base without an external agent.