Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MEMCP_RRF_KNoRRF fusion smoothing constant60
MEMCP_DATA_DIRNoData storage directory~/.memcp
MEMCP_MAX_INSIGHTSNoMax insight count before auto-pruning10000
MEMCP_SEARCH_ALPHANoHybrid search blend (0=BM25 only, 1=semantic only)0.6
MEMCP_HEBBIAN_BOOSTNoWeight boost per co-retrieval event0.05
MEMCP_MAX_MEMORY_MBNoMax total memory usage2048
MEMCP_SEMANTIC_DEDUPNoEnable semantic deduplicationfalse
MEMCP_DEDUP_THRESHOLDNoCosine similarity threshold for semantic dedup0.95
MEMCP_EDGE_MIN_WEIGHTNoMinimum edge weight before pruning0.05
MEMCP_HEBBIAN_ENABLEDNoEnable/disable Hebbian co-retrieval strengtheningtrue
MEMCP_SECRET_DETECTIONNoEnable/disable secret detectiontrue
MEMCP_EMBEDDING_PROVIDERNomodel2vec, fastembed, or autoauto
MEMCP_MAX_CONTEXT_SIZE_MBNoMax size per context variable10
MEMCP_EDGE_DECAY_HALF_LIFENoHalf-life in days for edge weight decay30
MEMCP_RETENTION_PURGE_DAYSNoDays before purging archived items180
MEMCP_IMPORTANCE_DECAY_DAYSNoHalf-life for importance decay30
MEMCP_RETENTION_ARCHIVE_DAYSNoDays before archiving stale items30
MEMCP_CONSOLIDATION_THRESHOLDNoSimilarity threshold for consolidation grouping0.85

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
memcp_pingA

Health check. Returns server status and memory statistics.

memcp_rememberA

Save an important insight to persistent memory.

Use this to remember key decisions, facts, user preferences, or technical
findings that should be preserved across conversations.

Args:
    content: The insight or fact to remember (be concise but complete)
    category: Type — decision, fact, preference, finding, todo, general
    importance: Priority — low, medium, high, critical
    tags: Comma-separated keywords for retrieval (e.g., "api,auth,v2")
    summary: Optional one-line summary
    entities: Optional comma-separated entities mentioned
    project: Optional project name
    session: Optional session ID
memcp_recallA

Retrieve insights from memory.

Use this to find previously stored knowledge — decisions, preferences,
technical findings. Call at session start to load relevant context.

Args:
    query: Search term (searches content, tags, and summary)
    category: Filter by type
    importance: Filter by priority
    limit: Max results (default 10)
    max_tokens: Token budget — returns results until budget is exhausted (0 = unlimited)
    project: Filter by project
    session: Filter by session ID
    scope: "project" (default), "session" (current only), "all" (cross-project)
memcp_forgetB

Remove an insight from memory by ID.

Args:
    insight_id: The ID of the insight to remove
memcp_statusA

Current memory statistics — insight count, categories, importance distribution.

Args:
    project: Filter stats by project
    session: Filter stats by session
memcp_load_contextA

Store content as a named context variable on disk.

Use this to save large content (files, conversation history, code)
that should be accessible without loading into the prompt.

Args:
    name: Unique name for this context (alphanumeric, dots, hyphens, underscores)
    content: The content to store (provide content OR file_path, not both)
    file_path: Path to a file to load as context
    project: Optional project name
memcp_inspect_contextA

Inspect a stored context — metadata and preview without loading full content.

Use this to check a context's type, size, and token count before deciding
whether to load it into the prompt.

Args:
    name: Context name to inspect
memcp_get_contextB

Read a stored context's content or a line range.

Args:
    name: Context name
    start: Start line (1-indexed, 0 = from beginning)
    end: End line (1-indexed, inclusive, 0 = to end)
memcp_chunk_contextA

Split a stored context into navigable numbered chunks.

Args:
    name: Context name (must already be loaded)
    strategy: Splitting strategy — auto, lines, paragraphs, headings, chars, regex
    chunk_size: Size per chunk (lines for 'lines', chars for 'chars', tokens for 'paragraphs')
    overlap: Overlap between chunks (lines or chars)
memcp_peek_chunkB

Read a specific chunk from a chunked context.

Args:
    context_name: Context name
    chunk_index: Chunk number (0-indexed)
    start: Start line within chunk (1-indexed, 0 = from beginning)
    end: End line within chunk (1-indexed, inclusive, 0 = to end)
memcp_filter_contextA

Filter context content by regex pattern.

Returns only lines matching (or not matching) the pattern.

Args:
    name: Context name
    pattern: Regex pattern to match lines
    invert: If True, return lines that DON'T match the pattern
memcp_list_contextsB

List all stored context variables.

Args:
    project: Filter by project name (empty = all projects)
memcp_clear_contextA

Delete a stored context and its chunks.

Args:
    name: Context name to delete
memcp_searchA

Search across memory insights and context chunks.

Auto-selects the best available search method (BM25 > keyword).
Install optional packages for better search: pip install memcp[search]

Args:
    query: Search query
    limit: Max results (default 10)
    source: Where to search — "all" (default), "memory", "contexts"
    max_tokens: Token budget (0 = unlimited)
    project: Filter by project
    scope: "project" (default), "session", "all"
memcp_relatedA

Traverse graph from an insight — find connected knowledge.

Discovers insights related via semantic similarity, temporal proximity,
causal chains, or shared entities.

Args:
    insight_id: The ID of the insight to start from
    edge_type: Filter by edge type — semantic, temporal, causal, entity (empty = all)
    depth: How many hops to traverse (default 1)
memcp_graph_statsB

Graph statistics — node count, edge counts by type, top entities.

Shows how knowledge is connected in the graph.

Args:
    project: Filter by project (empty = all projects)
memcp_retention_previewA

Preview what would be archived or purged — dry-run, no changes made.

Shows candidates for archiving (stale, low-access items) and purging
(archived items past retention period). Items with high importance,
frequent access, or protected tags are immune from archiving.

Args:
    archive_days: Override archive threshold (default from env, 30 days)
    purge_days: Override purge threshold (default from env, 180 days)
memcp_retention_runA

Execute retention actions — archive old items, optionally purge.

Archiving compresses and moves stale items to the archive directory.
Purging permanently deletes archived items past the purge threshold
and logs metadata to purge_log.json for audit.

Args:
    archive: Archive eligible items (default True)
    purge: Purge archived items past retention period (default False)
memcp_restoreA

Restore an archived context or insight back to active.

Decompresses archived contexts and re-inserts archived insights
into the knowledge graph.

Args:
    name: Context name or insight ID to restore
    item_type: "context", "insight", or "auto" (tries both)
memcp_projectsA

List all projects with insight/context/session counts.

Shows every project that has data in MemCP.

memcp_sessionsB

List sessions, optionally filtered by project.

Args:
    project: Filter by project (empty = all)
    limit: Max sessions to return (default 20)
memcp_reinforceA

Provide feedback on an insight — mark it as helpful or misleading.

Helpful insights get a score boost and stronger edges.
Misleading insights get penalized. This closes the learning loop.

Args:
    insight_id: The ID of the insight to reinforce
    helpful: True if the insight was helpful, False if misleading
    note: Optional note about why
memcp_consolidation_previewA

Preview groups of similar insights that could be merged.

Finds near-duplicate or very similar insights and groups them.
Dry-run — no changes made. Use memcp_consolidate to merge.

Args:
    threshold: Similarity threshold (0 = use default 0.85)
    limit: Max groups to return
    project: Filter by project
memcp_consolidateA

Merge a group of similar insights into one.

Keeps the best insight (most accessed by default), merges tags/entities
from others, redirects edges, and deletes duplicates.

Args:
    group_ids: Comma-separated insight IDs to merge
    keep_id: Which ID to keep (default: most accessed)
    merged_content: Optional override for the merged content

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maydali28/memcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server