mcp-vstash
vstash MCP Server
Enable AI assistants (Claude Desktop, Cursor, Copilot) to search and answer questions from your local document memory via MCP.
Setup
1. Install vstash
pip install vstash
2. Add to Claude Desktop config
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vstash": {
"command": "vstash-mcp"
}
}
}
pyenv users: Use full path to binary:
"command": "/path/to/.pyenv/versions/3.x.x/bin/vstash-mcp"
3. Restart Claude Desktop
The vstash tools appear in Claude's tool list.
Available Tools
| Tool | Description |
|---|---|
vstash_add(path) |
Ingest file, directory, or URL into memory |
vstash_ask(query, top_k) |
Semantic search + LLM answer with sources |
vstash_search(query, top_k) |
Hybrid search with context expansion and relevance signal |
vstash_list() |
List all ingested documents |
vstash_stats() |
Database statistics (docs, chunks, size) |
vstash_forget(source) |
Remove document from memory |
vstash_collections() |
List all collections |
vstash_export(...) |
Export chunks as JSONL for training data curation |
vstash_job(job_id) |
Check status of background directory ingestion |
Search Response Fields
vstash_search returns:
| Field | Description |
|---|---|
chunks |
Array of results with ±1 adjacent chunks expanded |
relevance |
Confidence tier: "high", "medium", "low", "none" |
hint |
Human-readable relevance explanation |
best_distance |
Cosine distance of best vector match (lower = more relevant) |
Relevance tiers:
| Distance | Tier | Meaning |
|---|---|---|
| ≤ 0.95 | high | Results are relevant |
| 0.95–0.98 | medium | Results may be tangential |
| > 0.98 | low | Results may not be relevant |
Works from first search — no warm-up period needed.
API Key Configuration
MCP servers don't inherit shell environment variables. Configure inference in ~/.vstash/vstash.toml:
[cerebras]
api_key = "your-key-here"
Or use fully local Ollama (no API key):
[inference]
backend = "ollama"
[ollama]
host = "http://localhost:11434"
model = "llama3.2"
Troubleshooting
| Issue | Solution |
|---|---|
| Tools don't appear | Run which vstash-mcp to verify PATH |
| "No module named vstash" | MCP server uses different Python — use full path in config |
ask fails but search works |
Check inference backend configured in vstash.toml |
Reference
See references/mcp-reference.md for tool-specific options and advanced configuration.
More from jr2804/prompts
python-ultimate
>-
34output-quality
Detect and eliminate generic, low-quality "AI slop" patterns in natural language, code, and design. Use when REVIEWING existing content (text, code, or visual designs) for quality issues, cleaning up generic patterns, or establishing quality standards. Focuses on pattern detection—not content creation.
9coding-discipline
Language-agnostic behavioral guidelines to reduce common LLM coding mistakes. Use for ANY coding task (all languages) to avoid overcomplication, make surgical changes, surface assumptions before coding, and define verifiable success criteria. Applies behavioral rigor—separate from language-specific technical standards.
9cli-vstash
Local document memory with semantic search for AI-assisted workflows. Use when managing project documentation, codebases, or research papers that need persistent memory across sessions. Triggers on: vstash add/search/ask commands, document ingestion, semantic search, RAG pipelines, local knowledge bases, or configuring vstash for personal projects.
5code-deduplication
Pre-write workflow to prevent semantic code duplication. Use BEFORE creating new utility functions, shared modules, or helper code to verify equivalent capabilities don't already exist in the codebase. Requires maintaining CODE_INDEX.md as a capability index organized by purpose (not file location).
5sqlmodel
Comprehensive guide for working with SQLModel, PostgreSQL, and SQLAlchemy in FastAPI projects. Use when working with database operations in FastAPI including: (1) Defining SQLModel models and relationships, (2) Database connection and session management, (3) CRUD operations, (4) Query patterns and filtering, (5) Database migrations with Alembic, (6) Testing with SQLite, (7) Performance optimization and connection pooling, (8) Transaction management and error handling, (9) Advanced features like cascading deletes, soft deletes, and event listeners, (10) FastAPI integration patterns. Covers both basic and advanced database patterns for production-ready FastAPI applications.
1