nettune
A network diagnostics and TCP optimization tool with MCP (Model Context Protocol) integration for AI-assisted configuration.
claude mcp add --transport stdio jtsang4-nettune nettune client --api-key YOUR_SECRET_KEY --server http://YOUR_SERVER:9876
How to use
Nettune is a network diagnostics and TCP optimization tool that exposes a set of MCP tools to help you measure, profile, and optimize network performance on Linux servers. The MCP client lets an AI assistant or chat UI invoke functions like test_rtt, test_throughput, test_latency_under_load, and profile management actions (snapshot, apply, rollback, etc.). You can operate Nettune in server mode to listen for incoming MCP requests, and in client mode to query the server from a chat interface. Typical workflows include running baseline measurements, selecting a suitable optimization profile, and safely applying changes with built-in snapshots and rollback options. The built-in profiles cover common scenarios from low latency to high throughput and bufferbloat mitigation, enabling you to tailor tuning to your environment. The MCP integration is designed to work with LLMs and chat interfaces (e.g., Claude) via the MCP stdio protocol, making it easy to automate diagnostics and optimization steps through natural language prompts.
How to install
Prerequisites:
- Linux server (recommended) with root or sudo access
- Go toolchain installed (for building from source)
- Git
- Basic networking knowledge
From source (recommended for custom builds):
# Clone the repository
git clone https://github.com/jtsang4/nettune.git
cd nettune
# Install dependencies
go mod tidy
# Build
make build
# Optional: build for all platforms
make build-all
Running in server mode (example):
# Start the server with an API key (adjust key and options as needed)
sudo nettune server --api-key YOUR_SECRET_KEY
# With custom options (bind address and state dir)
sudo nettune server --api-key YOUR_SECRET_KEY --listen 0.0.0.0:9876 --state-dir /var/lib/nettune
Client usage (MCP) example already covered in the mcp_config section; you can also use the NPM wrapper if published as an npm package (see project docs).
Additional notes
Tips and notes:
- Always run baseline measurements before applying any profile changes (phase 1 in the system prompt workflow).
- Use snapshot (nettune.snapshot_server) before applying a profile, so rollback is possible if needed.
- The available built-in profiles target common scenarios (e.g., low latency, high throughput, bufferbloat mitigation). If default settings don’t meet your needs, create a custom profile with nettune.create_profile and apply it with nettune.apply_profile.
- Ensure the server is reachable by the MCP client (check network, firewall, and listen address/port).
- When testing latency under load, consider longer test durations and multiple iterations to capture variance.
- If you encounter issues, consult the HTTP API endpoints under /sys and /probe for status and diagnostics.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
kodit
👩💻 MCP server to index external repositories
github-brain
An experimental GitHub MCP server with local database.
bgg
BGG MCP provides access to BoardGameGeek and a variety of board game related data through the Model Context Protocol. Enabling retrieval and filtering of board game data, user collections, and profiles.
mcp
Teamwork.com MCP server
chromedp
MCP server for browser automation using chromedp