Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’° Finance & Fintech
  3. Context Rot Detection
Context Rot Detection logo
Health: ActiveRecent health check succeeded.Last checked 9/9/2026, 3:32:32 PM

Context Rot Detection

User RatingsBe the first to rate and review this MCP server!
View Repository13 GitHub StarsTotal stargazers on GitHub for the source repository (13 stars).Visit Website

Monitors AI agent context window health, detects degradation, and provides recovery recommendations based on model-specific data.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "context-rot-detection": {
      "command": "npx",
      "args": [
        "-y",
        "context-rot-detection"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Tool Schemas (3) Directory Badge Claim listing AlternativesπŸ’° More in Finance & Fintech

Overview

This MCP server tracks context rot in long-running AI agents by analyzing token usage, retrieval accuracy, and session fatigue. It calculates a health score (0-100) reflecting cognitive state and offers actionable recommendations to mitigate performance degradation. The service supports over 15 curated models and auto-detects context windows for HuggingFace models, storing health history in SQLite for agent-specific tracking.

Use cases

β€’Monitor token utilization and context quality during long AI sessions
β€’Detect and quantify lost-in-the-middle risks for various LLMs
β€’Provide real-time cognitive health scores to inform agent decisions
β€’Recommend recovery actions like context compaction or memory offloading
β€’Track agent health history to analyze degradation trends over time

Key features

β€’Health scoring based on token count, retrieval accuracy, and fatigue
β€’Model-specific degradation curves for 15+ LLMs including Claude, GPT, Gemini
β€’Automatic context window detection for HuggingFace models with caching
β€’Lost-in-the-middle risk assessment from Stanford research
β€’Session fatigue and tool-call burden analysis
β€’Agent-specific health history stored in SQLite

Capabilities & Tool Schemas (3) ~70 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server β€” may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by Context Rot Detection.

check_my_health

Analyze the current context window health. Call this periodically during long sessions or before critical decisions.

get_health_history

Retrieve health check history for a specific agent.

get_service_stats

Get service-wide utilization statistics. No parameters required.

Documentation Overview

Context Rot Detection

MCP service that gives AI agents self-awareness about their cognitive state.

Every long-running AI agent suffers from context rot β€” measurable performance degradation as the context window fills up. Research from Chroma, Stanford ("lost-in-the-middle"), and Redis confirms this is the #1 practical failure mode in production agent systems.

An agent experiencing context rot doesn't know it's degrading β€” it just starts making worse decisions. This tool gives agents real-time visibility into their own cognitive health.

Features

  • 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 β€” pass a repo ID like meta-llama/Llama-3.1-70B and the context window is detected automatically, with results cached in SQLite
  • Lost-in-the-middle risk scoring based on Stanford research
  • Tool-call burden and session fatigue analysis
  • Actionable recovery recommendations β€” compact context, offload to memory, checkpoint, break into subtasks
  • Per-agent health history tracking (SQLite)
  • Service-wide utilization statistics

Quick Start

npx (zero install)

Terminal
npx context-rot-detection

npm (global install)

Terminal
npm install -g context-rot-detection
context-rot-detection

MCP Client Configuration

Claude Code

Add to .mcp.json in your project root:

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

Claude Desktop

Add to claude_desktop_config.json:

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

Docker

config.json
{
  "mcpServers": {
    "context-rot-detection": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "context-rot-data:/data",
        "ghcr.io/milos-product-maker/context-rot-detection:latest"
      ]
    }
  }
}

Configuration

Environment VariableDescriptionDefault
HEALTH_HISTORY_DBPath to SQLite database for health history. Use :memory: for ephemeral storage.:memory:
LOG_FILEPath to append structured JSON log lines. Omit to disable file logging.(none)

Tools

check_my_health

Analyze the current context window health. Call this periodically during long sessions or before critical decisions.

Parameters:

ParameterTypeRequiredDescription
token_countintegerYesCurrent estimated token count in context window
modelstringNoLLM model identifier β€” a curated name (e.g., claude-opus-4, gpt-4o), a HuggingFace repo ID (e.g., meta-llama/Llama-3.1-70B), or any string (falls back to conservative defaults)
session_duration_minutesintegerNoHow long this session has been running
tool_calls_countintegerNoNumber of tool calls made in this session
context_summarystringNoBrief summary of current task and recent actions
agent_idstringNoUnique agent identifier for history tracking

Example response:

config.json
{
  "health_score": 62,
  "status": "warning",
  "token_utilization": {
    "current": 155000,
    "max_effective": 170000,
    "percentage": 91.2,
    "danger_zone_starts_at": 170000
  },
  "quality_estimate": {
    "retrieval_accuracy": "degrading",
    "middle_content_risk": "high",
    "estimated_hallucination_risk": "moderate"
  },
  "session_fatigue": {
    "tool_call_burden": "moderate",
    "session_length_risk": "low",
    "recommendation": "Consider breaking into sub-tasks if complexity increases."
  },
  "recommendations": [
    {
      "priority": "high",
      "action": "compact_context",
      "reason": "You are approaching the effective quality threshold. Summarize older context and remove completed task details.",
      "estimated_quality_gain": 15
    },
    {
      "priority": "high",
      "action": "offload_to_memory",
      "reason": "High risk of lost-in-the-middle effect. Store critical information to external memory before it is effectively lost.",
      "estimated_quality_gain": 8
    }
  ]
}

get_health_history

Retrieve health check history for a specific agent.

Parameters:

ParameterTypeRequiredDescription
agent_idstringYesUnique agent identifier
limitintegerNoMax records to return (default: 20, max: 100)

get_service_stats

Get service-wide utilization statistics. No parameters required.

Returns total calls, unique agents, average health score, model distribution, status distribution, and recent activity (last hour / last 24h).

Supported Models

ModelMax TokensDanger ZoneMiddle-Loss Risk
claude-opus-4-5200K175KLow
claude-opus-4200K170KLow
claude-sonnet-4200K165KLow
claude-3.7-sonnet200K160KLow–Medium
claude-3.5-sonnet200K152KMedium
claude-haiku-3.5200K130KMedium
gpt-4.11M500KMedium
gpt-4.1-mini1M450KMedium
gpt-4o128K105KMedium
gpt-4o-mini128K95KMedium–High
o3200K160KLow–Medium
o4-mini200K150KMedium
gemini-2.5-pro1M600KMedium
gemini-2.5-flash1M520KMedium–High
gemini-2.0-flash1M500KHigh

HuggingFace Auto-Resolution

Any model string containing / is treated as a HuggingFace repo ID. The server fetches config.json from the repo, extracts the context window size (max_position_embeddings, n_positions, or max_seq_len), and generates a conservative degradation profile:

  • 65% of max tokens β†’ degradation onset
  • 80% of max tokens β†’ danger zone

Results are cached in SQLite β€” subsequent lookups are instant.

Code
model: "meta-llama/Llama-3.1-70B"       β†’ 131K context, danger at 105K
model: "mistralai/Mistral-7B-v0.1"      β†’ 32K context, danger at 26K
model: "mosaicml/mpt-7b"                β†’ 65K context, danger at 52K

If the fetch fails (network error, gated model, missing config), the server falls back silently to conservative defaults.

Fallback

Any unrecognized model string without / falls back to conservative defaults (128K max, 100K danger zone).

How It Works

The health score is a weighted composite of four signals:

SignalWeightSource
Token utilization quality40%Model-specific sigmoid degradation curve
Retrieval accuracy25%Base accuracy minus lost-in-the-middle penalty
Tool-call burden20%Compounding quality loss after 10+ tool calls
Session length15%Time-based fatigue heuristic

The degradation curves are derived from empirical research:

  • Chroma: Context Rot β€” quality degrades around 147K–152K tokens on 200K models
  • Stanford: Lost in the Middle β€” retrieval accuracy drops for information in the middle of the context window
  • Redis: Context Rot β€” compounding degradation effects in long-running agents

Development

bash
git clone https://github.com/milos-product-maker/context-rot-detection.git
cd context-rot-detection
npm install
npm run dev        # Run with tsx (hot reload)
npm test           # Run unit tests
npm run build      # Compile TypeScript

Testing with MCP Inspector

Terminal
npx @modelcontextprotocol/inspector node dist/index.js

License

MIT

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Finance & Fintech View all alternatives
  • Brazilian Central Bank (BCB) MCP logoBrazilian Central Bank (BCB) MCP
    Verified

    MCP server for the Brazilian Central Bank (Banco Central do Brasil): SGS time series (Selic, IPCA, exchange rates, GDP and 139 curated, source-verified indicators), the Focus market-expectations survey and PTAX official exchange rates. 15 tools, 3 resources and 3 prompts, with provenance metadata on every response. Runs locally via npx (stdio) or through the hosted endpoint at https://bcb.sidneybissoli.com/mcp β€” no API key or signup required.

    πŸ’° Finance & Fintech7 views
    Compare vs Brazilian Central Bank (BCB) MCP β†’
  • Tradingview MCP logoTradingview MCP

    Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.

    πŸ’° Finance & Fintech4 views
    Compare vs Tradingview MCP β†’
  • Oathscore logoOathscore

    The trust layer for AI trading agents. Real-time world state (exchange status, VIX/VVIX/SKEW, economic events) in one call, plus independent quality ratings (0-100) for financial data APIs. 8 MCP tools.

    πŸ’° Finance & Fintech2 views
    Compare vs Oathscore β†’
  • Tasty Agent logoTasty Agent

    Tastyworks API integration to handle trading activities on Tastytrade

    πŸ’° Finance & Fintech4 views
    Compare vs Tasty Agent β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars
13
Stargazers on the source repository.
npm downloads
158
Package downloads in the last 30 days.
Last commit
6mo ago
Most recent push to the default branch.
Tools exposed
3
Callable tools this server registers over MCP.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Context Rot Detection

Context rot is the degradation of AI agent performance as the context window fills, causing worse decisions without the agent's awareness.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewContext Rot Detection AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/context-rot-detection?style=directory)](https://allmcps.com/mcp/context-rot-detection)
HTML Embed
<a href="https://allmcps.com/mcp/context-rot-detection"><img src="https://allmcps.com/api/badge/context-rot-detection?style=directory" alt="Context Rot Detection on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ’°Finance & Fintech
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedAug 7, 2026
11/11 checks healthy over the last 34d
Views1
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars13
GitHub Star CountTotal stargazers on GitHub representing community popularity (13 stars).
Last commit6mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Feb 18, 2026
npm downloads158/mo
Monthly npm DownloadsAverage monthly package installs recorded from npm registry statistics.
56Quality signal: Good Β· 56/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools27/30
Adoption & activity5/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev Β· context-rot-detection (npm)

β˜… FeaturedAllMCPs Server logo

AllMCPs Server

The official MCP server for AllMCPs.com - submit and manage tools directly from your AI. The open directory for MCP servers. Connect Claude, Cursor, Windsurf, and AI agents to databases, tools, files, and APIs. Explore 10,000+ servers. AllMCPs is the premier, open directory for discovering, evaluating, and installing Model Context Protocol (MCP) servers to equip AI agents and LLMs with real-world superpowers.

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’° Finance & Fintech β†’Best MCP servers for Finance & Fintech β†’Alternatives to Context Rot Detection β†’Install in Claude DesktopInstall in CursorInstall in VS Code