Repository navigation
feat(memory): add TypeScript MCP server alongside Python version - #80
Merged
Merged
Conversation
- Read-only recall MCP server (search_memories / list_memories / search_summary) at toolkit/plugins/memory/mcp/typescript/, calling the AgentArts Memory data-plane REST API directly (no Python SDK dependency) - Bundles to a single zero-dependency dist/index.mjs via esbuild (Node >= 18 runtime only) - End-to-end test suite (node:test, no test deps) against a mock data plane, asserting MCP protocol behavior and REST wire-format parity with the Python server - Exclude the TS dir and node_modules from wheel/sdist: no Python code references it, and dist/ is a gitignored build artifact
list_memories and search_summary are not used yet — drop them along with the list-endpoint client path and their tests. Restorable from history when needed.
neverland-lhy
force-pushed
the
feat/ts-memory-mcp
branch
from
October 24, 2026 02:39
c37c1c3 to
c6c23f5
Compare
Add strategy_type, start_time and end_time passthrough (renaming num/threshold to top_k/min_score to match the backend filter). Optional filters are omitted from the request body when unset, mirroring the Python SDK's MemorySearchFilter.to_dict().
The OpenCode/Claude Code/Codex registration snippets were dropped during an earlier README restructure (they briefly lived in examples/, which was then removed). Restore them and flag the AGENTARTS_MEMORY_USER_ID consistency requirement: a mismatch with the writing side makes search silently return empty results.
- Remove unused DEFAULT_LIST_LIMIT and isConfigured() from config.ts - Mention the optional filters (and backend strategy_type validation) in the tool description - Fix stale num/threshold wording in a test comment - README: correct bundle size (~750KB), document that invalid strategy_type values are rejected by the backend - package.json: description now says 'a read-only recall tool'
Probed the live backend: the search filter accepts semantic, episodic, user_preference, summary, procedural and event; ~40 other candidate values are rejected with 'Malformed request body'. The enum has no public documentation, so the parameter stays a free string with the verified values listed in the tool description and README instead of a hardcoded zod enum.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
=======================================
Coverage 59.41% 59.41%
=======================================
Files 115 115
Lines 10570 10570
Branches 1695 1695
=======================================
Hits 6280 6280
Misses 3752 3752
Partials 538 538 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a TypeScript implementation of the AgentArts Memory MCP server at
toolkit/plugins/memory/mcp/typescript/, alongside the existing Python server (mcp/server.py). It currently exposes a single tool,search_memories.Motivation
The Python server depends on the
agentarts-sdkpackage (pulling inmcp,requests, etc.), which is heavy for environments that only need the MCP server. The TypeScript version has zero runtime dependencies: it calls the AgentArts Memory data-plane REST API directly and builds to a single bundled file (dist/index.mjs, ~740KB) that runs anywhere with Node >= 18 — no npm, no Python.What's included
search_memories(query, strategy_type?, top_k=5, min_score=0.7, start_time?, end_time?)— semantic search with optional memory-type and time-range filters, read-only by design (writing stays with the platform hooks/plugins).user_idis resolved server-side from the environment, never a model-controlled parameter..mjshook scripts use (_shared.mjs), with no Python SDK.npm run buildtypechecks and bundles via esbuild into a single zero-dependencydist/index.mjs; all npm deps are build-time only.npm test, node:test against a mock data plane, zero test dependencies) asserting MCP protocol behavior and REST wire-format parity with the Python server.pyproject.toml: excludemcp/typescript(andnode_modules) from wheel/sdist — no Python code references the directory, anddist/is a gitignored build artifact, so shipping it would make wheel contents depend on the packaging machine's state (without the exclusion a locally-built wheel picks up 24MB / 4264node_modulesfiles).Testing
npm test— 8/8 end-to-end assertions against a mock data planesearch_memoriesreturns live datauv build --no-cache— wheel and sdist contain nomcp/typescriptand nonode_modulesfiles