mirror of
https://github.com/anthropics/claude-code.git
synced 2026-01-30 04:02:03 +00:00
This plugin warns users when their MCP servers are consuming significant context (>20k tokens). Many users don't realize MCP servers take up context space, which can lead to unexpectedly fast context exhaustion. The plugin: - Runs a SessionStart hook to check MCP configurations - Estimates token usage based on server and tool counts - Shows a warning with server breakdown if estimated usage > 20k tokens - Provides guidance on how to disable unused MCP servers Slack thread: https://anthropic.slack.com/archives/C07VBSHV7EV/p1765989316572149
18 lines
373 B
JSON
18 lines
373 B
JSON
{
|
|
"description": "Warns users when MCP servers consume significant context (>20k tokens)",
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"matcher": "*",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/check_mcp_context.py",
|
|
"timeout": 10
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|