Skip to main content

MCP Server for Mem-Brain API - Exposes memory operations as MCP tools

Project description

Mem-Brain MCP Server

MCP (Model Context Protocol) server that exposes Mem-Brain API functionality as standardized tools for AI agents. Built with FastMCP for production-ready HTTP/SSE transport.

Underlying HTTP API (tools, async jobs, search patterns): see Membrain API: Guide for Agentic Applications in the parent repo.

Features

  • Memory CRUD and semantic search
  • Search modes: raw (graph-native), interpreted (LLM summary), both (summary + evidence)
  • Graph operations (path + neighborhood)
  • Stats and health endpoints
  • HTTP/SSE transport for remote MCP clients

Authentication

Mem-Brain MCP uses MemBrain API keys.

  • Preferred header in MCP client config: X-API-Key: mb_live_...
  • Also supported: Authorization: Bearer mb_live_...

Installation

PyPI

pip install mem-brain-mcp
mem-brain-mcp

uvx

uvx mem-brain-mcp

Configuration

API_BASE_URL=https://mem-brain-api-cutover-v4-production.up.railway.app
MEMBRAIN_API_KEY=mb_live_xxx   # optional fallback for single-user local runs
MCP_SERVER_HOST=0.0.0.0
MCP_SERVER_PORT=8100
LOG_LEVEL=INFO

MCP Client Examples

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "mem-brain": {
      "url": "http://localhost:8100/mcp",
      "headers": {
        "X-API-Key": "mb_live_xxx"
      }
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "mem-brain": {
      "url": "http://localhost:8100/mcp",
      "headers": {
        "X-API-Key": "mb_live_xxx"
      }
    }
  }
}

Development

pytest

Build / Publish

uv build
uv tool run twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mem_brain_mcp-1.1.5.tar.gz (120.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mem_brain_mcp-1.1.5-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file mem_brain_mcp-1.1.5.tar.gz.

File metadata

  • Download URL: mem_brain_mcp-1.1.5.tar.gz
  • Upload date:
  • Size: 120.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mem_brain_mcp-1.1.5.tar.gz
Algorithm Hash digest
SHA256 cd9b2390a696527eeef21d4a54fb5660bdf33a4dc73db6f0c479aac358bdfecc
MD5 e95bf0500ba3d2c0f184233086a0365e
BLAKE2b-256 368da9a757317f9290b3139be3a2faa5dfe1a38161ba62ce073e1106e6f7dc2a

See more details on using hashes here.

File details

Details for the file mem_brain_mcp-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: mem_brain_mcp-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mem_brain_mcp-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5ab0ab8509c958b4943b0b60d37ebd8298ce34f7add04cc01f7281c8831e505e
MD5 1e78d94dde4bdffc0b1d388c00ccc775
BLAKE2b-256 59859c570967e962a88f9efd1658395d5ed2b463d3b9275e2c16124a639bf486

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page