w2vgrep
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@w2vgrep Find mentions of fear in my markdown notes, threshold 0.5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-w2vgrep
MCP server for semantic search using w2vgrep and Word2Vec embeddings.
Unlike regular grep, finds semantically similar words. Searching for "fear" also finds "anxiety", "terror", "dread".
Docker (Recommended)
Build
docker compose buildConfiguration
Add to your project's .mcp.json:
{
"mcpServers": {
"w2vgrep": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v", "/path/to/.config/semantic-grep:/app/models:ro",
"-v", "/path/to/search/directory:/search:ro",
"-e", "DOWNLOAD_MODELS=none",
"mcp-w2vgrep-mcp-w2vgrep:latest"
]
}
}
}Replace:
/path/to/.config/semantic-grep— directory with Word2Vec models/path/to/search/directory— directory to search in
First Run (Download Models)
If you don't have models, the container will download them on first run:
# Download English model (~2.3GB)
DOWNLOAD_MODELS=english docker compose up
# Download Russian model (~2.3GB)
DOWNLOAD_MODELS=russian docker compose up
# Download both
DOWNLOAD_MODELS=english,russian docker compose upModels are saved to the models Docker volume.
Related MCP server: Personal File Search MCP Server
Native Installation
Requirements
Getting Word2Vec Models
mkdir -p ~/.config/semantic-grep
# English (2.3GB)
curl -L https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.en.300.bin.gz | \
gunzip > ~/.config/semantic-grep/english.bin
# Russian (2.3GB)
curl -L https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.ru.300.bin.gz | \
gunzip > ~/.config/semantic-grep/russian.binInstallation
git clone <repo-url> mcp-w2vgrep
cd mcp-w2vgrep
npm install
npm run buildConfiguration
Add to ~/.claude/settings.json:
{
"mcpServers": {
"w2vgrep": {
"command": "node",
"args": ["/path/to/mcp-w2vgrep/dist/index.js"],
"env": {
"W2VGREP_PATH": "/path/to/w2vgrep"
}
}
}
}Tool: semantic_search
Semantic search in text files using Word2Vec embeddings.
Parameters
Parameter | Type | Required | Description |
| string | yes | Search query (single word recommended, phrases may crash) |
| string | yes | Path to Word2Vec model (.bin) |
| number | no | Similarity threshold (default: 0.7) |
| string | no | File pattern (default: |
| integer | no | Lines of context (default: 2, set to 0 to reduce output) |
| boolean | no | Case-insensitive search |
Docker note: Search path is always /search (mounted volume), recursive search is always enabled.
Threshold Guide
Value | Result |
0.7 | Strict — only very close matches (default) |
0.5-0.6 | Balanced — good for most use cases |
0.4 | Broad — more results, some noise |
< 0.5 | WARNING: Can return MASSIVE amounts of data (millions of characters)! |
Usage Examples
Basic search (Russian)
{
"query": "тревога",
"model_path": "~/.config/semantic-grep/russian.bin"
}Search with lower threshold
{
"query": "happiness",
"model_path": "~/.config/semantic-grep/english.bin",
"threshold": 0.5
}Reduce output size
{
"query": "error",
"model_path": "~/.config/semantic-grep/english.bin",
"threshold": 0.6,
"context": 0
}Response Format
{
"query": "fear",
"total": 2,
"matches": [
{
"similarity": 1.0,
"match": "The fear of failure...",
"locations": [
{
"file": "notes/psychology.md",
"line": 42,
"context": "Context before\nThe fear of failure...\nContext after"
}
]
},
{
"similarity": 0.72,
"match": "Anxiety about the future",
"locations": [
{
"file": "diary/2024-01.md",
"line": 15,
"context": "..."
}
]
}
]
}Matches sorted by similarity (highest first). similarity: 1.0 = exact match.
Development
npm test # Run tests
npm run test:watch # Watch mode
npm run build # Build TypeScriptLicense
MIT
Available Tools
1 toolsemantic_searchA
Semantic search in text files using Word2Vec embeddings. Unlike grep, finds semantically similar words (e.g., searching "fear" also finds "anxiety", "terror", "dread").
Searches recursively in /search directory (mounted volume) for *.md files.
Use cases:
Find all mentions of a concept across files
Search for synonyms and related terms
Explore themes in documents
Response format: { "query": "search term", "total": 5, "matches": [{ "similarity": 0.85, "match": "matched text", "locations": [{ "file": "path/to/file.md", "line": 42, "context": "surrounding text" }] }] }
Matches sorted by similarity (1.0 = exact match).
Inputs: query (required), model_path (required), glob, context, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so an agent cannot misselect between competing options. The description makes its purpose (semantic similarity search over markdown files) unmistakable and explicitly contrasts it with grep-style exact matching.
The single name `semantic_search` follows a clean, conventional snake_case pattern with a descriptive qualifier plus verb, and the qualifier distinguishes it from lexical search. There are no competing conventions to conflict with.
One tool is borderline thin for a server, even though the tool itself is substantive rather than trivial. The surface has no room to express related operations (e.g., listing indexed files, rebuilding the embedding index), leaving a very narrow interface.
The core search operation is well-specified with a clear response schema, but hardcoded scope (only `/search/**/*.md`) and no options for file/path filtering, result limits, similarity thresholds, or an exact-match fallback leave notable gaps. An agent hitting non-markdown content or needing pagination has no path forward within this server.
Maintenance
Related MCP Connectors
Semantic search through Dickens' A Christmas Carol by meaning, theme, or character.
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Semantic nearest-neighbour search over your datasets, plus indices and projections.
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceSemantic search and retrieval system for local documents using vector embeddings, enabling AI-powered search across your document collections with support for multiple embedding providers.9MIT
- FlicenseNot gradedqualityDmaintenanceEnables semantic search over personal files using natural language, with optional AI summarization, all running locally.-
- MIT
- AlicenseNot gradedqualityDmaintenanceProvides local semantic search over files using embeddings, enabling directory indexing and natural language queries without external services.69 PyPIMIT