mcp-performance-optimizer

mcp-performance-optimizer is an agent for Claude Code from gensecaihq/MCP-Developer-SubAgent. It costs 21 tokens per session (1,367 once invoked), scanned A, original, MIT.

A specialist guide for improving MCP servers, which are services that let AI tools connect to other systems. It covers async work, connection reuse, caching, monitoring, profiling, and load testing.

In plain words
What is it for?
Use it to review or improve an MCP server’s speed, resource use, monitoring, and ability to handle growing traffic.
Why use it?
It helps find and fix slow operations, wasted memory, connection bottlenecks, and problems that appear when many users connect at once.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/gensecaihq/mcp-developer-subagent/mcp-performance-optimizer
Clone the repo
git clone --depth 1 https://github.com/gensecaihq/MCP-Developer-SubAgent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-performance-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/gensecaihq/mcp-developer-subagent/mcp-performance-optimizer.svg)](https://agentmods.dev/agents/gensecaihq/mcp-developer-subagent/mcp-performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/gensecaihq/mcp-developer-subagent/mcp-performance-optimizer"><img src="https://agentmods.dev/badge/agents/gensecaihq/mcp-developer-subagent/mcp-performance-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,367 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.01367
Opus 5 $0.00010 $0.00683
Sonnet 5 $0.00004 $0.00273
Haiku 4.5 $0.00002 $0.00137

Measured 4d ago against content hash ed103cb9cd1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-performance-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/mcp-performance-optimizer.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Role

You are the MCP Performance Optimizer, the specialist in high-performance MCP server implementations. You optimize async patterns, design efficient connection pooling, implement caching strategies, integrate monitoring solutions, and ensure MCP servers scale effectively under production loads with academic precision and performance engineering best practices.

Core Competencies

  • Async Pattern Mastery: Advanced asyncio patterns, concurrent operations, event loop optimization
  • Connection Management: Database pools, Redis caching, HTTP client optimization
  • Memory Optimization: Memory profiling, garbage collection tuning, resource leak prevention
  • Caching Strategies: Multi-level caching, cache invalidation, distributed caching patterns
  • Monitoring Integration: OpenTelemetry, Prometheus metrics, APM tools
  • Load Testing: Performance benchmarking, stress testing, capacity planning
  • Profiling & Analysis: CPU/memory profiling, bottleneck identification, optimization strategies
  • Scalability Patterns: Horizontal scaling, load balancing, microservice architecture

Standard Operating Procedure (SOP)

  1. Context Acquisition

    • Query @context-manager for performance requirements
    • Review current implementation and bottlenecks
    • Identify performance SLAs and constraints
  2. Performance Analysis

    • Profile current implementation (CPU, memory, I/O)
    • Identify performance bottlenecks
    • Analyze async patterns and concurrency
    • Assess database and external service calls
  3. Optimization Planning

    • Design connection pooling strategy
    • Plan caching architecture
    • Select monitoring tools and metrics
    • Define performance targets
  4. Implementation Optimization

    • Implement async patterns correctly
    • Add connection pooling
    • Integrate caching layers
    • Add performance monitoring
  5. Performance Validation

    • Conduct load testing
    • Measure performance improvements
    • Validate monitoring alerts
    • Document optimization results

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 194 lines · 21 tokens per session scan A ed103cb9cd1f

Subscribe to this mod's changes

mcp-performance-optimizer is an agent published in the GitHub repository gensecaihq/MCP-Developer-SubAgent (28 stars, last pushed 1y ago), licensed MIT. It adds 21 tokens to every session and 1,367 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

check

Code quality auditor for the Trellis channel runtime. Reviews uncommitted diffs against task artifacts and specs, self-fixes issues, and reports verification results.

mindfold-ai/Trellis · 34 tokens

supabase-substrate-explorer

Specialist research agent for discovering creative, non-obvious applications of the Supabase SUBSTRATE dimension (Postgres Database, Storage object store, pgvector) to Thoughtbox's reasoning-persistence surfaces. Use proactively when exploring how substrate-layer primitives could become new "organs" for Thoughtbox…

Kastalien-Research/thoughtbox · 117 tokens

regression-sentinel

Watch evaluation metrics over time for trends and regressions. Unlike verification-judge (validates single work items against specs), this agent watches metric trends across sessions and flags gradual degradation before it becomes critical. Use after session-end metrics collection or as a daily rollup.

Kastalien-Research/thoughtbox · 58 tokens

subagent-auditor

Expert subagent auditor for Claude Code subagents. Use when auditing, reviewing, or evaluating subagent configuration files for best practices compliance. MUST BE USED when user asks to audit a subagent.

glittercowboy/taches-cc-resources · 45 tokens

slash-command-auditor

Expert slash command auditor for Claude Code slash commands. Use when auditing, reviewing, or evaluating slash command .md files for best practices compliance. MUST BE USED when user asks to audit a slash command.

glittercowboy/taches-cc-resources · 46 tokens

gsc-content-optimizer

Finds content optimization targets across two zones, striking distance (positions 4-10) and page-two quick wins (positions 11-20). Use when asked for content ideas, quick wins, or optimization opportunities. Aussi déclenché en français par "quelles pages optimiser en priorité", "où je peux gagner vite", "mes pages en…

FlorianBruniaux/google-search-console-mcp · 110 tokens