Skip to content

feat(mcp): support ollama and huggingface embedders (#350) - #350

Open
saahil08 wants to merge 1 commit into
codeforstartups:developmentfrom
saahil08:feat/mcp-memory-tools
Open

saahil08 wants to merge 1 commit into
codeforstartups:developmentfrom
saahil08:feat/mcp-memory-tools

Conversation

@saahil08

@saahil08 saahil08 commented Nov 1, 2026 •

Copy link
Copy Markdown

Summary

Adds opt-in MCP memory management tools to Dynavec, allowing MCP clients to store, retrieve, and delete memories.

Changes

  • Added dynavec_remember to store memories with optional document IDs, metadata, namespaces, and TTL.
  • Added dynavec_get to retrieve memories by ID.
  • Added dynavec_forget to delete memories by ID.
  • Added the --enable-write flag to enable memory management tools.
  • Kept write tools disabled by default for safety.
  • Added tests covering tool registration, memory operations, and metadata validation.
  • Updated documentation with usage instructions and safety considerations.

Security

Memory write and management tools are opt-in and remain disabled by default. Users must explicitly enable them with --enable-write.

Testing

  • make format
  • make run-ci (lint, mypy, and tests)

Closes #350

@saahil08

saahil08 commented Nov 1, 2026

Copy link
Copy Markdown
Author

make format
make run-ci (lint, mypy, and tests) completed and Passed

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @saahil08! The core implementation of the memory management tools (dynavec_remember, dynavec_get, dynavec_forget) and the --enable-write safeguard is solid and all 13 unit tests pass cleanly.

However, we cannot merge this PR in its current state due to unrelated formatting changes and title mismatch:

  1. Revert unrelated file modifications (80 files changed): The PR reformatted 76 unrelated files across benchmarks/, src/, and tests/. PRs should only contain diffs directly relevant to the feature (src/dynavec/mcp/server.py, src/dynavec/cli.py, tests/test_mcp_server.py, CHANGELOG.md).
  2. Revert README.md: An auto-formatter escaped markdown characters (\*\*, \(, etc.) creating 1,600+ lines of mangled documentation.
  3. Fix PR Title: The title currently says "support ollama and huggingface embedders (#350)", but the PR implements MCP memory tools. Please update it to reflect the actual feature (e.g., feat(mcp): add opt-in memory management tools (remember, get, forget)).

Once rebased cleanly with only the MCP files touched, we will be happy to merge this!

Comment thread README.md

[![Python versions]\(https\://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-3776ab?style=flat-square&logo=python&logoColor=white)]\(https\://pypi.org/project/dynavec/)

[![CI]\(https\://img.shields.io/github/actions/workflow/status/codeforstartups/dynavec/ci.yml?branch=development&style=flat-square&label=CI)]\(https\://github.com/codeforstartups/dynavec/actions/workflows/ci.yml)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert README.md. An automated formatter inadvertently escaped markdown syntax (\*\*, \(, etc.), creating 1,600+ lines of unintended diff.

recalls.append(
len(truth_set & prediction_set) / k
)
recalls.append(len(truth_set & prediction_set) / k)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to this and other unrelated files across benchmarks/, src/, and tests/. Please keep the PR focused strictly on the MCP feature files.

Comment thread src/dynavec/mcp/server.py
def _get_db() -> Dynavec:
return db if db is not None else client_from_env()

def dynavec_remember(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memory tools (dynavec_remember, dynavec_get, dynavec_forget) and the opt-in --enable-write flag look clean and all unit tests pass. Once the PR title and unrelated formatting diffs are reverted, this will be ready to merge.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants