tcp-tuner
Save tuning runbooks as Markdown to a Git repository, committing and pushing changes automatically with a returned commit SHA.
Manage TCP congestion-control tuning across a Kubernetes cluster: run iperf3 benchmarks as Jobs, read/write sysctl parameters on worker nodes via a privileged DaemonSet, and inject/clear network faults.
Read and modify Linux kernel TCP sysctl parameters (e.g., tcp_congestion_control, rmem_max, tcp_slow_start_after_idle) on worker nodes to optimize throughput and latency.
Run PromQL queries against an in-cluster Prometheus instance to fetch live node metrics (throughput, retransmits, CPU) for monitoring and validating tuning changes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tcp-tunerRun a baseline benchmark and tune TCP parameters to maximize throughput"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TCP Congestion Tuner
An agentic TCP congestion-control tuning system where Bob (IBM watsonx Code Assistant) autonomously benchmarks, diagnoses, tunes Linux kernel TCP parameters, injects network faults, queries live Prometheus metrics, and commits runbooks to git — converging toward a user-defined SLO with zero human involvement per iteration.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Bob (TCP Tuner Mode) │
│ "cwnd collapsing — switch to BBR, increase rmem_max" │
└──────────────────────────┬──────────────────────────────────┘
│ MCP tools (stdio)
┌──────────────────────────▼──────────────────────────────────┐
│ MCP Server (Node.js) │
│ run_benchmark │ get_sysctl_params │ apply_sysctl │
│ │ get_benchmark_history │
└──────────────────────────┬──────────────────────────────────┘
│ kubectl
┌──────────────────────────▼──────────────────────────────────┐
│ kind Kubernetes Cluster (3 nodes) │
│ │
│ ┌─────────────────┐ ┌──────────────────────────────┐ │
│ │ iperf3-server │◄───│ iperf3-client (Job) │ │
│ │ (Deployment) │ │ measures throughput/RTT │ │
│ └─────────────────┘ └──────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ sysctl-tuner DaemonSet (privileged, hostNetwork) │ │
│ │ worker-node-1 pod │ worker-node-2 pod │ │
│ │ reads/writes kernel TCP sysctl params │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘Related MCP server: OCP Performance Analyzer MCP
Prerequisites
Tool | Version | Install |
Docker Desktop | 29+ | |
kubectl | v1.34+ | bundled with Docker Desktop |
kind | v0.29+ |
|
Node.js | v22 LTS |
|
Python | 3.12+ |
Quick Start
1. Spin up the cluster
cd cluster
.\start.ps1This creates a 3-node kind cluster (1 control-plane + 2 workers), deploys the iperf3 server, and starts the sysctl-tuner DaemonSet on both worker nodes.
2. Install and build the MCP server
cd mcp-server
npm install
npm run build3. Register the MCP server with Bob
Add to your Bob MCP config (~/.bob/mcp-settings.json or via Bob UI → Settings → MCP):
{
"mcpServers": {
"tcp-tuner": {
"command": "node",
"args": ["<absolute-path-to-repo>/tcp-congestion-tuner/mcp-server/src/index.js"],
"cwd": "<absolute-path-to-repo>/tcp-congestion-tuner"
}
}
}4. Load the custom Bob mode
Copy .bob/custom_modes.yaml to your Bob workspace config, or merge it into your existing custom modes file.
5. Start tuning
Open Bob, switch to TCP Tuner mode, and say:
"Run a baseline benchmark, inspect the current sysctl configuration, and autonomously tune TCP parameters to maximise throughput."
Bob will run the full detect → diagnose → tune → validate loop.
Manual CLI Usage
# Run a benchmark
python scripts/benchmark.py run
# Show last 10 benchmark runs
python scripts/benchmark.py history
# Compare the last two runs
python scripts/benchmark.py compare
# Read current sysctl params
python scripts/benchmark.py sysctl get
# Apply a sysctl change manually
python scripts/benchmark.py sysctl set net.ipv4.tcp_congestion_control bbrMCP Tools Reference
# | Tool | Description |
1 |
| Launches iperf3 Job, returns throughput/RTT/retransmits + sysctl snapshot |
2 |
| Reads all TCP sysctl values from a worker node |
3 |
| Writes a sysctl value on one or all worker nodes via privileged DaemonSet pod |
4 |
| Returns past N runs for trend comparison |
5 |
| Injects packet loss + delay via |
6 |
| Removes netem qdiscs, restores clean network |
7 |
| Writes Markdown runbook to |
8 |
| Runs PromQL query against in-cluster Prometheus, returns live node metrics |
9 |
| Evaluates last benchmark against SLO targets; returns pass/fail + next-action recommendation |
10 |
| Generates a self-contained HTML report with SVG trend charts from benchmark history |
11 |
| Compares latest run vs a golden baseline; returns pass/fail for use in CI |
Observability
Deploy Prometheus + Grafana into the cluster:
kubectl apply -f manifests/monitoring.yamlOpen the live dashboard (auto port-forwards and opens browser):
.\cluster\port-forward.ps1
# Grafana: http://localhost:3000/d/tcp-tuner (admin / tcptuner)
# Prometheus: http://localhost:9090The TCP Congestion Tuner dashboard shows:
Network transmit/receive Mbps (all nodes)
TCP retransmits/sec (kernel counter via node-exporter)
CPU usage % (iperf3 load visibility)
Known Limitations (kind cluster)
These are expected artifacts of running Kubernetes inside Docker — not bugs:
Limitation | Explanation |
Baseline retransmits ~1,000–2,000 on clean network | veth/bridge interfaces inside kind containers exhibit higher retransmit rates than bare-metal under high-throughput iperf3. The reduction from tuning is real; the absolute baseline is inflated. |
| These params are not namespaced and cannot be written from inside a container network namespace. |
| kind's control-plane runs as a container on the same host network. Injecting fault on control-plane's eth0 can cause kubectl timeouts. Use |
Throughput limited by loopback BDP | 50–75 Gbps is a loopback ceiling, not a real network limit. Buffer sizing changes show their full impact on real network paths with RTT > 1ms. |
Key Kubernetes Concepts Demonstrated
DaemonSet — sysctl-tuner runs on every worker node automatically
Privileged pods with hostNetwork — required to read/write host kernel parameters
Job — iperf3 client runs once and terminates cleanly
Headless Service — iperf3 server addressable by DNS name within the cluster
Node-level sysctl tuning — per-node kernel parameter management in K8s
Tuning Playbook (What Bob Does)
Change | Reason | Expected Impact |
| BBR tracks bottleneck bandwidth directly; better in high-BDP paths | +10–40% throughput, fewer retransmits |
| Larger receive buffers allow higher in-flight data | Higher throughput on high-latency links |
| Prevents cwnd reset after idle bursts | Important for bursty market-data feeds |
| Reduces bufferbloat in the socket send queue | Lower RTT under load |
Teardown
cd cluster
.\teardown.ps1Bob Integration
This project is designed to be driven entirely by Bob in TCP Tuner mode. Three key prompts cover the full lifecycle:
Baseline + autonomous tuning
Run a baseline benchmark, read the current sysctl configuration, then autonomously tune TCP
parameters to maximise throughput. Show a before/after comparison table after each change.
Save a runbook to the runbooks/ folder when done.SLO-driven convergence loop
Tune until retransmits < 500 and throughput > 50000 Mbps. Run autonomously — apply one
sysctl change per iteration, benchmark, check SLO, repeat until SLO passes or playbook
exhausted. Save a runbook to git when done.Fault-injection resilience
Inject 3% packet loss. Run the fault-resilience tuning loop: benchmark under fault, tune
to compensate, clear the fault, confirm recovery, save runbook.Bob uses the tcp-tuner skill (.bob/skills/tcp-tuner/SKILL.md) for structured agentic
best practices: 4 phases, 6 invariants, a full tuning playbook, and runbook templates.
Project Structure
tcp-congestion-tuner/
├── cluster/
│ ├── kind-config.yaml # 1 control-plane + 2 worker nodes
│ ├── start.ps1 # cluster bootstrap script
│ ├── port-forward.ps1 # Grafana + Prometheus port-forward for demos
│ └── teardown.ps1 # cluster cleanup
├── manifests/
│ ├── iperf-server.yaml # iperf3 server Deployment + headless Service
│ ├── iperf-client-job.yaml # iperf3 benchmark Job
│ ├── tuner-daemonset.yaml # privileged sysctl-tuner DaemonSet (alpine + iproute2)
│ ├── monitoring.yaml # Prometheus + node-exporter DaemonSet + Grafana
│ └── alerts.yaml # TcpHighRetransmits + TcpThroughputDrop alert rules
├── mcp-server/
│ ├── package.json
│ ├── tsconfig.json
│ └── src/
│ └── index.ts # 9 MCP tools (TypeScript source)
├── scripts/
│ └── benchmark.py # CLI benchmark runner, comparator, rollback
├── tests/
│ └── test_benchmark.py # 119 pytest tests, 98% coverage
├── runbooks/ # Bob-generated runbooks (auto-committed by save_runbook)
├── .bob/
│ ├── custom_modes.yaml # TCP Tuner Bob mode with SLO convergence loop
│ └── skills/tcp-tuner/
│ └── SKILL.md # Reusable agentic best-practices skill
└── README.mdThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables real-time Kubernetes cluster observability and debugging through standardized MCP interface. Provides access to pods, services, nodes, events, and includes built-in tools for cluster health analysis and issue identification.Last updated
- Alicense-qualityDmaintenanceA comprehensive, AI-powered performance analysis and monitoring platform for OpenShift/Kubernetes clusters. This project provides Model Context Protocol (MCP) servers for analyzing etcd, network, and OVN-Kubernetes components with deep performance insights, automated root cause analysis, and actionable recommendations.Last updated1Apache 2.0
- Alicense-qualityCmaintenanceAn open source MCP server empowering SREs with intelligent observability, predictive analytics, and AI-driven automation across Kubernetes, OpenShift, and Tekton environments.Last updated11Apache 2.0
- FlicenseAqualityCmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.Last updated9
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Benchmark-first release surface with a read-only MCP endpoint and operator CLI.
Remote MCP for A2A failure replay MCP, structured receipts, audit logs, and reviewer-ready evidence.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PiSpike/tcp-congestion-tuner'
If you have feedback or need assistance with the MCP directory API, please join our Discord server