# Palinode

Keeps project memory in Git-tracked Markdown files for AI agents. It prevents agents from repeating discarded technical choices across coding sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 46
- Author: phasespace-labs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/phasespace-labs/palinode
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/palinode

## What it does

Palinode uses plain Markdown files with YAML headers as the ground truth for agent context. A file watcher updates a single SQLite index that couples FTS5 keyword indexing with vector search. The hybrid engine merges both streams with Reciprocal Rank Fusion. This pairs exact identifier matches with semantic queries.

Periodic compaction consolidates records into clean summaries. Every compaction becomes a Git commit. Your agent can run `palinode_diff`, check lines with `palinode_blame`, or undo bad edits with `palinode_rollback`. Hybrid indexing will fail without Python 3.11+, Git, and Ollama serving the `bge-m3` model or a configured remote endpoint.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `PALINODE_DIR`, `PALINODE_API_HOST`, `PALINODE_API_PORT`, `PALINODE_API_TOKEN`, `PALINODE_API_TOKEN_FILE`, `PALINODE_MCP_HTTP_HOST`, `PALINODE_MCP_HTTP_PORT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PALINODE_DIR=<PALINODE_DIR> --env PALINODE_API_HOST=<PALINODE_API_HOST> --env PALINODE_API_PORT=<PALINODE_API_PORT> --env PALINODE_API_TOKEN=<PALINODE_API_TOKEN> --env PALINODE_API_TOKEN_FILE=<PALINODE_API_TOKEN_FILE> --transport stdio palinode -- uvx palinode
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from palinode <command>

### Codex

**Platform CLI**
```bash
codex mcp add palinode --env PALINODE_DIR=<PALINODE_DIR> --env PALINODE_API_HOST=<PALINODE_API_HOST> --env PALINODE_API_PORT=<PALINODE_API_PORT> --env PALINODE_API_TOKEN=<PALINODE_API_TOKEN> --env PALINODE_API_TOKEN_FILE=<PALINODE_API_TOKEN_FILE> -- uvx palinode
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from palinode <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "palinode": {
            "command": "uvx",
            "args": [
                "palinode"
            ],
            "env": {
                "PALINODE_DIR": "<PALINODE_DIR>",
                "PALINODE_API_HOST": "<PALINODE_API_HOST>",
                "PALINODE_API_PORT": "<PALINODE_API_PORT>",
                "PALINODE_API_TOKEN": "<PALINODE_API_TOKEN>",
                "PALINODE_API_TOKEN_FILE": "<PALINODE_API_TOKEN_FILE>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from palinode <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "palinode": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "palinode"
            ],
            "env": {
                "PALINODE_DIR": "<PALINODE_DIR>",
                "PALINODE_API_HOST": "<PALINODE_API_HOST>",
                "PALINODE_API_PORT": "<PALINODE_API_PORT>",
                "PALINODE_API_TOKEN": "<PALINODE_API_TOKEN>",
                "PALINODE_API_TOKEN_FILE": "<PALINODE_API_TOKEN_FILE>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from palinode <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PALINODE_DIR=<PALINODE_DIR> -e PALINODE_API_HOST=<PALINODE_API_HOST> -e PALINODE_API_PORT=<PALINODE_API_PORT> -e PALINODE_API_TOKEN=<PALINODE_API_TOKEN> -e PALINODE_API_TOKEN_FILE=<PALINODE_API_TOKEN_FILE> palinode uvx palinode
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from palinode <command>

## When to use it
- retain technical decisions across separate agent sessions
- query past project context with hybrid keyword and vector retrieval
- inspect note history with git blame and diff tools
- revert mistaken memory updates via rollback tools

## Example prompts
- Search project memory for why we migrated from SQLite to PostgreSQL.
- Save our architectural decision to adopt Redis for job queues.
- Inspect the blame and diff for the latest database caching note.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
