Get Kilometers monitoring set up in under 5 minutes. This guide will walk you through installation, configuration, and your first monitoring session with real CLI commands.
This guide has been updated to reflect the actual CLI commands and functionality. The Kilometers CLI works as a transparent wrapper around MCP servers - no separate "init" or "start" commands needed.
Before you begin, make sure you have:
curl -sSL https://get.kilometers.ai/install.sh | sh# Download from GitHub releases
# Extract and add to PATHDownload the latest binary from our GitHub releases page, extract it, and add it to your PATH.
km --versionSet your API credentials as environment variables:
export KILOMETERS_API_KEY="your-api-key"
export KILOMETERS_API_URL="https://api.kilometers.ai"Get your API key: Sign up at kilometers.ai and find your API key in the dashboard.
Now let's monitor your first MCP server. Simply prefix your existing MCP command with km:
km npx @modelcontextprotocol/server-githubThis will start the GitHub MCP server with Kilometers monitoring. You should see output like:
[km] Starting Kilometers CLI wrapper for: [npx @modelcontextprotocol/server-github]
[km] Started process with PID: 12345
[km] Event #1: request tools/call (156 bytes)Update your AI tool's MCP configuration to use km instead of the direct command:
{
"mcpServers": {
"github": {
"command": "km",
"args": ["npx", "@modelcontextprotocol/server-github"]
}
}
}If you want to see detailed monitoring information, enable debug mode:
KM_DEBUG=true km npx @modelcontextprotocol/server-github