Skip to main content
Glama
Membrane MCP
by M-Umr
README.md
# Membrane MCP

Persistent context bridge that prevents "context drift" by syncing project rules and golden code snippets across LLM sessions (Claude Desktop, Cursor, ChatGPT).

> **Status: P0 (skeleton).** The server and CLI are stubs that ship the install layout and config loader. See `membrane_mcp_plan.md` (one level up) for the full phase-by-phase build plan.

## Install (development)

```bash
git clone https://github.com/m-umr/membrane-mcp
cd membrane-mcp
pip install -e ".[dev]"        # or: uv tool install -e .
membrane-mcp --help
context-courier --help
```

## Configuration

Set `MEMBRANE_DATABASE_URL` to any SQLAlchemy-compatible URL. When unset, Membrane uses a SQLite file at `~/.membrane/store.db`.

```bash
# Postgres (recommended for production)
export MEMBRANE_DATABASE_URL="postgresql+psycopg://user:pass@localhost/membrane"

# SQLite (custom path)
export MEMBRANE_DATABASE_URL="sqlite:///./membrane.db"
```

## Build phases

| Phase | What ships |
|---|---|
| **P0** (this) | Repo skeleton, `pyproject.toml`, two console scripts, `MEMBRANE_DATABASE_URL` loader, CI |
| P1a | SQLAlchemy models, repository CRUD, project-name normalization |
| P1b | Alembic migrations, FTS for Postgres + SQLite |
| P2 | FastMCP server with tools + resource (stdio) |
| P3 | Typer CLI subcommands (`save`, `list`, `show`) |
| P4 | OSS polish — Claude Desktop config docs, docker-compose, PyPI release |

## Development

```bash
pytest          # run tests
ruff check .    # lint
ruff format .   # format
```

## License

[MIT](LICENSE)