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.
Prerequisites
Section titled “Prerequisites”- GitHub Copilot CLI with MCP support
- Node.js 18+
- Repository cloned and Node dependencies installed:
Terminal window cd app && npm install
Recommended install
Section titled “Recommended install”From your repository root:
node app/scripts/ai-memory.js connect copilot \ --project-root "$(pwd)" \ --data-dir .ai-memory/dataThis merges the memory-service entry into ~/.copilot/mcp-config.json.
Config block
Section titled “Config block”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.
Verification
Section titled “Verification”List registered MCP servers:
copilot mcp listYou 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):
bash examples/copilot/demo/copilot-smoke.shThe smoke test starts the MCP server via stdio and verifies memory_status responds with all eleven tools.
Agent prompt
Section titled “Agent prompt”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.CLI options
Section titled “CLI options”| 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 |
Python alternative
Section titled “Python alternative”python3 app/connect_copilot.py \ --project-root "$(pwd)" \ --project-config .copilot/mcp-config.jsonTroubleshooting
Section titled “Troubleshooting”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:
cd app && npm installExisting entry refused
Re-run with --replace:
node app/scripts/ai-memory.js connect copilot \ --project-root "$(pwd)" --data-dir .ai-memory/data --replaceTools show 9 instead of 11
Update to spec v1.7.0 — memory_query_temporal and memory_audit_export were added in v1.6.0.
Seed memory (optional)
Section titled “Seed memory (optional)”python3 app/import_markdown.py \ --data-dir .ai-memory/data \ examples/markdown/USER.md.sample \ examples/markdown/MEMORY.md.sampleNext steps
Section titled “Next steps”- Palimpsest model — how layered memory and supersession work
- Scopes — user, session, and repository memory
- MCP tools reference — all 11 tools with arguments