Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
Read large logs, JSON and docs in a fraction of the tokens. Offline, fact-preserving optimizer.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"latent-gate": {
"command": "uvx",
"args": [
"latent-gate",
"mcp"
]
}
}
}在终端中运行这条命令
claude mcp add latent-gate -- uvx latent-gate mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"latent-gate": {
"command": "uvx",
"args": [
"latent-gate",
"mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"latent-gate": {
"type": "stdio",
"command": "uvx",
"args": [
"latent-gate",
"mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 KathanModh259 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(1.4.2)于30天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Spec Driven Development, Remote Desktop Commander, Kanal Varna — drains, leaks & plumbing (Varna, BG)
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Drain unblocking, leak detection & plumbing in Varna, Bulgaria: services, prices, areas, contact
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
An MCP server that shrinks logs, JSON, docs and web pages before your AI reads them — offline, deterministic, in ~3ms, no API key. 66% fewer tokens across a mixed dev corpus; 90%+ on repetitive logs.
Use in Claude | Quick Start | Python API | REST API | Monitoring | Load Testing | Deployment | AI Tools | Benchmarks | Contributing
[Try it in your browser →](https://kathanmodh259.github.io/latent-gate/) The real optimizer runs on your machine via WebAssembly; nothing you paste is uploaded.
A 400-line error log, read through LatentGate (balanced, measured with tiktoken):
BEFORE 13,641 tokens
2026-10-08 09:00:00 ERROR order 10000 failed: payment gateway timeout after 2982ms (retry 1/3) ... 398 more lines in the same shape ...
AFTER 145 tokens (98.9% saved) 2026-10-08 09:00:00 INFO app started, 3 workers 2026-10-08 09:00:00 ERROR order 10000 failed: payment gateway timeout after 2982ms (retry 1/3) [… 398 similar lines: order 10001…10398, 2900…3100 ms …] 2026-10-08 09:06:39 ERROR order 10399 failed: payment gateway timeout after 3030ms (retry 1/3) 2026-10-08 09:07:00 FATAL circuit breaker open for payments-api
Install it into Claude Code in one line, then ask *"read app.log and tell me why orders fail"*:
claude mcp add --scope user latent-gate -- uvx --from "latent-gate[mcp,tokens]" latent-gate-mcp
What you can rely on: the same input always gives the same output (so provider prompt caching keeps working); output is never larger than input; code blocks, URLs and quoted strings come back byte-for-byte; level="lossless" changes nothing but whitespace, JSON formatting and exact duplicates. What you trade at the default level: runs of near-identical lines are folded to first, last and value ranges, so individual IDs inside a folded run are not kept. The full corpus, including where it loses facts, is in Cost Benchmarks and reproducible with latent-gate --optimizer-benchmark.
Works in Claude Code, Claude Desktop, Cursor, Cline, Continue and Zed, free and offline.
Don't want to install anything? The official hosted LatentGate on mcprush also runs where local servers can't, such as claude.ai on the web and mobile. It has a free tier (300 calls a month) and paid plans from $9/month.
Every time you send an image or long prompt to GPT-4o / Claude / Gemini, you burn 1,000+ tokens on processing that could happen locally for free.
Traditional: Image -> Cloud LLM (1,200 tokens) -> Answer
LatentGate: Image -> Local Ollama (FREE) -> Cloud LLM (200 tokens) -> Answer
| Feature | Description |
|---|---|
| Local-First | Vision and text compression runs on Ollama (free, no API key needed) |
| Token Optimizer | Deterministic, fact-preserving compression: 66% fewer tokens on a realistic dev corpus in ~1ms (benchmark) |
| MCP Server | Works with Claude Desktop, Cursor, Cline, Continue, Zed |
| Selective Decoding | For video, only call API when scene changes (~2.85x fewer calls) with cosine similarity |
| Text Compression | Long prompts, conversations, RAG docs compressed locally |
| Speed Optimized | Connection pooling, model preloading, parallel processing |
| Multi-Provider | OpenAI, Anthropic, Google, Groq, DeepSeek, Together, Azure, AWS Bedrock, Ollama, or any OpenAI-compatible endpoint |
| REST API | FastAPI server for web application integration |
| Video Processing | Direct video file input with automatic frame extraction |
| Cost Tracking | Persistent cost tracking with SQLite analytics and exportable reports |
| Async Support | Non-blocking async methods for FastAPI, aiohttp, etc. |
| Streaming Responses | Stream responses from remote LLMs |
| Config Persistence | YAML/TOML config files with environment variable overrides |
| Structured Logging | JSON-formatted logging with rotation and correlation IDs |
| Docker Support | Dockerfile and docker-compose for easy deployment |
| Plugin System | Custom processors for domain-specific compression |
| Multi-Language | Support for 30+ languages with automatic detection |
LatentGate plugs into Claude as an MCP server. Its optimizer tools work offline, with no Ollama and no API key — Claude reads big logs, JSON dumps and docs through it and spends a fraction of the context. A 400-line error log goes from 14,400 to ~100 tokens.
Requires uv (uvx fetches LatentGate from PyPI on first run). The first run downloads dependencies, which can exceed Claude's 30-second MCP startup limit on a slow connection; run this once beforehand (later starts take ~2s):
uvx --from "latent-gate[mcp,tokens]" latent-gate --optimizer-benchmark
Claude Code — plugin (MCP server + a skill that tells Claude when to use it):
/plugin marketplace add KathanModh259/latent-gate
/plugin install latent-gate@latent-gate
Claude Code — MCP server only:
claude mcp add latent-gate -- uvx --from "latent-gate[mcp,tokens]" latent-gate-mcp
Any agent — from the Agensi marketplace: LatentGate Context Saver is the official skill for Claude Code, Cursor, Codex CLI and 20+ other agents. It sets LatentGate up if it's missing, works with the local and hosted editions, and tells your agent when to use it.
Claude Desktop — add to claude_desktop_config.json and restart:
{
"mcpServers": { "latent-gate": { "command": "uvx", "args": ["--from", "latent-gate[mcp,tokens]", "latent-gate-mcp"] } } }
Then just ask: *"Read logs/app.log with latent-gate and tell me why orders fail."*
| Tool | Needs Ollama | What it does |
|---|---|---|
read_file_optimized | no | Read a text file and return its optimized form (use for files you read, not files you edit) |
optimize_text | no | Optimize text you already have, optionally toward a question / max_tokens budget |
count_tokens | no | Count tokens (tiktoken o200k_base) |
compress_image | yes | Describe an image locally as a ~150-token scene payload |
compress_text / compress_conversation / compress_documents | yes | Optimizer + fact-checked local-LLM compression |
get_stats | yes | Session statistics |
# Core install
pip install latent-gate
pip install latent-gate[mcp]
pip install latent-gate[api]
pip install latent-gate[video]
pip install latent-gate[embeddings]
pip install latent-gate[langchain]
pip install latent-gate[bedrock]
pip install latent-gate[tokens]
pip install latent-gate[all]
ollama pull llava:7b # Vision model (required for image queries)
ollama pull llama3:8b # Text model (required for text compression & prediction)
chmod +x scripts/quickstart.sh
./scripts/quickstart.sh
This starts everything: Ollama → pulls models → API server → website. See scripts/quickstart.sh for options like --no-pull, --no-website, --port 9000.
# Image query
latent-gate photo.jpg "What is in this image?" --provider ollama -v
latent-gate --text "Your long prompt here..." --provider ollama -v
latent-gate --text-file prompt.txt --provider openai -v
latent-gate photo.jpg "Analyze" --text "Extra context..." -v
latent-gate photo.jpg "Describe" --json -v
cat prompt.txt | latent-gate --text-file - --compress-only --deterministic --level balanced
latent-gate --optimizer-benchmark
latent-gate --benchmark --benchmark-output reports/benchmark.json
latent-gate-api
For API deployments, restrict direct image-path reads to trusted directories:
set LATENTGATE_ALLOWED_IMAGE_ROOTS=C:\safe-images;D:\datasets
latent-gate-api
Benchmark before releases so speed and savings are measured, not guessed:
latent-gate --benchmark --json
from latent_gate import LatentGatePipeline, PipelineConfig
config = PipelineConfig( vision_model="llava:7b", predictor_model="llama3:8b", remote_provider="openai", remote_model="gpt-4o-mini", )
with LatentGatePipeline(config) as pipeline: result = pipeline.query("photo.jpg", "What is in this image?")
print(result["answer"]) print(f"Tokens sent: ~{result['tokens_estimated']}") print(f"Timing: {result['timing']}")
# Long prompt compression
result = pipeline.query_text("Your 500-word prompt here...", mode="auto")
messages = [ {"role": "user", "content": "Help me with Kubernetes setup"}, {"role": "assistant", "content": "Sure! What's your target configuration?"}, {"role": "user", "content": "3 nodes, t3.large, us-east-1 with autoscaling"}, ] result = pipeline.query_conversation(messages, "Now give me the setup commands")
documents = ["doc1 text...", "doc2 text...", "doc3 text..."] result = pipeline.query_documents(documents, "How do I implement JWT refresh?")
result = pipeline.query_universal(text="Explain this code...", image="screenshot.png")
# Sequential with selective decoding (skips redundant API calls)
results = pipeline.query_batch(image_paths, "Describe each scene
只显示了开头部分;其余内容请在仓库中阅读