MCP.so
登录
C

Context Rot Detection

@milos-product-maker

关于 Context Rot Detection

Context Rot Detection & Healing — gives AI agents self-awareness about their cognitive state by analyzing token utilization, quality degradation, and session fatigue. Returns health scores (0-100), model-specific degradation curves for 15+ models, lost-in-the-middle risk scoring,

基本信息

分类

其他

传输方式

stdio

发布者

milos-product-maker

提交者

Miloš Borenović

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "context-rot-detection": {
      "command": "npx",
      "args": [
        "-y",
        "context-rot-detection"
      ],
      "env": {
        "HEALTH_HISTORY_DB": "./health.db"
      }
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Context Rot Detection?

Context Rot Detection is an MCP service that gives AI agents real-time visibility into their own cognitive health. It measures performance degradation as the context window fills up, providing a health score (0–100) based on token utilization, retrieval accuracy, and session fatigue. It is designed for developers building long-running production agent systems.

How to use Context Rot Detection?

Install via npx (zero install) or npm global install. Configure as an MCP client tool for Claude Code or Claude Desktop, or run with Docker. Use the check_my_health tool periodically to analyze the current context window health, passing required token count and optional parameters.

Key features of Context Rot Detection

  • Health score (0–100) based on token utilization, retrieval accuracy, and session fatigue
  • Model-specific degradation curves for 15+ curated models (Claude, GPT, Gemini, o-series)
  • Auto-resolves any HuggingFace model, caching context window in SQLite
  • Lost-in-the-middle risk scoring based on Stanford research
  • Actionable recovery recommendations (compact context, offload, checkpoint)
  • Per-agent health history tracking and service-wide utilization statistics

Use cases of Context Rot Detection

  • Monitoring real-time cognitive health of long-running AI agents
  • Detecting context rot before critical decisions or actions
  • Analyzing per-agent health trends and service-wide degradation patterns
  • Providing actionable recommendations to mitigate quality loss

FAQ from Context Rot Detection

What signals make up the health score?

The health score is a weighted composite of token utilization quality (40%), retrieval accuracy (25%), tool-call burden (20%), and session length (15%).

How are model-specific degradation curves determined?

Curves are derived from empirical research (Chroma, Stanford, Redis) and are provided for 15+ curated models. Any HuggingFace model can be auto-resolved by fetching its config.json to extract context window size.

What data is stored and where?

Health history is stored in a SQLite database configured via the HEALTH_HISTORY_DB environment variable (defaults to :memory:). The server caches HuggingFace model lookups in the same database.

Does the server require network access?

Yes, for HuggingFace model auto-resolution it fetches config.json from the HuggingFace repo. If that fails, it falls back to conservative defaults. Local model detection does not require network.

What transports and authentication are supported?

The server uses stdio transport (standard MCP). There is no built-in authentication; it is intended to be invoked by MCP clients like Claude Desktop or Claude Code.

评论

其他 分类下的更多 MCP 服务器