LearnNewsExamplesServices
Frontmatter
titleAdd server scaffold, read endpoints, and query search for Memory MCP
authorAki-07
stateClosed
createdAtOct 10, 2025, 10:43 PM
updatedAtOct 11, 2025, 5:14 PM
closedAtOct 11, 2025, 5:13 PM
mergedAt
branchesdevfeat/memory-mcp-query
urlhttps://github.com/neomjs/neo/pull/7455
Closed
Aki-07
Aki-07 commented on Oct 10, 2025, 10:43 PM

https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md

Fixes #7407 #7408 #7409

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch, not the main branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

Feature information -Introduces the Memory MCP server scaffold (ai/mcp/server/memory/) with Express bootstrapping, shared config, logging, JSON parsing, and Swagger UI served from the existing OpenAPI design (buildScripts/mcp/memory/openapi.yaml / learn/guides/ai/MemoryCoreMcpApi.md).

  • Implements /healthcheck, verifying Chroma connectivity and returning collection metadata + uptime.
  • Adds the npm launcher ai:server-memory-mcp and required devDependencies (express, swagger-ui-express, morgan, js-yaml).
  • add GET /memories backed by Chroma listMemories service with pagination
  • add GET /summaries backed by listSummaries service returning metadata & docs
  • keep responses aligned with MemoryCoreMcpApi design to unblock search + admin work
  • Extends the Memory MCP service with semantic search: wraps Gemini embeddings in textEmbeddingService.mjs, reuses chromaManager, and augments both route handlers to expose POST /memories/query and POST /summaries/query. (ai/mcp/server/memory/services/textEmbeddingService.mjs:1, ai/mcp/server/memory/services/memoryService.mjs:1, ai/mcp/server/memory/services/summaryService.mjs:1, ai/mcp/server/memory/routes/memories.mjs:1, ai/mcp/server/memory/routes/summaries.mjs:1)
  • Each endpoint validates input, optionally filters by session/category, calls Chroma’s query, and returns relevance metadata (distance + normalized score) in the shape defined by openapi.yaml.

Other information:

Aki-07
Aki-07 commented on Oct 11, 2025, 1:07 PM

Hi @tobiu should I break these into 3 PRs?


tobiu
tobiu commented on Oct 11, 2025, 1:14 PM

hey! if you are aiming for more hacktoberfest tokens (accepted PRs) it would make sense. it would simplify the review process as well. small hint: package.json => if you use npm install to add a new dependency, the block formatting will get lost in most IDEs. the new dependency should also be a devDependency instead (rationale: not needed for running the framework itself, but supports the ai tooling).


Aki-07
Aki-07 commented on Oct 11, 2025, 5:01 PM

Hey!, its not for the hackathon, I wanted smaller PRs so that we can test separately and review process is smooth


Aki-07
Aki-07 commented on Oct 11, 2025, 5:11 PM

Hey @tobiu, have broke into 2 PRs to do review them when you have time


Aki-07
Aki-07 commented on Oct 11, 2025, 5:13 PM

Broken into 2 PRs #7462 #7463