fix(memory): rename MCP tool names to comply with strict client naming regex#59
Conversation
…g regex
MCP clients like Antigravity enforce the tool-name pattern
^[a-zA-Z0-9_-]{1,64}$, which rejects the existing memory.storeKnowledge,
memory.updateKnowledge, and memory.searchKnowledge tool names because of
the dot separator. Rename to memory_storeKnowledge, memory_updateKnowledge,
memory_searchKnowledge so the server is loadable across all MCP clients.
To keep existing users on older init templates from breaking, the
CallTool dispatcher also accepts the deprecated dotted names as
backward-compat aliases. The aliases can be removed in the next major.
Exports the TOOLS array and adds a unit test that asserts every
registered tool name satisfies the MCP naming regex, guarding against
future regressions when new tools are added.
Updates README examples and all per-agent remember command templates
(Claude, Cursor, Codex, Gemini, Antigravity, GitHub Copilot, generic
agent workflows) to reference the new names. Historical design docs
under docs/ai/ are intentionally left unchanged as frozen records.
Fixes codeaholicguy#40
Manual verification via a spec-compliant MCP clientI ran a small MCP client built with the official The script exercises four things:
OutputThe Reproducible — the script (~60 lines of Node ESM) can be shared on request. |
Confirmed in a real Antigravity installAlso loaded the built server into Antigravity locally via {
"mcpServers": {
"memory-local-test": {
"command": "node",
"args": ["<path-to>/ai-devkit/packages/memory/dist/index.js"]
}
}
}Antigravity's "Manage MCP servers" panel shows:
|
|
@nnhhoang thanks for the contribution, this LGTM. |

Summary
Fixes #40. MCP clients like Antigravity enforce the tool-name pattern
^[a-zA-Z0-9_-]{1,64}$, which rejects the existingmemory.*tool names due to the dot separator.This PR:
memory_storeKnowledge,memory_updateKnowledge,memory_searchKnowledgeTOOLSand adds a unit test asserting every registered tool name satisfies the MCP naming regex — guards against future regressions.Files changed
packages/memory/src/server.ts- rename + dispatcher aliases + exportTOOLSpackages/memory/tests/unit/server.test.ts- new regex compliance testpackages/memory/README.md- updated examplesremembercommand templates (Claude, Cursor, Codex, Gemini, Antigravity, GitHub Copilot, generic)docs/ai/*feature docs intentionally left unchangedTest plan
nx run-many -t testpasses - 393 tests across 4 packages^[a-zA-Z0-9_-]{1,64}$@modelcontextprotocol/sdkclient against built server - all 10 checks pass (ListTools regex compliance, new-name dispatch, backward-compat dispatch, unknown-name negative control). Output posted as a comment on this PR.