Metadata-Version: 2.4
Name: agent-context-optimizer-mcp
Version: 0.1.0
Summary: MCP Server that solves context window overload — smart tool pruning, relevance scoring, and budget tracking for AI agents
Project-URL: Homepage, https://github.com/AiAgentKarl/agent-context-optimizer-mcp
Project-URL: Repository, https://github.com/AiAgentKarl/agent-context-optimizer-mcp
Author: AiAgentKarl
License: MIT
Keywords: agent,context,mcp,optimization,token-budget,tool-pruning
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# Agent Context Optimizer MCP ⚡

Solves the **#1 problem** with MCP servers: **context window overload**.

When you have 10+ MCP servers installed, their tool schemas can consume 40-50% of your context window — leaving less room for actual conversation. This server fixes that.

## What it does

- **Analyzes your task** and recommends only the servers you actually need
- **Estimates token usage** for any combination of servers
- **Optimizes your server set** by identifying which servers to unload
- **Suggests minimal configurations** for maximum context efficiency

## Installation

```bash
pip install agent-context-optimizer-mcp
```

## Usage with Claude Code

```json
{
  "mcpServers": {
    "optimizer": {
      "command": "uvx",
      "args": ["agent-context-optimizer-mcp"]
    }
  }
}
```

## Tools

| Tool | Description |
|------|-------------|
| `analyze_task` | Analyze a task and recommend optimal server combination |
| `estimate_context_usage` | Estimate context window consumption for servers |
| `get_server_catalog` | Full catalog of known MCP servers with categories |
| `optimize_server_set` | Optimize currently loaded servers for a task |
| `suggest_minimal_set` | Recommend the absolute minimum servers needed |

## Example

```
"I need to check the safety of a Solana token"
→ Recommends: solana (required)
→ Saves: 85% context tokens vs loading all servers
```

## Why this matters

- Average MCP server uses ~3,000 tokens for tool schemas
- 10 servers = ~30,000 tokens = 15% of a 200k context window
- 20 servers = ~60,000 tokens = 30% wasted on tool definitions
- This optimizer helps you load only what you need

## License

MIT
