home / mcp / memex mcp server

MEMEX MCP Server

Provides a dual knowledge base for guides and contexts with MCP tooling and semantic search.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jacquesbh-memex-mcp": {
      "command": "/absolute/path/to/memex-mcp/memex",
      "args": [
        "server"
      ]
    }
  }
}

MEMEX is an MCP server that centralizes and persists your knowledge for guides and contexts, enabling you to manage, search, and reuse technical instructions and AI interaction prompts. It includes semantic search, CLI tools, and integration with Claude via the MCP protocol to streamline knowledge access across projects.

How to use

You run MEMEX as a local MCP server and connect to it from an MCP client. The MEMEX MCP server exposes tools to manage two knowledge bases: Guides (step-by-step instructions) and Contexts (personas, conventions, and prompts). Use the client to list, get, write, or delete items, and rely on semantic search to find relevant guides and contexts.

How to install

Prerequisites you need before installation:

  • PHP 8.3+ installed on your system
  • Composer installed and available in your PATH
  • Node.js 20+ installed for MCP Inspector tests (optional for local testing)
  • Ollama installed with the nomic-embed-text model for semantic search
  • A supported operating system (macOS or Linux)

Step-by-step commands to install and prepare MEMEX for use:

make install                    # Install dependencies
ollama pull nomic-embed-text   # Setup Ollama for semantic search
make build                      # Build binary
./memex server                  # Run server

Configuration

MEMEX allows you to customize the knowledge base location and how the MCP server is started. The default knowledge base location is ~/.memex/knowledge-base. You can set the path using a CLI flag, a local config file, or a global config file, in that order of priority.

Example local configuration to point MEMEX to a custom knowledge base path:

{
  "knowledgeBase": "/absolute/path/to/kb"
}

Knowledge Base Structure

Your knowledge base is organized into two main areas plus an embeddings store for fast semantic search.

knowledge-base/
├── guides/      # Technical how-to docs
├── contexts/    # AI personas/prompts
└── .vectors/    # SQLite database with embeddings

Tools and MCP integration

MEMEX provides a set of MCP tools to manage guides and contexts. The available actions include getting a specific item, listing items, writing new content, and deleting items for both guides and contexts.

To integrate MEMEX with Claude via MCP, you configure a stdio MCP server entry in your client configuration.

A typical MCP client configuration for MEMEX in JSON looks like this:

{
  "mcpServers": {
    "memex": {
      "command": "/absolute/path/to/memex-mcp/memex",
      "args": ["server"]
    }
  }
}

Available tools

get_guide

Retrieve a single guide by identifier.

list_guides

List all available guides in the Guides collection.

write_guide

Create or update a guide with given content.

delete_guide

Remove a guide from the Guides collection.

get_context

Fetch a specific context by identifier.

list_contexts

List all available contexts in the Contexts collection.

write_context

Create or update a context with given details.

delete_context

Delete a context from the Contexts collection.