V3 MCP Optimization

V3 MCP Optimization is a skill for Claude Code from Soulcynics404/AgentForge. It costs 42 tokens per session (5,067 once invoked), scanned A, a copy of V3 MCP Optimization, MIT.

A performance-tuning skill for MCP servers, which let an AI agent call tools and services. It focuses on connection reuse, request distribution, tool lookup, and performance monitoring.

In plain words
What is it for?
Use it to inspect and improve an MCP server's transport layer, connection pooling, load balancing, tool registry, and response-time monitoring.
Why use it?
It helps address slow startup, repeated connection setup, inefficient tool searches, and unused connections consuming memory.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: installed under .agents/ (shared by several agents).

Part of the claude-flow plugin — 134 skills, 52 commands, 11 agents, 4 hooks, 1 MCP server shipped together

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 skills/soulcynics404/agentforge/v3-mcp-optimization
Any agent
npx skills add Soulcynics404/AgentForge --skill v3-mcp-optimization
Clone the repo
git clone --depth 1 https://github.com/Soulcynics404/AgentForge

Made for: Claude Code.

Or install claude-flow, the plugin that ships this one along with the rest of its 134 skills, 52 commands, 11 agents, 4 hooks, 1 MCP server.

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 V3 MCP Optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/soulcynics404/agentforge/v3-mcp-optimization.svg)](https://agentmods.dev/skills/soulcynics404/agentforge/v3-mcp-optimization)
Your own site
<a href="https://agentmods.dev/skills/soulcynics404/agentforge/v3-mcp-optimization"><img src="https://agentmods.dev/badge/skills/soulcynics404/agentforge/v3-mcp-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,067 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.1 $0.00042 $0.05067
Opus 5 $0.00021 $0.02534
Sonnet 5 $0.00008 $0.01013
Haiku 4.5 $0.00004 $0.00507

Measured 2d ago against content hash a0ff9e8f8d26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

V3 MCP Optimization 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 2d 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.

Origin

This is a copy

100% identical to V3 MCP Optimization — 28 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/v3-mcp-optimization/SKILL.md · 777 lines

How it starts

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

V3 MCP Optimization

What This Skill Does

Optimizes claude-flow v3 MCP (Model Context Protocol) server implementation with advanced transport layer optimizations, connection pooling, load balancing, and comprehensive performance monitoring to achieve sub-100ms response times.

Quick Start

# Initialize MCP optimization analysis
Task("MCP architecture", "Analyze current MCP server performance and bottlenecks", "mcp-specialist")

# Optimization implementation (parallel)
Task("Connection pooling", "Implement MCP connection pooling and reuse", "mcp-specialist")
Task("Load balancing", "Add dynamic load balancing for MCP tools", "mcp-specialist")
Task("Transport optimization", "Optimize transport layer performance", "mcp-specialist")

MCP Performance Architecture

Current State Analysis

Current MCP Issues:
├── Cold Start Latency: ~1.8s MCP server init
├── Connection Overhead: New connection per request
├── Tool Registry: Linear search O(n) for 213+ tools
├── Transport Layer: No connection reuse
└── Memory Usage: No cleanup of idle connections

Target Performance:
├── Startup Time: <400ms (4.5x improvement)
├── Tool Lookup: <5ms (O(1) hash table)
├── Connection Reuse: 90%+ connection pool hits
├── Response Time: <100ms p95
└── Memory Efficiency: 50% reduction

MCP Server Architecture

// src$core$mcp$mcp-server.ts
import { Server } from '@modelcontextprotocol$sdk$server$index.js';
import { StdioServerTransport } from '@modelcontextprotocol$sdk$server$stdio.js';

interface OptimizedMCPConfig {
  // Connection pooling
  maxConnections: number;
  idleTimeoutMs: number;
  connectionReuseEnabled: boolean;

  // Tool registry
  toolCacheEnabled: boolean;
  toolIndexType: 'hash' | 'trie';

  // Performance
  requestTimeoutMs: number;
  batchingEnabled: boolean;
  compressionEnabled: boolean;

  // Monitoring
  metricsEnabled: boolean;
  healthCheckIntervalMs: number;
}

export class OptimizedMCPServer {
  private server: Server;
  private connectionPool: ConnectionPool;
  private toolRegistry: FastToolRegistry;
  private loadBalancer: MCPLoadBalancer;
  private metrics: MCPMetrics;

  constructor(config: OptimizedMCPConfig) {
    this.server = new Server({
      name: 'claude-flow-v3',
      version: '3.0.0'
    }, {
      capabilities: {
        tools: { listChanged: true },
        resources: { subscribe: true, listChanged: true },
        prompts: { listChanged: true }
      }
    });

    this.connectionPool = new ConnectionPool(config);
    this.toolRegistry = new FastToolRegistry(config.toolIndexType);
    this.loadBalancer = new MCPLoadBalancer();
    this.metrics = new MCPMetrics(config.metricsEnabled);
  }

  async start(): Promise<void> {
    // Pre-warm connection pool
    await this.connectionPool.preWarm();

    // Pre-build tool index
    await this.toolRegistry.buildIndex();

    // Setup request handlers with optimizations
    this.setupOptimizedHandlers();

    // Start health monitoring
    this.startHealthMonitoring();

    // Start server
    const transport = new StdioServerTransport();
    await this.server.connect(transport);

    this.metrics.recordStartup();
  }
}

Read the full file on GitHub · 777 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. 2d ago First seen · 777 lines · 42 tokens per session scan A a0ff9e8f8d26

Subscribe to this mod's changes

V3 MCP Optimization is a skill published in the GitHub repository Soulcynics404/AgentForge (1 stars, last pushed 13d ago), licensed MIT. It adds 42 tokens to every session and 5,067 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to V3 MCP Optimization, differing in 28 lines, and is treated as a copy.

Related

Other skills, from other repositories

browser-automation

Playwright-based browser automation patterns for autonomous web interaction.

RightNow-AI/openfang · 14 tokens

clip-hand-skill

Expert knowledge for AI video clipping — yt-dlp downloading, whisper transcription, SRT generation, and ffmpeg processing.

RightNow-AI/openfang · 28 tokens

twitter-hand-skill

Expert knowledge for AI Twitter/X management — API v2 reference, content strategy, engagement playbook, safety, and performance tracking.

RightNow-AI/openfang · 30 tokens

package-author

当用户要把手头的工具打包/标准化成 pinvou 插件包时使用——包括纯技能(SKILL.md)、纯 MCP 服务或它们的组合包。用户说"打包/做成插件包/标准化这个工具/给我一个能上传的标准包/写 plugin.json/加个图标"等,或给了散乱脚本/目录要整理成可上传 zip 时,用本技能把内容规范成 plugin-protocol 标准包(补 plugin.json、补 mcp/manifest.json、补 SKILL.md、补图标、校验命名)。.

Pinvou/pinvou-agent · 133 tokens

slack-tools

Slack workspace management and automation specialist.

RightNow-AI/openfang · 10 tokens

routing-card-authoring

Use whenever a build emits or repairs .agentlas/routing-card.json — the shared card contract for the single-agent builder, the team builder, and the packager. States what belongs in every field, which fields the hub can actually match on, and which fields silently break matching when a sentence leaks into them.

agentlas-ai/Agentlas-OS · 68 tokens