feat(mcp): add built-in memory server - #126
Open
Grivn wants to merge 4 commits into
Open
Conversation
Move recall, search, remember, related, link, and status into a concurrency-safe application service so command and protocol adapters use one semantic path. Keep remote natural-language content out of the oplog and make bidirectional link writes atomic. Validation: umask 022 make test; go test -race ./internal/memory/service ./cmd/memory -count=1; go build -o mnemon .
Expose recall, search, remember, related, link, and status through the official MCP Go SDK with bounded schemas, protocol negotiation, and compact-by-default results. Keep the adapter on the shared Memory application service and preserve one mnemon executable. Validated with make test, targeted process E2E, go vet, and race-enabled MCP and Memory service tests.
Add stdio client configuration, tool contracts, safety limits, read-only behavior, and the shared-engine model to the English and Chinese guides. Expand the contribution scope to include MCP clients.
Keep empty tags, entities, candidate lists, and auto-prune IDs present for successful writes while retaining the compact duplicate response. This preserves the pre-service-refactor CLI wire contract. Validated with service, Memory CLI, MCP, process E2E, and the 167-case CLI integration suite.
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
mnemon mcp serve, a JSON-RPC 2.0 stdio server built on the official Go MCP SDKrecall,search,remember,related,link, andstatustools with compact-by-default results andfulloutput supportThe SDK is pinned to the newest stable release compatible with this repository's Go 1.24 toolchain.
Validation
make testmake test-integration(167 CLI E2E cases plus timing, race, process, and Docker boundaries)go test -race ./internal/mcp ./internal/memory/service ./cmd/mcp ./cmd/memory -count=1go build -o mnemon .Release note
Mnemon can now run as a built-in stdio MCP server for agent runtimes via
mnemon mcp serve.Closes #124