@mempalace/mcp-dev
@mempalace/mcp-dev gives AI coding assistants grounded, branch-scoped codebase context via semantic search, git tracking, a change ledger, dev lifecycle tools, and structured feature management (Conductor).
Semantic Code Search
search_code— Natural-language search over your indexed codebase (optional namespace scoping, 1–50 results)mine_changed_files— Re-index files changed since the last commit to keep the search index current
Git & Branch Context
get_branch_context— Current branch name, HEAD SHA, and recent commitsget_changed_files— Files changed since a base ref with add/modify/delete statusget_git_diff— Full unified diff between two refs, optionally scoped to a single file
Change Ledger
log_change— Append a structured entry (files affected, description, reason, tags, optional track link)get_session_changes— All changes logged in a specific sessionget_file_ledger— All changes that touched a specific fileget_all_changes— All ledger entries, optionally filtered by timestamp
Dev Lifecycle
run_typecheck— Runtsc --noEmitin a service directory; returns structured TypeScript errors (file, line, column, message)run_tests— Run Jest tests with optional name-pattern filtering; returns pass/fail counts and structured failure details
Project Tracks (Conductor)
list_tracks— List all live feature trackscreate_track— Scaffold a new track withplan.md,index.md, andmetadata.jsonget_track_plan/update_track_plan— Read/overwrite the task list for a trackget_track_spec/update_track_spec— Read/overwrite the technical specget_track_index/update_track_index— Read/overwrite the track summary and status
Provides tools for retrieving branch context (current branch, SHA, recent commits), changed files, and git diffs within a repository.
Enables running Jest tests directly from the MCP client, returning pass/fail counts and structured failure details.
Allows running TypeScript type checking (tsc --noEmit) in a service directory, returning structured errors with file, line, column, and code.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@mempalace/mcp-dev Search my codebase for payment processing functions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mempalace-mcp-dev
An MCP (Model Context Protocol) server that gives AI coding assistants grounded, branch-scoped context about your codebase. It provides semantic code search via my MemPalace fork, git change tracking, a persistent change ledger, TypeScript/Jest dev lifecycle tools, and a built-in Project Tracks (Conductor) methodology for structured feature work.
Features
Feature | Description |
Semantic code search | Natural-language queries over your indexed codebase via MemPalace embeddings |
Branch context | Current branch, SHA, recent commits — always oriented |
Change ledger | Append-only JSONL log of every AI-assisted change with full provenance |
Dev lifecycle | Run |
Git diff | Full or file-scoped diff output |
Project Tracks | Create and manage markdown-based feature tracks (plan/spec/index/metadata) |
Related MCP server: MCP Memory Keeper
Prerequisites
Node.js ≥ 18
Python ≥ 3.9
A git repository to point at
Important: MemPalace Fork Required
⚠️ This MCP server requires a custom fork of MemPalace with multi-branch exclude-patterns support. The official
pip install mempalacepackage will not work — you must use my fork (branchfeat/exclude-patterns-config).
The easiest way to get this set up is the setup script (see Quick Start).
Quick Start
1. Run the setup script (recommended)
The fastest way to get up and running is the bootstrap script at
scripts/setup-mempalace.sh. It handles the entire MemPalace setup:
Clones my fork with the required exclude-patterns support
Creates a Python virtual environment
Installs the fork in editable mode
Symlinks the
mempalaceCLI to~/.local/binPrepares the palace data directory
Optionally runs the initial codebase index
# From the repo root:
./scripts/setup-mempalace.sh
# To also index your codebase right away:
./scripts/setup-mempalace.sh --mineThe script is fully configurable via environment variables:
Env var | Default | Description |
|
| My fork with required exclude-patterns support |
|
| Branch containing the feature |
|
| Where to clone the fork |
|
| Python venv location |
|
| Palace data directory |
|
| Palace wing (namespace) |
|
| Source code to mine |
After the script finishes, check that everything works:
mempalace --version
mempalace --palace ~/.mempalace/active status2. Clone and build the MCP server
This is not published to npm. Clone and build locally:
git clone https://github.com/2loch-ness6/mempalace-mcp-dev
cd mempalace-mcp-dev
npm install
npm run buildAfter building, you can use npm link to make mempalace-mcp-dev available globally:
npm link
# Now this works from anywhere:
mempalace-mcp-dev3. Configure environment variables
export MCP_REPO_DIR=/path/to/your/repo # defaults to process.cwd()
export MCP_PALACE_DIR=~/.mempalace/active # MemPalace data directory
export MCP_PALACE_WING=code # wing name (namespace) for your repo
export MEMPALACE_PYTHON=/path/to/venv/bin/python3 # python with fork installedIf you used the setup script, set
MEMPALACE_PYTHONto$HOME/.mempalace/bin/python3(or whereverMEMPALACE_VENV_DIRpoints).
4. Add to your MCP client config
For Claude Desktop and other MCP clients:
{
"mcpServers": {
"mempalace-mcp-dev": {
"command": "node",
"args": ["/path/to/mempalace-mcp-dev/dist/index.js"],
"env": {
"MCP_REPO_DIR": "/path/to/your/repo",
"MCP_PALACE_DIR": "/home/you/.mempalace/active",
"MCP_PALACE_WING": "code",
"MEMPALACE_PYTHON": "/home/you/.mempalace/bin/python3"
}
}
}
}If you ran npm link, you can also use the shorter form:
{
"mcpServers": {
"mempalace-mcp-dev": {
"command": "mempalace-mcp-dev",
"env": {
"MCP_REPO_DIR": "/path/to/your/repo",
"MCP_PALACE_DIR": "/home/you/.mempalace/active",
"MCP_PALACE_WING": "code",
"MEMPALACE_PYTHON": "python3"
}
}
}
}Environment Variables
Variable | Default | Description |
|
| Absolute path to your git repository root |
|
| MemPalace data directory |
|
| Wing (namespace) name within the palace |
|
| Path to the change ledger file |
|
| Directory containing project track folders |
|
| Python binary (must have the MemPalace fork installed) |
MCP Tools Reference
Code Search
Tool | Description |
| Semantic search over indexed codebase. Accepts |
| Re-index files changed since the last git commit. Call after editing to keep search current |
Branch & Git
Tool | Description |
| Returns current branch, SHA, short SHA, and last 5 commit messages |
| Files changed vs |
| Full diff output. Optional |
Change Ledger
Tool | Description |
| Append an entry to the ledger (files affected, description, reason, tags, optional track link) |
| Read recent ledger entries. Optional |
Dev Lifecycle
Tool | Description |
| Run |
| Run Jest in a service directory. Returns pass/fail counts and structured failure details |
Project Tracks (Conductor)
Tool | Description |
| List all live tracks (directories containing |
| Read |
| Overwrite |
| Read |
| Overwrite |
| Read |
| Overwrite |
| Scaffold a new track directory with all four files |
Project Tracks Methodology (Conductor)
Project Tracks is a lightweight, file-based feature management system. Each track is a directory containing up to four files:
conductor/tracks/
└── my-feature-20260501/
├── plan.md ← living task list; the status source of truth
├── spec.md ← technical spec, design decisions, acceptance criteria
├── index.md ← short summary and linked resources
└── metadata.json ← machine-readable metadata (id, owner, status, dates)Rules:
A directory is a live track only if it contains
plan.md.plan.mdis always read/written live from disk (never via MemPalace — no staleness).Track slugs must match
[a-zA-Z0-9][a-zA-Z0-9_-]*(max 100 chars).
Bootstrapping tracks in a new project:
# Create the tracks directory
mkdir -p conductor/tracks
# Use the MCP tool to scaffold a track
# (or copy from templates/track/ in this package)Template files are included in templates/track/ for manual scaffolding.
MemPalace Configuration (mempalace.yaml)
Place a mempalace.yaml at the root of MCP_REPO_DIR to control how files are indexed. A generic example is provided in mempalace.yaml.example.
Key sections:
wing— must matchMCP_PALACE_WINGexclude_patterns— gitignore-syntax patterns to skip during miningrooms— semantic routing rules (keyword → room name) for search scoping
Development
git clone https://github.com/2loch-ness6/mempalace-mcp-dev
cd mempalace-mcp-dev
npm install
npm run build
npm testSee CONTRIBUTING.md for contribution guidelines.
License
MIT — see LICENSE.
Available Tools
19 toolscreate_trackB
Create a new conductor track directory with plan.md, index.md, and metadata.json. Fails if the slug already exists.
Inputs: slug (required), title (required), type, owner.
get_all_changesC
Get all changes in the ledger, optionally filtered by ISO timestamp.
Inputs: since.
get_branch_contextA
Get the current git branch, HEAD SHA, and recent commits. Always call this first to anchor your context to the correct branch.
Inputs: no named parameters.
get_changed_filesA
List files changed since a base ref (default: HEAD~1). Useful to understand scope of recent changes.
Inputs: base.
get_file_ledgerA
Get all logged changes that touched a specific file path. Use to understand the change history of a file before modifying it.
Inputs: filePath (required).
get_git_diffA
Get the full unified diff between two refs (default: HEAD~1..HEAD). Returns diff text, file list, and addition/deletion counts. Use to review changes before logging them to the ledger.
Inputs: base, file.
get_session_changesB
Retrieve all changes logged in the current session. Use at session start to understand what was done previously.
Inputs: sessionId (required).
get_track_indexB
Read the index.md for a specific conductor track. Returns the live track overview and summary.
Inputs: trackName (required).
get_track_planA
Read the plan.md for a specific conductor track. Returns live file content — not docs, not memory.
Inputs: trackName (required).
get_track_specB
Read the spec.md for a specific conductor track. Returns the live technical specification.
Inputs: trackName (required).
list_tracksA
List all live conductor tracks (only tracks with a plan.md are returned). Use to understand current work in progress.
Inputs: no named parameters.
log_changeA
Log a code change to the persistent change ledger. Models MUST call this after modifying files. Enables cross-session coherence.
Inputs: sessionId (required), model (required), filesAffected (required), description (required), +4 more.
mine_changed_filesA
Re-index files changed since last commit into MemPalace. Call after making code changes to keep the search index current.
Inputs: no named parameters.
run_testsA
Run Jest tests for a service. Returns pass/fail counts and structured failure details with test names and error messages. Optionally scope to a test name pattern.
Inputs: servicePath (required), pattern.
run_typecheckA
Run TypeScript type-checking (tsc --noEmit) for a service. Returns structured errors with file, line, column, and message. Call after writing code to verify correctness before committing.
Inputs: servicePath (required).
search_codeA
Semantic search over the current branch's code. Returns branch-stamped results from MemPalace. Never searches docs or config.
Inputs: query (required), limit, scope.
update_track_indexB
Overwrite index.md for an existing conductor track. Use to update the track summary, status, or linked resources.
Inputs: trackName (required), content (required).
update_track_planA
Overwrite the plan.md for an existing conductor track with new content. The track must already exist. Use this to update task status, add phases, or record decisions.
Inputs: trackName (required), content (required).
update_track_specA
Overwrite spec.md for an existing conductor track. Use to update technical decisions, architecture notes, or acceptance criteria.
Inputs: trackName (required), content (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a specific resource or action with clear boundaries. For example, get_all_changes vs get_session_changes are distinguished by persistence scope, and get_git_diff vs get_changed_files provide different levels of detail.
All tools follow a consistent verb_noun pattern using snake_case (e.g., create_track, get_branch_context, run_tests). The naming is predictable and easy to understand.
With 19 tools, the server is slightly above the ideal range of 3-15, but the count is justified by covering two distinct domains (track management and code change tracking) plus code quality checks. The set is well-scoped without being overwhelming.
Core workflows for track management and change logging are covered (create, read, update, log). Minor gaps exist: no delete_track tool and limited git operations (no commit/push), but these are acceptable for the intended assistant role.
Maintenance
Related MCP Connectors
The context platform for AI agents: code search, team decisions, and grounded project context.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Intelligent context infrastructure for AI teams: knowledge graph, sessions, tasks, documents.
One searchable history across every AI coding tool, with secret scanning and a shared task board.
Related MCP Servers
- AlicenseBqualityDmaintenanceGives AI coding assistants persistent memory, safety controls, and project awareness by tracking coding sessions, protecting critical files from modifications, and managing approval workflows with automatic changelog generation.1916 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding assistants to persistently save, search, checkpoint, and restore context across sessions, with channels, file caching, git integration, and sharing between parallel sessions.195 npmMIT
- AlicenseNot gradedqualityAmaintenanceIt enables AI coding assistants to preserve and share project context across sessions through save/restore, search, checkpoints, channels, and git-aware storage.195 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding assistants to persistently save, search, checkpoint, and restore project context across sessions, including decisions, progress, and file state. It supports shared channels, git-aware organization, and batch operations for long-running or parallel development workflows.195 npmMIT