Skip to main content
Glama
mcp-memory-server

mcp-memory-server

by paolino

MCP Memory Server

CI

MCP server for memory management with process inspection and cleanup tools.

Documentation

Tools

Tool

Description

list_memory_usage

System memory summary (like free -h)

list_top_processes

Top N memory consumers with details

find_stale_processes

Find sleeping/idle processes by age, state, name pattern

kill_processes

Kill PIDs with safety checks

Related MCP server: mem0_mcp_server

Installation

Claude Code

Add to ~/.config/claude-code/mcp.json:

{
  "mcpServers": {
    "mcp-memory": {
      "command": "nix",
      "args": ["run", "github:paolino/mcp-memory-server", "--refresh"]
    }
  }
}

The --refresh flag ensures you always get the latest version. Remove it to use the cached version for faster startup.

From source

git clone https://github.com/paolino/mcp-memory-server
cd mcp-memory-server
nix develop
just install
just run

Usage Examples

Show memory usage

Ask Claude: "Show me current memory usage"

Find stale GHC processes

Ask Claude: "Find old GHC or cabal processes using more than 100MB"

This calls find_stale_processes with:

  • name_pattern: "ghc|cabal"

  • min_memory_mb: 100

Kill processes

Ask Claude: "Kill these PIDs: 1234, 5678"

Safety checks:

  • Refuses PID 0/1

  • Refuses root-owned processes (unless running as root)

  • Optional name confirmation to prevent killing wrong process

  • Default SIGTERM, SIGKILL only when explicit

Development

nix develop
just test       # Run tests
just run        # Start server
just format     # Format code
just lint       # Lint code

License

MIT

Available Tools

5 tools
find_stale_processesB

Find potentially stale processes based on various criteria.

Useful for finding long-running background processes that may be consuming resources unnecessarily.

Inputs: states, name_pattern, min_age_hours, min_memory_mb. Returns: result

kill_processesA

Kill processes by PID with safety checks.

Safety mechanisms:

  • Refuses to kill PID 0 or 1

  • Refuses root-owned processes unless running as root

  • Optional name confirmation to prevent killing wrong process

  • Uses SIGTERM by default, SIGKILL only when explicit

Inputs: pids (required), signal_name, confirm_names. Returns: Summary of kill operation results.

list_memory_usageA

Get system memory usage summary.

Returns total, available, used memory and swap statistics, similar to the free -h command.

Inputs: no named parameters. Returns: System memory information.

list_process_groupsA

List processes grouped by name with aggregated stats.

Useful for seeing total resource usage by process type (e.g., "3 claude processes using 1.6GB total").

Inputs: n, min_count. Returns: result

list_top_processesC

List top N memory-consuming processes.

Inputs: n, sort_by. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct purpose: memory usage overview, top processes, process grouping, stale process detection, and process termination. Even the two listing tools are clearly differentiated by their focus on top consumers versus name-based aggregation, with descriptions reinforcing this.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (list_*, find_*, kill_*). There are no mixed conventions or vague verbs, making the API predictable and easy to navigate.

    Tool Count5/5

    With 5 tools, the server is well-scoped for its purpose. It provides a comprehensive set for memory monitoring and process management without unnecessary bloat, and each tool earns its place.

    Completeness4/5

    The tool surface covers the core lifecycle: memory overview, process listing, grouping, stale detection, and killing. A minor gap is the lack of a tool to retrieve detailed information about a single process by PID, but this does not critically impede the server's primary functionality.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for system monitoring, enabling users to ask about CPU, memory, disk, network, and processes on their system.
      9
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing agent memory management with layered awakening, per-agent SQLite storage, and a dashboard for monitoring and administration.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for Windows process memory inspection/editing and crash dump analysis, enabling live memory scanning, patching, pointer resolution, disassembly, and offline dump examination via structured tool calls.
      MIT