Skip to content

Commit 5522d34

Browse files
authored
Merge pull request #340 from messelink/fix/mcp-pipx-compat
fix: add mempalace-mcp entry point for pipx/uv compatibility
2 parents 4fb0ee5 + 9e53228 commit 5522d34

12 files changed

Lines changed: 15 additions & 27 deletions

File tree

.claude-plugin/.mcp.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"mempalace": {
3-
"command": "python3",
4-
"args": [
5-
"-m",
6-
"mempalace.mcp_server"
7-
]
3+
"command": "mempalace-mcp"
84
}
95
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
"commands": [],
1010
"mcpServers": {
1111
"mempalace": {
12-
"command": "python3",
13-
"args": [
14-
"-m",
15-
"mempalace.mcp_server"
16-
]
12+
"command": "mempalace-mcp"
1713
}
1814
},
1915
"keywords": [

.codex-plugin/hooks/mempal-hook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33
HOOK_NAME="${1:?Usage: mempal-hook.sh <hook-name>}"
44
INPUT_FILE=$(mktemp) || { echo "Failed to create temp file" >&2; exit 1; }
55
cat > "$INPUT_FILE"
6-
cat "$INPUT_FILE" | python3 -m mempalace hook run --hook "$HOOK_NAME" --harness codex
6+
cat "$INPUT_FILE" | mempalace hook run --hook "$HOOK_NAME" --harness codex
77
EXIT_CODE=$?
88
rm -f "$INPUT_FILE" 2>/dev/null
99
exit $EXIT_CODE

.codex-plugin/plugin.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
"hooks": "./hooks.json",
2222
"mcpServers": {
2323
"mempalace": {
24-
"command": "python3",
25-
"args": [
26-
"-m",
27-
"mempalace.mcp_server"
28-
]
24+
"command": "mempalace-mcp"
2925
}
3026
},
3127
"interface": {

examples/mcp_setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
Run the MCP server:
66

77
```bash
8-
python -m mempalace.mcp_server
8+
mempalace-mcp
99
```
1010

1111
Or add it to Claude Code:
1212

1313
```bash
14-
claude mcp add mempalace -- python -m mempalace.mcp_server
14+
claude mcp add mempalace -- mempalace-mcp
1515
```
1616

1717
## Available Tools

hooks/mempal_precompact_hook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ echo "[$(date '+%H:%M:%S')] PRE-COMPACT triggered for session $SESSION_ID" >> "$
6565
if [ -n "$MEMPAL_DIR" ] && [ -d "$MEMPAL_DIR" ]; then
6666
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6767
REPO_DIR="$(dirname "$SCRIPT_DIR")"
68-
python3 -m mempalace mine "$MEMPAL_DIR" >> "$STATE_DIR/hook.log" 2>&1
68+
mempalace mine "$MEMPAL_DIR" >> "$STATE_DIR/hook.log" 2>&1
6969
fi
7070

7171
# Silent: return empty JSON to not block. "decision": "allow" is invalid —

hooks/mempal_save_hook.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ if [ "$SINCE_LAST" -ge "$SAVE_INTERVAL" ] && [ "$EXCHANGE_COUNT" -gt 0 ]; then
144144
# 1. TRANSCRIPT_PATH (from Claude Code) — mine the directory it lives in
145145
# 2. MEMPAL_DIR (user-configured) — mine that directory
146146
# At least one should work. If neither is set, nothing mines.
147-
PYTHON="$(command -v python3)"
148147
MINE_DIR=""
149148
if [ -n "$TRANSCRIPT_PATH" ] && [ -f "$TRANSCRIPT_PATH" ]; then
150149
MINE_DIR="$(dirname "$TRANSCRIPT_PATH")"
@@ -153,7 +152,7 @@ if [ "$SINCE_LAST" -ge "$SAVE_INTERVAL" ] && [ "$EXCHANGE_COUNT" -gt 0 ]; then
153152
MINE_DIR="$MEMPAL_DIR"
154153
fi
155154
if [ -n "$MINE_DIR" ]; then
156-
"$PYTHON" -m mempalace mine "$MINE_DIR" >> "$STATE_DIR/hook.log" 2>&1 &
155+
mempalace mine "$MINE_DIR" >> "$STATE_DIR/hook.log" 2>&1 &
157156
fi
158157

159158
# MEMPAL_VERBOSE toggle:

mempalace/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def cmd_instructions(args):
367367

368368
def cmd_mcp(args):
369369
"""Show how to wire MemPalace into MCP-capable hosts."""
370-
base_server_cmd = "python -m mempalace.mcp_server"
370+
base_server_cmd = "mempalace-mcp"
371371

372372
if args.palace:
373373
resolved_palace = str(Path(args.palace).expanduser())

mempalace/instructions/init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If this fails, report the error and stop.
4949

5050
Run the following command to register the MemPalace MCP server with Claude:
5151

52-
claude mcp add mempalace -- python -m mempalace.mcp_server
52+
claude mcp add mempalace -- mempalace-mcp
5353

5454
If this fails, report the error but continue to the next step (MCP
5555
configuration can be done manually later).

mempalace/mcp_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
MemPalace MCP Server — read/write palace access for Claude Code
44
================================================================
5-
Install: claude mcp add mempalace -- python -m mempalace.mcp_server [--palace /path/to/palace]
5+
Install: claude mcp add mempalace -- mempalace-mcp [--palace /path/to/palace]
66
77
Tools (read):
88
mempalace_status — total drawers, wing/room breakdown

0 commit comments

Comments
 (0)