memories.sh
MCP Server

Tools Reference

Complete reference for all MCP tools exposed by the memories.sh server.

The memories.sh MCP server exposes 7 tools that AI agents can call to interact with your memory store.

get_context

The primary tool for AI agents. Returns all active rules plus memories relevant to an optional search query.

ParameterTypeRequiredDescription
querystringNoSearch query to find relevant memories
limitnumberNoMax number of search results
{
  "name": "get_context",
  "arguments": {
    "query": "authentication flow",
    "limit": 5
  }
}

Returns all rules first, followed by relevant search results.

add_memory

Store a new memory.

ParameterTypeRequiredDescription
contentstringYesMemory content
typeenumNorule, decision, fact, note (default: note)
tagsstring[]NoArray of tags
globalbooleanNoStore as global (default: project-scoped)
{
  "name": "add_memory",
  "arguments": {
    "content": "The API uses JWT tokens with 1h expiry",
    "type": "fact",
    "tags": ["auth", "api"]
  }
}

search_memories

Full-text search across memories with BM25 ranking.

ParameterTypeRequiredDescription
querystringYesSearch query
limitnumberNoMax results
typesenum[]NoFilter by memory types
{
  "name": "search_memories",
  "arguments": {
    "query": "database schema",
    "types": ["decision", "fact"]
  }
}

get_rules

Get all active rules, split by global and project scope. Takes no parameters.

{
  "name": "get_rules",
  "arguments": {}
}

list_memories

List recent memories with optional filters.

ParameterTypeRequiredDescription
limitnumberNoMax results
tagsstring[]NoFilter by tags
typesenum[]NoFilter by types

edit_memory

Update an existing memory's content, type, or tags.

ParameterTypeRequiredDescription
idstringYesMemory ID
contentstringNoNew content
typeenumNoNew type
tagsstring[]NoNew tags

forget_memory

Soft-delete a memory by ID.

ParameterTypeRequiredDescription
idstringYesMemory ID to forget