About Distill
Distill is an MCP server published by Siddhant-K-code in the AI category: context intelligence layer for LLM agents: persistent memory with write-time dedup, sensitivity tagging, conflict detection, and hierarchical decay. ~12ms. No LLM calls. MIT. Conduid read 13 tools from its source: analyze_redundancy, create_session, deduplicate_chunks, delete_session, forget_memory, memory_expire and 7 more. No package is published for it, so it installs from a source checkout.
The repository has 198 stars and 21 forks, is licensed MIT, and its last commit was on 21 Nov 2026. The latest release is v0.9.1 (9 May 2026): OpenAPI 3.1 Spec & Interactive Docs (#91, closes #23) Distill now ships with a complete OpenAPI 3.1 specification and serves interactive Swagger UI at /docs. It follows v0.9.0 (9 May 2026), and the 5 most recent releases go back to v0.6.0 (2 May 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include cli, html-to-markdown, markdown, readability and web-scraping.
Install
git clone https://github.com/Siddhant-K-code/distillTools (13)
analyze_redundancyAnalyze chunks for semantic redundancy without removing any. Use this to understand how much overlap exists in your context before deciding whether to deduplicate. Returns cluster information and redundancy percentage.| Parameter | Type | Description |
|---|---|---|
| chunks * | array | Array of chunk objects with 'text' and 'embedding' fields |
| threshold | number | Clustering threshold (default: 0.15) |
create_sessionCreate a new context window session with a token budget. Use this at the start of a task to track context incrementally.| Parameter | Type | Description |
|---|---|---|
| max_tokens | number | Token budget for the session (default: 128000) |
| session_id | string | Session ID (auto-generated if empty) |
deduplicate_chunksRemove redundant information from RAG chunks before sending to LLM. WHEN TO USE: Call this tool whenever you have multiple text chunks from retrieval, search results, or context assembly. 30-40% of RAG context is typically redundant. BENEFITS: - Reduces token usage by removing duplicate information - Improves response quality by providing diverse perspectives - Prevents LLM confusion from repetitive content INPUT: Array of chunks with text and embeddings (from your RAG pipeline) OUTPUT: Deduplicated chunks with diversity optimization| Parameter | Type | Description |
|---|---|---|
| chunks * | array | Array of chunk objects. Each chunk must have 'text' (string) and 'embedding' (array of floats). Optional: 'id' (string), 'score' (float), 'metadata' (object). |
| lambda | number | MMR lambda - 1.0 for pure relevance, 0.0 for pure diversity (default: 0.5) |
| target_k | number | Target number of chunks to return (default: 8) |
| threshold | number | Clustering threshold - lower means more aggressive deduplication (default: 0.15). Use 0.1 for code, 0.2 for prose. |
delete_sessionDelete a session and all its entries.| Parameter | Type | Description |
|---|---|---|
| session_id * | string | Session ID |
forget_memoryRemove memories matching the given criteria. Use this to clean up outdated or incorrect memories.| Parameter | Type | Description |
|---|---|---|
| ids | array | Memory IDs to remove |
| tags | array | Remove all memories with these tags |
memory_expireMark memory entries as expired. Expired entries are excluded from recall by default but remain in the store.| Parameter | Type | Description |
|---|---|---|
| ids * | array | Memory entry IDs to expire |
memory_statsGet statistics about the persistent memory store.memory_supersedeMark a memory as superseded by a newer entry. The old entry is expired and a forward pointer to the replacement is stored.| Parameter | Type | Description |
|---|---|---|
| new_id | string | ID of the replacement memory |
| old_id * | string | ID of the memory being superseded |
push_sessionPush context entries to a session. Entries are deduplicated and the token budget is enforced via compression and eviction.| Parameter | Type | Description |
|---|---|---|
| content * | string | Entry content |
| importance | number | Entry importance 0-1 (default: 0.5, higher = harder to evict) |
| role | string | Entry role: user, assistant, tool, system (default: tool) |
| session_id * | string | Session ID |
| source | string | Entry source (e.g. file_read, search) |
recall_memoryRecall relevant memories from persistent storage. Retrieves memories ranked by semantic relevance and recency. Use this to access context from previous sessions.| Parameter | Type | Description |
|---|---|---|
| max_results | number | Maximum number of memories to return (default: 10) |
| max_tokens | number | Maximum token budget for returned memories (0 = unlimited) |
| query * | string | Query text to search memories |
| tags | array | Filter by tags |
retrieve_deduplicatedQuery vector database with automatic deduplication. Fetches 3-5x more results than needed, clusters semantically similar chunks, selects the best representative from each cluster, and applies MMR for diversity. USE THIS instead of raw vector DB queries when you need diverse, non-redundant context.| Parameter | Type | Description |
|---|---|---|
| lambda | number | MMR lambda for relevance vs diversity (default: 0.5) |
| namespace | string | Vector DB namespace to search |
| over_fetch_k | number | Number of chunks to fetch before deduplication (default: 50) |
| query * | string | The search query text |
| target_k | number | Target number of chunks to return (default: 8) |
| threshold | number | Clustering threshold (default: 0.15) |
session_contextRead the current context window for a session. Returns entries in push order with compression levels and token counts.| Parameter | Type | Description |
|---|---|---|
| max_tokens | number | Max tokens to return (0 = all) |
| role | string | Filter by role |
| session_id * | string | Session ID |
store_memoryStore context into persistent memory with automatic deduplication. Use this to save important context that should persist across sessions. Duplicate information is automatically detected and merged.| Parameter | Type | Description |
|---|---|---|
| session_id | string | Session ID to associate with this memory |
| source | string | Source of the memory (e.g., code_review, docs, conversation) |
| tags | array | Tags for categorizing the memory |
| text * | string | Text content to store |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 6.4K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by go.sum.
- ✓No dynamic code executionScanned 217 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio and Streamable HTTPcmd/mcp.go:265, cmd/mcp.go:286
- Starts other programs
- 15 callsinternal/studylocal/adapter.go:200, internal/studylocal/authorization.go:457, internal/studylocal/preflight.go:55
- Outbound network calls
- 8 callsinternal/jevpilot/client.go:34, internal/jevpilot/client.go:83, pkg/embedding/cohere/client.go:78
- Writes or deletes files
- 92 callscmd/config.go:66, cmd/pipeline.go:114, internal/artifact/publish.go:81
- Lockfile
- go.sum
Pattern matches on the source text of 217 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 6.4K words, fetched a month ago. The original in the repository is authoritative.
Read full README