A lightweight LM Studio Plugin wrapper around the
MemPalace MCP server. It re-exposes
all 45 MemPalace MCP tools in two complementary ways, without ever editing
the original Python source tree (so git pull inside MemPalace/ keeps working):
src/toolsProvider.ts).dist/mcp.js, see
npm run mcp).Both entry points share one catalog (src/core/tools-catalog.ts) and one
long-lived bridge (src/core/python-bridge.ts). The TypeScript layer is purely
a thin, type-safe proxy in front of the real Python server.
Bottom line: you write nothing about MemPalace's internals here. The wrapper only spawns, talks, and forwards. MemPalace stays the source of truth and stays updatable.
MemPalace is a local-first AI memory store. It keeps your conversation history as verbatim text and retrieves it with semantic search — it does not summarize, extract, or paraphrase. The index is structured: people and projects become wings, topics become rooms, and original content lives in drawers. Retrieval is pluggable (ChromaDB by default) and nothing leaves your machine unless you opt in.
mempalace-mcp simply makes that palace reachable from LM Studio and any other
MCP client through a consistent 45-tool surface.
Key design decisions:
| Concern | Decision | Why |
|---|---|---|
| Tool definitions | Transcribed verbatim from Python schemas.py TOOLS into tools-catalog.ts | One source of truth for both entry points; re-derivable on demand. |
| Talking to Python | A persistent MCP client over stdio (python-bridge.ts) | One spawn reused across calls instead of spawning per tool. |
| Parameter typing | Each tool's JSON schema is mapped to a Zod schema (zod-from-json.ts) | Type safety + automatic inputSchema for both the LM Studio and MCP surfaces. |
| Python environment | Provisioned by scripts/setup.cjs at postinstall | Keeps MemPalace/ a clean git checkout you can update. |
| Palace path / read-only | Configured via Plugin global config, passed to the Python server at spawn time | No secrets baked into source; per-user palace location. |
This project was built as a port, not a rewrite. The steps that mattered:
The plugin is CommonJS on purpose:
lms dev/Hub bundles it with esbuild as CJS, so the package must load as CJS too. The source therefore uses__dirname(notimport.meta) to locate.venv, and the entry exports amain(pluginContext)function thatlmsinvokes to register the provider.
Once published, install straight from the Hub. On first load, npm runs the
postinstall hook, which:
https://github.com/MemPalace/mempalace into MemPalace/,.venv/,pip install -e ./MemPalace to provision the palace + deps.Then open Plugins → mempalace-mcp, enable it, and set Palace Path in its global configuration. The first tool call spawns the Python server; the connection is cached for subsequent calls.
npm install alone is not proof that MCP is connected — see Verifying the
connection below.
Every tool mirrors its Python counterpart exactly. They fall into eight groups.
| Tool | Purpose |
|---|---|
mempalace_status | Palace overview — total drawers, wing/room counts |
mempalace_list_wings | List all wings with drawer counts |
mempalace_list_rooms | List rooms within a wing (or all rooms) |
mempalace_get_taxonomy | Full wing → room → count tree |
mempalace_get_aaak_spec | The AAAK compressed-memory dialect spec |
mempalace_graph_stats | Graph overview: rooms, tunnels, edges |
mempalace_mesh_peers | Shared-brain replica/mesh estate snapshot (RFC 004) |
mempalace_traverse, mempalace_find_tunnels, mempalace_create_tunnel,
mempalace_list_tunnels, mempalace_delete_tunnel, mempalace_list_hallways,
mempalace_delete_hallway, mempalace_follow_tunnels
mempalace_search, mempalace_check_duplicate, mempalace_get_drawer,
mempalace_list_drawers
mempalace_add_drawer, mempalace_update_drawer, mempalace_delete_drawer,
mempalace_delete_by_source, mempalace_mine, mempalace_checkpoint,
mempalace_sync
mempalace_kg_query, mempalace_kg_add, mempalace_kg_invalidate,
mempalace_kg_supersede, mempalace_kg_timeline, mempalace_kg_stats
mempalace_diary_write, mempalace_diary_read, mempalace_hook_settings,
mempalace_memories_filed_away
mempalace_event_append, mempalace_task_create, mempalace_event_list,
mempalace_event_wait, mempalace_event_ack, mempalace_artifact_put,
mempalace_artifact_get, mempalace_patch_submit
mempalace_reconnect — force a reconnect to the palace DB after external writes.
Need the exact argument schema for a tool? It is defined in
src/core/tools-catalog.tsand validated by Zod on both surfaces.
Enable the plugin, set Palace Path (and optionally Read-only mode) in its global config, then let the model call tools during a session. The provider registers all 45 tools automatically; the model sees their descriptions and can invoke any of them.
Add it to any MCP client via stdio:
Or run it directly and talk to it over stdio:
mcp.ts reads MEMPALACE_PALACE_PATH / MEMPALACE_MCP_READ_ONLY from the
environment when no explicit config is supplied.
Package installation alone does not prove MCP is connected. Confirm the live tool list:
The first call spawns python -m mempalace.mcp_server; a healthy response
(mempalace_status returning counts, or a graceful "no palace yet" message)
means the bridge is wired correctly.
MemPalace ships examples and skills that describe how agents should set
up, recall from, and coordinate via the palace. mempalace-mcp is the transport
that lets your agent actually execute those patterns — whether you run them in
LM Studio or through another MCP harness. The sections below map each upstream
resource to the concrete tool calls it triggers.
MemPalace/examples/ — runnable recipes & wiring guides| File | What it shows | Tool surface used |
|---|---|---|
basic_mining.py | Mine a project folder: init → mine → search | mempalace_mine, mempalace_search, mempalace_status |
convo_import.py | Import Claude Code / ChatGPT transcripts (--mode convos) | mempalace_mine (with mode="convos") |
mx3_public_shim_embeddings_rerank.py (+.md) | Route Chroma embeddings + post-retrieval rerank through a local MX3 public-shim endpoint (opt-in, hardware-backed) | mempalace_search after env-var configuration |
antigravity/ (README.md, hooks.json, mcp_config.json) | Wire MemPalace into the Antigravity CLI over MCP | { "mcpServers": { "mempalace": { "command": "mempalace-mcp" } } } |
cursor/ (README.md, hooks.json, rules/*.mdc) | Cursor IDE hooks + recall rules that run before context compression | auto-save hooks → / |
How to use them with mempalace-mcp:
MemPalace/skills/ — agent runbooksMemPalace exposes three skills (agent-runbook markdown consumed by coding
agents). mempalace-mcp is the MCP surface each skill assumes is connected.
skills/mempalace/SKILL.md; confirm the 45 tools are live.mempalace_mine your corpus (code, convos, or office docs)..venv/ by scripts/setup.cjs).minilm, ~300 MB ); read-only
sqlite-backed tools (, list, taxonomy, KG) stay fast.No API key is required for the core recall path.
python3 on PATH is a broken symlink (empty
sys.executable), setup.cjs falls back to absolute interpreter paths under
.PRs welcome. When adding or renaming a tool, update src/core/tools-catalog.ts
to match MemPalace/mempalace/mcp_server/schemas.py so both entry points stay
in sync.
MIT — see LICENSE.
A lightweight LM Studio Plugin wrapper around the
MemPalace MCP server. It re-exposes
all 45 MemPalace MCP tools in two complementary ways, without ever editing
the original Python source tree (so git pull inside MemPalace/ keeps working):
src/toolsProvider.ts).dist/mcp.js, see
npm run mcp).Both entry points share one catalog (src/core/tools-catalog.ts) and one
long-lived bridge (src/core/python-bridge.ts). The TypeScript layer is purely
a thin, type-safe proxy in front of the real Python server.
Bottom line: you write nothing about MemPalace's internals here. The wrapper only spawns, talks, and forwards. MemPalace stays the source of truth and stays updatable.
MemPalace is a local-first AI memory store. It keeps your conversation history as verbatim text and retrieves it with semantic search — it does not summarize, extract, or paraphrase. The index is structured: people and projects become wings, topics become rooms, and original content lives in drawers. Retrieval is pluggable (ChromaDB by default) and nothing leaves your machine unless you opt in.
mempalace-mcp simply makes that palace reachable from LM Studio and any other
MCP client through a consistent 45-tool surface.
Key design decisions:
| Concern | Decision | Why |
|---|---|---|
| Tool definitions | Transcribed verbatim from Python schemas.py TOOLS into tools-catalog.ts | One source of truth for both entry points; re-derivable on demand. |
| Talking to Python | A persistent MCP client over stdio (python-bridge.ts) | One spawn reused across calls instead of spawning per tool. |
| Parameter typing | Each tool's JSON schema is mapped to a Zod schema (zod-from-json.ts) | Type safety + automatic inputSchema for both the LM Studio and MCP surfaces. |
| Python environment | Provisioned by scripts/setup.cjs at postinstall | Keeps MemPalace/ a clean git checkout you can update. |
| Palace path / read-only | Configured via Plugin global config, passed to the Python server at spawn time | No secrets baked into source; per-user palace location. |
This project was built as a port, not a rewrite. The steps that mattered:
The plugin is CommonJS on purpose:
lms dev/Hub bundles it with esbuild as CJS, so the package must load as CJS too. The source therefore uses__dirname(notimport.meta) to locate.venv, and the entry exports amain(pluginContext)function thatlmsinvokes to register the provider.
Once published, install straight from the Hub. On first load, npm runs the
postinstall hook, which:
https://github.com/MemPalace/mempalace into MemPalace/,.venv/,pip install -e ./MemPalace to provision the palace + deps.Then open Plugins → mempalace-mcp, enable it, and set Palace Path in its global configuration. The first tool call spawns the Python server; the connection is cached for subsequent calls.
npm install alone is not proof that MCP is connected — see Verifying the
connection below.
Every tool mirrors its Python counterpart exactly. They fall into eight groups.
| Tool | Purpose |
|---|---|
mempalace_status | Palace overview — total drawers, wing/room counts |
mempalace_list_wings | List all wings with drawer counts |
mempalace_list_rooms | List rooms within a wing (or all rooms) |
mempalace_get_taxonomy | Full wing → room → count tree |
mempalace_get_aaak_spec | The AAAK compressed-memory dialect spec |
mempalace_graph_stats | Graph overview: rooms, tunnels, edges |
mempalace_mesh_peers | Shared-brain replica/mesh estate snapshot (RFC 004) |
mempalace_traverse, mempalace_find_tunnels, mempalace_create_tunnel,
mempalace_list_tunnels, mempalace_delete_tunnel, mempalace_list_hallways,
mempalace_delete_hallway, mempalace_follow_tunnels
mempalace_search, mempalace_check_duplicate, mempalace_get_drawer,
mempalace_list_drawers
mempalace_add_drawer, mempalace_update_drawer, mempalace_delete_drawer,
mempalace_delete_by_source, mempalace_mine, mempalace_checkpoint,
mempalace_sync
mempalace_kg_query, mempalace_kg_add, mempalace_kg_invalidate,
mempalace_kg_supersede, mempalace_kg_timeline, mempalace_kg_stats
mempalace_diary_write, mempalace_diary_read, mempalace_hook_settings,
mempalace_memories_filed_away
mempalace_event_append, mempalace_task_create, mempalace_event_list,
mempalace_event_wait, mempalace_event_ack, mempalace_artifact_put,
mempalace_artifact_get, mempalace_patch_submit
mempalace_reconnect — force a reconnect to the palace DB after external writes.
Need the exact argument schema for a tool? It is defined in
src/core/tools-catalog.tsand validated by Zod on both surfaces.
Enable the plugin, set Palace Path (and optionally Read-only mode) in its global config, then let the model call tools during a session. The provider registers all 45 tools automatically; the model sees their descriptions and can invoke any of them.
Add it to any MCP client via stdio:
Or run it directly and talk to it over stdio:
mcp.ts reads MEMPALACE_PALACE_PATH / MEMPALACE_MCP_READ_ONLY from the
environment when no explicit config is supplied.
Package installation alone does not prove MCP is connected. Confirm the live tool list:
The first call spawns python -m mempalace.mcp_server; a healthy response
(mempalace_status returning counts, or a graceful "no palace yet" message)
means the bridge is wired correctly.
MemPalace ships examples and skills that describe how agents should set
up, recall from, and coordinate via the palace. mempalace-mcp is the transport
that lets your agent actually execute those patterns — whether you run them in
LM Studio or through another MCP harness. The sections below map each upstream
resource to the concrete tool calls it triggers.
MemPalace/examples/ — runnable recipes & wiring guides| File | What it shows | Tool surface used |
|---|---|---|
basic_mining.py | Mine a project folder: init → mine → search | mempalace_mine, mempalace_search, mempalace_status |
convo_import.py | Import Claude Code / ChatGPT transcripts (--mode convos) | mempalace_mine (with mode="convos") |
mx3_public_shim_embeddings_rerank.py (+.md) | Route Chroma embeddings + post-retrieval rerank through a local MX3 public-shim endpoint (opt-in, hardware-backed) | mempalace_search after env-var configuration |
antigravity/ (README.md, hooks.json, mcp_config.json) | Wire MemPalace into the Antigravity CLI over MCP | { "mcpServers": { "mempalace": { "command": "mempalace-mcp" } } } |
cursor/ (README.md, hooks.json, rules/*.mdc) | Cursor IDE hooks + recall rules that run before context compression | auto-save hooks → / |
How to use them with mempalace-mcp:
MemPalace/skills/ — agent runbooksMemPalace exposes three skills (agent-runbook markdown consumed by coding
agents). mempalace-mcp is the MCP surface each skill assumes is connected.
skills/mempalace/SKILL.md; confirm the 45 tools are live.mempalace_mine your corpus (code, convos, or office docs)..venv/ by scripts/setup.cjs).minilm, ~300 MB ); read-only
sqlite-backed tools (, list, taxonomy, KG) stay fast.No API key is required for the core recall path.
python3 on PATH is a broken symlink (empty
sys.executable), setup.cjs falls back to absolute interpreter paths under
.PRs welcome. When adding or renaming a tool, update src/core/tools-catalog.ts
to match MemPalace/mempalace/mcp_server/schemas.py so both entry points stay
in sync.
MIT — see LICENSE.
MemPalace/mempalace/mcp_server/schemas.py (TOOLS). We transcribed each
tool's name, description, and JSON schema verbatim into
src/core/tools-catalog.ts. Nothing is hand-rolled per tool.python-bridge.ts uses @modelcontextprotocol/sdk as an MCP client and
spawns python -m mempalace.mcp_server once, reusing that connection. The
wrapper only forwards arguments and shapes results.toolsProvider.ts (LM
Studio) and mcp.ts (standalone MCP) iterate the same catalog, so the two
surfaces can never drift apart.MemPalace/ is a git clone managed by
scripts/setup.cjs. We never edit it, so upstream fixes and new tools land
through a plain git pull and this catalog can be regenerated.postinstall script clones MemPalace,
builds a Python venv, and installs the package (plus chromadb, numpy,
onnxruntime, …) into it — so npm install leaves a working palace behind.mempalace_checkpointmempalace_diary_writegemini_cli_setup.md | Set up MemPalace from the Gemini CLI | MCP stdio registration |
mcp_setup.md | Minimal Claude Code MCP integration (claude mcp add mempalace -- mempalace-mcp) | live tool list (mempalace_status, mempalace_search, mempalace_list_wings) |
HOOKS_TUTORIAL.md | Auto-save hook configuration across harnesses | hook-driven writes to the palace |
mempalace_mine at the directory you want the
agent to remember (code, docs, or transcripts). For Claude Code sessions:
mempalace_mine with mode="convos" over your ~/.claude/projects/ tree — the
shape matches convo_import.py.mempalace_search with a short, keyword-only
query (≤ 250 chars — never paste a whole conversation or system prompt). Use
wing / room filters to scope, and limit (default 5) to bound results.mx3_public_shim recipe
is opt-in and requires the accelerator behind the endpoint; enable it via the
documented MEMPALACE_MX3_PUBLIC_SHIM_* env vars, then call mempalace_search
as usual.skills/mempalace/SKILL.md — Install, configure, and operate. Guided
setup for a private local palace, a shared-brain hub, or a client joining an
existing hub. Covers detecting the harness, choosing topology, configuring MCP,
and reporting readiness. Through mempalace-mcp this becomes: spawn the Python
server, verify tools/list shows the 45 tools, then operate via
mempalace_status, mempalace_mine, mempalace_list_wings, etc.
skills/mempalace-recall/SKILL.md — Search-before-answer recall. The core
agent discipline: read the palace instead of guessing from model memory. Key
mappings through mempalace-mcp:
mempalace_search; use mempalace_kg_query for relational or
time-bound facts (as_of).mempalace_diary_write; when a fact changes, use
mempalace_kg_supersede (single-valued replacement), mempalace_kg_invalidate
(ended without replacement), or mempalace_kg_add (independent/coexisting).mempalace_search returns.skills/mempalace-task/SKILL.md — Logstream task delegation. Move work
between agents via the logstream (not memory drawers). Through mempalace-mcp:
mempalace_task_create (returns a ready-to-paste line).mempalace_event_list / mempalace_event_wait,
carrying since_event_id forward as a resume cursor.mempalace_event_ack(status="claimed"), deliver patches via
mempalace_patch_submit, and reference stored files with
mempalace_artifact_put / mempalace_artifact_get.skills/mempalace-recall/SKILL.md: search first, quote
verbatim, write diary continuity with mempalace_diary_write.skills/mempalace-task/SKILL.md and the logstream tools.embeddinggemmamempalace_statusembedding_model: "openai-compat" in MemPalace's config — no content
leaves your network when the endpoint is local./usr/bin/python3.*--read-only; mutating tools
(writes, mine, checkpoint, coordination) are refused, which is useful for
pure recall sessions. LM Studio Plugin tool loop Any MCP client
│ │
└──────────┬───────────────────┘
│
┌────────────────▼─────────────────┐
│ src/index.ts → main(context) │ (registers both)
└───────────────┬──────────────────┘
┌──────────────┴──────────────┐
▼ ▼
src/toolsProvider.ts src/mcp.ts
(LM Studio Tool API, zod params) (standalone MCP server)
│ │
└───────────────┬──────────────┘
│
src/core/tools-catalog.ts ← single source of truth
(name + description + JSON schema for all 45 tools)
│
src/core/python-bridge.ts
(spawns the Python server once, reuses the connection)
│
┌───────────────┴───────────────┐
▼ ▼
python -m mempalace.mcp_server MemPalace palace
(stdio JSON-RPC, unmodified) (ChromaDB / SQLite / KG / logstream)
mempalace-mcp/
├── manifest.json # LM Studio Plugin manifest (owner kebab-case)
├── package.json # deps, scripts ("postinstall" provisions the venv), bin
├── tsconfig.json # NodeNext ESM-style TS → compiled to dist/
├── README.md
├── scripts/
│ └── setup.cjs # postinstall: clone + venv + pip install MemPalace
├── src/
│ ├── index.ts # Plugin entry → exports main(pluginContext)
│ ├── toolsProvider.ts # LM Studio tool provider (all 45 tools)
│ ├── config.ts # Global config schematics (Palace Path, Read-only)
│ ├── mcp.ts # Standalone MCP server entry (npm run mcp)
│ └── core/
│ ├── python-bridge.ts # Spawns + talks to the Python MCP server
│ ├── tools-catalog.ts # Authoritative list of all 45 tools
│ ├── zod-from-json.ts # JSON schema → Zod conversion
│ └── format-result.ts # Result shaping for both surfaces
└── dist/ # Compiled JavaScript (output of `npm run build`)
npm install # runs postinstall: clone + venv + pip install
npm run typecheck # tsc --noEmit
npm run build # tsc → dist/
lms dev # load into LM Studio (hot-reload)
lms push # publish to the Hub
{
"mcpServers": {
"mempalace-mcp-lms": {
"command": "node",
"args": ["/absolute/path/to/project/dist/mcp.js"]
}
}
}
npm run build && npm run mcp
# standalone
node dist/mcp.js # then call tools/list over stdio
# or, inside LM Studio, open the tool panel and confirm all 45 tools appear
MemPalace/mempalace/mcp_server/schemas.py (TOOLS). We transcribed each
tool's name, description, and JSON schema verbatim into
src/core/tools-catalog.ts. Nothing is hand-rolled per tool.python-bridge.ts uses @modelcontextprotocol/sdk as an MCP client and
spawns python -m mempalace.mcp_server once, reusing that connection. The
wrapper only forwards arguments and shapes results.toolsProvider.ts (LM
Studio) and mcp.ts (standalone MCP) iterate the same catalog, so the two
surfaces can never drift apart.MemPalace/ is a git clone managed by
scripts/setup.cjs. We never edit it, so upstream fixes and new tools land
through a plain git pull and this catalog can be regenerated.postinstall script clones MemPalace,
builds a Python venv, and installs the package (plus chromadb, numpy,
onnxruntime, …) into it — so npm install leaves a working palace behind.mempalace_checkpointmempalace_diary_writegemini_cli_setup.md | Set up MemPalace from the Gemini CLI | MCP stdio registration |
mcp_setup.md | Minimal Claude Code MCP integration (claude mcp add mempalace -- mempalace-mcp) | live tool list (mempalace_status, mempalace_search, mempalace_list_wings) |
HOOKS_TUTORIAL.md | Auto-save hook configuration across harnesses | hook-driven writes to the palace |
mempalace_mine at the directory you want the
agent to remember (code, docs, or transcripts). For Claude Code sessions:
mempalace_mine with mode="convos" over your ~/.claude/projects/ tree — the
shape matches convo_import.py.mempalace_search with a short, keyword-only
query (≤ 250 chars — never paste a whole conversation or system prompt). Use
wing / room filters to scope, and limit (default 5) to bound results.mx3_public_shim recipe
is opt-in and requires the accelerator behind the endpoint; enable it via the
documented MEMPALACE_MX3_PUBLIC_SHIM_* env vars, then call mempalace_search
as usual.skills/mempalace/SKILL.md — Install, configure, and operate. Guided
setup for a private local palace, a shared-brain hub, or a client joining an
existing hub. Covers detecting the harness, choosing topology, configuring MCP,
and reporting readiness. Through mempalace-mcp this becomes: spawn the Python
server, verify tools/list shows the 45 tools, then operate via
mempalace_status, mempalace_mine, mempalace_list_wings, etc.
skills/mempalace-recall/SKILL.md — Search-before-answer recall. The core
agent discipline: read the palace instead of guessing from model memory. Key
mappings through mempalace-mcp:
mempalace_search; use mempalace_kg_query for relational or
time-bound facts (as_of).mempalace_diary_write; when a fact changes, use
mempalace_kg_supersede (single-valued replacement), mempalace_kg_invalidate
(ended without replacement), or mempalace_kg_add (independent/coexisting).mempalace_search returns.skills/mempalace-task/SKILL.md — Logstream task delegation. Move work
between agents via the logstream (not memory drawers). Through mempalace-mcp:
mempalace_task_create (returns a ready-to-paste line).mempalace_event_list / mempalace_event_wait,
carrying since_event_id forward as a resume cursor.mempalace_event_ack(status="claimed"), deliver patches via
mempalace_patch_submit, and reference stored files with
mempalace_artifact_put / mempalace_artifact_get.skills/mempalace-recall/SKILL.md: search first, quote
verbatim, write diary continuity with mempalace_diary_write.skills/mempalace-task/SKILL.md and the logstream tools.embeddinggemmamempalace_statusembedding_model: "openai-compat" in MemPalace's config — no content
leaves your network when the endpoint is local./usr/bin/python3.*--read-only; mutating tools
(writes, mine, checkpoint, coordination) are refused, which is useful for
pure recall sessions. LM Studio Plugin tool loop Any MCP client
│ │
└──────────┬───────────────────┘
│
┌────────────────▼─────────────────┐
│ src/index.ts → main(context) │ (registers both)
└───────────────┬──────────────────┘
┌──────────────┴──────────────┐
▼ ▼
src/toolsProvider.ts src/mcp.ts
(LM Studio Tool API, zod params) (standalone MCP server)
│ │
└───────────────┬──────────────┘
│
src/core/tools-catalog.ts ← single source of truth
(name + description + JSON schema for all 45 tools)
│
src/core/python-bridge.ts
(spawns the Python server once, reuses the connection)
│
┌───────────────┴───────────────┐
▼ ▼
python -m mempalace.mcp_server MemPalace palace
(stdio JSON-RPC, unmodified) (ChromaDB / SQLite / KG / logstream)
mempalace-mcp/
├── manifest.json # LM Studio Plugin manifest (owner kebab-case)
├── package.json # deps, scripts ("postinstall" provisions the venv), bin
├── tsconfig.json # NodeNext ESM-style TS → compiled to dist/
├── README.md
├── scripts/
│ └── setup.cjs # postinstall: clone + venv + pip install MemPalace
├── src/
│ ├── index.ts # Plugin entry → exports main(pluginContext)
│ ├── toolsProvider.ts # LM Studio tool provider (all 45 tools)
│ ├── config.ts # Global config schematics (Palace Path, Read-only)
│ ├── mcp.ts # Standalone MCP server entry (npm run mcp)
│ └── core/
│ ├── python-bridge.ts # Spawns + talks to the Python MCP server
│ ├── tools-catalog.ts # Authoritative list of all 45 tools
│ ├── zod-from-json.ts # JSON schema → Zod conversion
│ └── format-result.ts # Result shaping for both surfaces
└── dist/ # Compiled JavaScript (output of `npm run build`)
npm install # runs postinstall: clone + venv + pip install
npm run typecheck # tsc --noEmit
npm run build # tsc → dist/
lms dev # load into LM Studio (hot-reload)
lms push # publish to the Hub
{
"mcpServers": {
"mempalace-mcp-lms": {
"command": "node",
"args": ["/absolute/path/to/project/dist/mcp.js"]
}
}
}
npm run build && npm run mcp
# standalone
node dist/mcp.js # then call tools/list over stdio
# or, inside LM Studio, open the tool panel and confirm all 45 tools appear