Server data from the Official MCP Registry
Non-destructive context filter for AI chats that sends only what the active task needs.
About
Non-destructive context filter for AI chats that sends only what the active task needs.
Security Report
Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
6 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: CONTEXT_SLICER_DB
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"context-slicer": {
"command": "npx",
"args": [
"-y",
"@krishthesmart/context-slicer@1.0.1"
],
"env": {
"CONTEXT_SLICER_DB": "your-context-slicer-db-here"
}
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
ContextSlicer
Cut AI token usage without deleting a single message.
Normally, AI chats re-send and re-read the entire conversation history on every turn—wasting thousands of tokens on unrelated turns and dead-end brainstorming. ContextSlicer is a non-destructive context filter that keeps your full chat history archived while sending the AI only the specific context it needs to complete the active task.
Zero npm dependencies. Built with pure Node.js CommonJS, stdio JSON-RPC 2.0, and a single-file Cloudflare Worker.
Why ContextSlicer?
- Sends only what the task needs: Instead of replaying the entire chat on every request, ContextSlicer filters the history down to only the relevant context and key decisions required for the current task.
- Non-destructive by design: All raw turns remain safely archived in
this.archive(or local JSON storage)—nothing is ever deleted from your chat. - Auto-switches on build triggers: During brainstorming (
chatmode), it includes compact working memory, keyword-recalled turns, and the recent window. When you trigger execution ("build it","build the app","write the code","start coding"), it drops the brainstorm window and sends only the distilled task essentials ([WORKING_MEMORY] + current_message).
Architecture
- SDK (
src/core.js):ContextSlicerkeeps all raw turns inthis.archiveand maintains a compactspecCard(goal,decisions,constraints,rejected, plus custom categories likenote) via<spec cat="...">...</spec>tags.- Chat mode:
[WORKING_MEMORY] + keyword-recalled turns + last N turns + userMsg - Execute mode: Triggered automatically on build phrases — drops brainstorm clutter and sends only the essential spec +
userMsg.
- Chat mode:
- Proxy (
src/proxy.js&bin/cli.js): OpenAI-compatible streaming proxy withGET /health,GET /stats,GET /v1/models,OPTIONSCORS,POST /v1/chat/completions(stream: trueSSE passthrough),X-Context-Savedheader, 100-session LRU RAM cap, and optionalSLICER_KEYauth. - MCP (
src/mcp.js): Zero-dependency stdio JSON-RPC 2.0 server exposingslice_and_retrieve,save_slice,get_slice,list_slices, anddelete_slicebacked by a local JSON file. - Cloudflare Worker (
worker.js) & Product Site (index.html): Free-tier single-file Cloudflare Worker proxy + dark-mode 1-page site.
Quick Start
Proxy
npm start
# or
npx context-slicer serve --port 8787 --upstream https://api.openai.com
MCP Server
npm run mcp
# or
node src/mcp.js
SDK
const { ContextSlicer } = require('./src/core');
const slicer = new ContextSlicer({ windowSize: 6 });
slicer.addTurn('user', 'Build a CLI <spec cat="goal">Zero-dep CLI</spec>');
const messages = slicer.buildMessages('build it'); // switches to execute mode
Cloudflare Worker
Deploy worker.js directly with Wrangler or paste into the Cloudflare Workers dashboard (no KV or credit card required).
License
MIT
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
