Skip to content
Palimem Docsspec v1.7.0

Use Palimem with Copilot CLI

Connect Palimem to GitHub Copilot CLI using the ai-memory connect copilot helper. The helper merges a memory-service entry into ~/.copilot/mcp-config.json (global) or a project-level config file.


  • GitHub Copilot CLI with MCP support
  • Node.js 18+
  • Repository cloned and Node dependencies installed:
    Terminal window
    cd app && npm install

From your repository root:

Terminal window
node app/scripts/ai-memory.js connect copilot \
--project-root "$(pwd)" \
--data-dir .ai-memory/data

This merges the memory-service entry into ~/.copilot/mcp-config.json.


The committed sample lives at examples/copilot/:

{
"mcpServers": {
"memory-service": {
"command": "node",
"args": ["/absolute/path/to/repo/app/scripts/memory-service-mcp.js"],
"env": {
"MEMORY_SERVICE_DATA_DIR": "/absolute/path/to/repo/.ai-memory/data"
}
}
}
}

Use absolute paths. The ai-memory connect copilot CLI resolves paths automatically.


List registered MCP servers:

Terminal window
copilot mcp list

You should see memory-service in the output. In a Copilot CLI session, the server exposes eleven tools when started:

memory_remember, memory_search, memory_get, memory_forget, memory_status, memory_consolidate, memory_review, memory_profile, memory_reflect, memory_query_temporal, memory_audit_export

Smoke test (non-interactive):

Terminal window
bash examples/copilot/demo/copilot-smoke.sh

The smoke test starts the MCP server via stdio and verifies memory_status responds with all eleven tools.


Paste this into your Copilot CLI session to configure Palimem:

Set up Palimem as governed local memory for this Copilot CLI session.
- Project: Palimem (spec v1.7.0)
- Run: node app/scripts/ai-memory.js connect copilot --project-root "$(pwd)" --data-dir .ai-memory/data
- Verify: run "copilot mcp list" to confirm memory-service is registered
- Then: call tools/list (11 tools), then memory_status — expect ok and index_status current
Use local data directory .ai-memory/data. Do not enable cloud services.

Flag Purpose
--config PATH Override target file (default: ~/.copilot/mcp-config.json)
--project-config PATH Also write project .copilot/mcp-config.json
--project-root PATH Repo root for resolving script paths (default: $PWD)
--data-dir PATH MEMORY_SERVICE_DATA_DIR resolved to absolute
--replace Overwrite existing memory-service entry
--dry-run Print merged JSON without writing
Terminal window
python3 app/connect_copilot.py \
--project-root "$(pwd)" \
--project-config .copilot/mcp-config.json

memory-service not showing in copilot mcp list

Ensure ~/.copilot/mcp-config.json was written. Re-run the connect command and check the output for errors.

ENOENT on memory-service-mcp.js

Install Node dependencies:

Terminal window
cd app && npm install

Existing entry refused

Re-run with --replace:

Terminal window
node app/scripts/ai-memory.js connect copilot \
--project-root "$(pwd)" --data-dir .ai-memory/data --replace

Tools show 9 instead of 11

Update to spec v1.7.0 — memory_query_temporal and memory_audit_export were added in v1.6.0.


Terminal window
python3 app/import_markdown.py \
--data-dir .ai-memory/data \
examples/markdown/USER.md.sample \
examples/markdown/MEMORY.md.sample