Skip to main content
Glama
Gatoco
by Gatoco

Mnē-MCP — MCP RAG Server for opencode

Mnē-MCP (from the Greek Mnēmosynē, Titaness of memory; the macron in ē, U+0113, marks the long vowel in the transliteration) is an MCP server that implements a complete RAG (Retrieval-Augmented Generation) pipeline for opencode: it indexes an Obsidian vault or document folders and answers assistant questions using your own notes as a source, citing the exact path of each fragment used.

Stack: #RAG #MCP #mcp-server #opencode #Obsidian #Qdrant #Ollama #DeepSeek #bge-m3 #Python

Features

  1. Incremental indexing — scans directories (.md, .txt) from disk with change detection via mtime + md5, stale cleanup, and support for large volumes (~19 GB).

  2. Local embeddingsbge-m3 model via local Ollama (/api/embed), 1024 dimensions, multilingual (including Spanish), L2-normalized to scale correctly with cosine similarity.

  3. Semantic retrieval — Qdrant (Docker), single collection with payload filters (source, path, mtime, md5, heading_path) and configurable relevance threshold.

  4. Grounded generation — answers with deepseek-v4-flash (Ollama Cloud) only when evidence exceeds the threshold; otherwise returns explicit rejection ("no relevant documents found"). Without evidence, it does not generate.

Related MCP server: mcp-duckvault

Architecture

MCP tools (stdio) ──┐
                    ├── RagService (core) ────▶ Qdrant (vectorial, Docker)
Admin page (:8310) ─┘       │
                            ├── OllamaEmbedder (bge-m3 local)
                            └── LLMProvider (deepseek-v4-flash, Ollama Cloud)
  • Python 3.14 · official MCP SDK (mcp==1.12.4) · qdrant-client · httpx

  • 7 tools: index · query · search · delete · list · stats · config

  • Local admin page (http://127.0.0.1:8310): dashboard, indexed documents, asynchronous indexing with progress, and search playground. Shares the same core as the MCP tools (zero duplicated logic).

  • Suite of 70 offline tests (Qdrant :memory: + mocks) + end-to-end smoke test.

Developer Usage

docker compose up -d qdrant   # Qdrant
ollama pull bge-m3            # embeddings locales
cp .env.example .env          # OLLAMA_API_KEY + VAULT_ROOT
make install                  # instala el paquete (venv)
make admin                    # panel: http://127.0.0.1:8310

Register in opencode.json (mcp section, local type, command python3 mcp_rag/server.py or the mcp-rag-opencode entry point).

Request

Behavior

index (source, path, force_rescan, max_files)

Incremental scan, skips unchanged files, uploads vectors in batches

query (question, top_k ≤ 8, source, path_prefix, score_threshold)

Retrieval → reranker/LLM → answer with citations (path + heading_path)

search

Raw hits with score, no generation

stats

Qdrant/Ollama health, LLM status, counts by source

Roadmap

Hybrid dense+sparse search (BM25 + RRF) · cross-encoder reranking · semantic cache · evaluation harness (recall@k, MRR, nDCG) — planned in openspec/specs/mnemos-differentiators/.

Academic

Integrated Project · Prof. Christian Pérez · Student: Gat · 2026

Available Tools

7 tools
configC

Get the full config, or set one persisted field.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyNo
valueNo
actionNoget

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose a meaningful side effect: values can be persisted. However, it does not explain how the action parameter selects get vs set, whether writes are reversible, or what the response looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact, front-loaded sentence with no filler. It is efficient, but the brevity sacrifices important parameter and action details, making it slightly under-specified rather than optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and three undocumented parameters, the description is not enough for a caller to correctly construct arguments. Missing action semantics, required fields for the set path, and return format leave significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description needed to explain key, value, and action. It vaguely implies full config means no key/value and setting a field means providing a key/value, but it never mentions the action parameter, which is essential because it defaults to 'get'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific operations: 'Get the full config' or 'set one persisted field', which clearly identifies the resource and actions. It does not explicitly distinguish the tool from siblings like list or index, but the get/set purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use config instead of sibling tools such as list, index, query, search, delete, or stats. There is an implied use case, but no explicit conditions, exclusions, or alternatives are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

deleteA

Delete indexed docs by exact path or by source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
sourceNo

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that documents will be deleted, which is destructive, but it does not mention irreversibility, what happens when both path and source are provided, whether deletion is recursive, or any safety caveats.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with no filler. It front-loads the action ('Delete indexed docs') and immediately states the key selection modes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is too sparse. It omits important context such as irreversibility, behavior when both parameters are supplied, and what response or side effects the agent should expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It does clarify that 'path' and 'source' are alternative selection criteria, adding meaning beyond the raw schema. However, it leaves ambiguity about whether the parameters can be combined, whether at least one is required, and how null values behave.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Delete'), identifies the resource ('indexed docs'), and states the two selection modes ('by exact path or by source'). This clearly distinguishes it from the sibling tools such as index, query, and search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes clear that this tool is for deleting indexed documents by path or source, which is distinct from the other sibling tools. It does not explicitly state when not to use it or name alternatives, but the intent is unambiguous enough for an agent to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

indexB

Index the vault (source root or sub-path) into Qdrant.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
sourceNo
max_filesNo
force_rescanNo

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but does not mention side effects, whether indexing is incremental or destructive, external service requirements, long-running behavior, or what happens on repeated calls. The mention of Qdrant is implicit, but not expanded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It communicates the primary action and target efficiently. It could have said more about parameters or behavior, but as a concise statement it is well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with four optional parameters, no annotations, and no output schema, the one-line description is insufficient. It does not clarify parameter usage, expected results, or operational effects. The agent gets the core purpose but not enough context to confidently invoke the tool in nontrivial cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not compensate. It vaguely references 'source root or sub-path' but does not explain the path/source distinction, max_files, or force_rescan. With four undocumented parameters, the agent has no meaningful guidance on how to populate them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Index'), a specific resource ('the vault'), and a target ('into Qdrant'), making the operation clear. It is easily distinguished from sibling tools such as query, search, delete, list, stats, and config because none of those describe an indexing action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied by the action: index the vault before using query or search. However, there is no explicit guidance about when to use this tool versus alternatives, no prerequisites are stated, and no exclusion criteria are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

listA

List indexed documents (paginated, filter by source/path prefix).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
sourceNo
path_prefixNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It does disclose pagination and filtering behavior, but it does not describe the output shape, ordering, or potential side effects. For a simple read-only list operation this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler. The parenthetical packs the two key behavioral modifiers, pagination and filtering, efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with only optional parameters and no nested objects, the description covers the essential invocation context: what is listed, that results are paginated, and what filters exist. It does not describe the return schema, but the tool's simplicity and 'List indexed documents' wording make the behavior sufficiently clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It clarifies that source and path_prefix act as filters, but it provides no additional meaning for limit and offset beyond their self-explanatory names and schema defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with the specific verb 'List' and the resource 'indexed documents', then adds distinctive behaviors: pagination and filtering by source/path prefix. This makes the tool's function clear and separates it from siblings like query or search, which imply retrieval rather than enumeration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied: call this when you need to enumerate indexed documents rather than query or search them. However, there is no explicit guidance about when to prefer this tool over the sibling tools or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

queryC

Retrieve context and answer the question with the LLM.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_kNo
sourceNo
questionYes
path_prefixNo
score_thresholdNo

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries full responsibility for behavioral disclosure. It states that the tool retrieves context and answers with an LLM, but it does not say whether it is read-only, whether it requires auth or configuration, how sources are selected, or what the response contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is a single short, declarative sentence with no filler, so it is structurally concise. It is under-specified for a five-parameter tool, but the wording that exists is front-loaded and not redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five parameters, no output schema, and no annotations, this description is far too thin to support correct invocation. An agent learns that the tool answers with an LLM, but not how the question, retrieval filters, or scoring thresholds behave or what the returned answer looks like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates for none of the five parameters. Only 'question' is implied by 'answer the question'; top_k, source, path_prefix, and score_threshold are left completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('retrieve context and answer') and identifies the LLM as part of the behavior, so an agent can tell this is a question-answering tool rather than a raw listing tool. It does not, however, distinguish it from the sibling 'search' tool or state what context is being retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to prefer 'query' over siblings such as 'search', 'list', or 'stats', and it offers no exclusions or alternatives. An agent is left to infer the intended use from the parameter names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

statsB

Return collection stats and provider health.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the tool returns stats and health, but it does not explicitly say whether the operation is read-only, requires authentication, or has any side effects. For an unannotated tool, this is a meaningful transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that communicates the core purpose immediately. There is no redundant or filler content, and every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-parameter tool, the description is minimally adequate, but it leaves ambiguity around what 'collection stats' includes and what 'provider health' means in practice. With no output schema and no annotations, a bit more detail about the kind of information returned would make the tool comfortably usable by an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema coverage is effectively complete, so there is no parameter information missing. The description does not need to explain parameter behavior because there are none to explain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: 'Return collection stats and provider health.' It is distinguishable from siblings like query or search because it focuses on statistics and health rather than data retrieval. However, it does not explicitly contrast itself with any sibling, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives. The description does not mention prerequisites, typical use cases, or situations where another sibling like list, query, or config would be more appropriate. This leaves the agent to infer usage entirely from the tool name and context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedconfig
    • First observeddelete
    • First observedindex
    • First observedlist
    • First observedquery
    • First observedsearch
    • First observedstats

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a distinct role: indexing, LLM-based querying, raw vector search, deletion, listing, stats, and config. Query and search are clearly separated by whether the LLM is involved.

Naming Consistency5/5

All tool names are lowercase, single-word commands that follow a consistent imperative/noun style. The set is uniform and predictable despite not using a verb_noun pattern.

Tool Count5/5

Seven tools is well-scoped for a focused memory/RAG server. Each tool covers a necessary operation without redundancy or bloat.

Completeness5/5

The toolset covers the full indexed-document lifecycle: add via index, retrieve via search/query, remove via delete, inspect via list and stats, and configure via config. No critical missing operation is apparent.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables indexing local documents (PDF, Markdown, text, code) into a knowledge base and querying them via semantic search using local embeddings, all running privately on your machine.
    4
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables semantic search and retrieval over an Obsidian vault using local or API-based embeddings, allowing AI assistants to find notes by meaning, get related content, and pull context during conversations.
    15
    MIT