Skip to main content

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

pip install agent-context-optimizer-mcp

Usage with Claude Code

{
  "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

Metadata

Release files for agent-context-optimizer-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-context-optimizer-mcp 0.1.0
File Size Uploaded
agent_context_optimizer_mcp-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-context-optimizer-mcp 0.1.0
File Interpreter ABI Platform
agent_context_optimizer_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / agent_context_optimizer_mcp-0.1.0.tar.gz

Download URL agent_context_optimizer_mcp-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bcb4e6a74997f6d171c76d88392a643f8a73e8f582837c34a976fc9230faed57
BLAKE2b-256 checksum
How to use checksums
74c36f2d50d92e4ea92a02dc8e03e8acf9ae26a28b768e50af80b8e8883c9f4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / agent_context_optimizer_mcp-0.1.0-py3-none-any.whl

Download URL agent_context_optimizer_mcp-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6942f3cf933b759e12bf214bbac3f897986728cec916b7fc363bfd38288f1ceb
BLAKE2b-256 checksum
How to use checksums
fc54a4118d940b6a12c7369abf9f048f5924d4df193b66acb7a2825b9809f23a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page