kodekloud-mcp
Click on "Deploy 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., "@kodekloud-mcpCheck my CKA exam readiness and weak areas."
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.
kodekloud-mcp
A production-quality, open-source Model Context Protocol (MCP) server that connects your personal KodeKloud learning account to AI assistants—including Claude Desktop, Claude Code, Cursor, and ChatGPT.
Review course completion, inspect syllabus outlines, view active hands-on labs, track certification exam readiness (CKA, CKAD, CKS, Terraform), and generate personalized weekly study schedules directly from inside your AI chat client.
DISCLAIMER & TERMS OF SERVICE NOTICE
kodekloud-mcp is an independent, unofficial community project. It is not affiliated, associated, authorized, endorsed by, or in any way officially connected with KodeKloud, its subsidiaries, or its affiliates. The official KodeKloud website is available at https://kodekloud.com.
This tool is intended solely for personal educational use by authenticated KodeKloud account holders querying their own learning statistics. Users must strictly abide by KodeKloud's Terms of Service. Do not use this tool to scrape unauthorized content, share subscription access, or bypass platform safeguards.
Table of Contents
Related MCP server: k8s-ops-mcp-server
Features
Read-Only by Default: Safeguards your account against unintentional state changes.
Offline Mock Mode (
KODEKLOUD_USE_MOCK=true): Ships enabled by default so you can test the entire server, inspect tool structures, and run tests immediately without real credentials.Dual Transport Protocols:
stdio: Lightning-fast, private local communication for Claude Desktop, Claude Code, and Cursor.sse/streamable-http: Modern streaming HTTP transport for remote agents, webhooks, and ChatGPT connectors.
Credential Auto-Detection: Accepts either a raw browser
Cookiestring or aBearerJWT token. Formats appropriate headers automatically.Strict Credential Redaction: Automatically scrubs authentication cookies, bearer tokens, and JWTs from all logs and error messages.
Resilient Network Handling:
Automatic exponential backoff with jitter on HTTP 429 (Rate Limiting), respecting upstream
Retry-Afterheaders.Graceful degradation on schema drift (API structural variations never crash the server).
In-memory async-safe TTL caching (default 60s) to avoid spamming KodeKloud servers.
User-friendly error messaging for expired sessions (HTTP 401/403).
Architecture & Security Principles
flowchart LR
subgraph AI Clients
CD[Claude Desktop]
CC[Claude Code]
CR[Cursor]
CG[ChatGPT]
end
subgraph kodekloud-mcp Server
direction TB
CLI[CLI Entrypoint\nkodekloud-mcp]
FMCP[FastMCP Engine\nstdio / sse]
CACHE[(In-Memory\nTTL Cache)]
CONF[Config & Secret Redactor\nBearer vs Cookie Detect]
MOCK{Mock Mode?}
MD[Mock Data Generator\nRealistic CKA / Labs]
CLIENT[KodeKloudClient\nBackoff & Drift Tolerance]
end
subgraph Upstream
KK[(KodeKloud Platform\nlearn.kodekloud.com)]
end
CD -->|stdio JSON-RPC| FMCP
CC -->|stdio JSON-RPC| FMCP
CR -->|stdio JSON-RPC| FMCP
CG -->|HTTP / SSE /mcp| FMCP
FMCP --> CONF
FMCP --> CACHE
CONF --> MOCK
MOCK -- Yes --> MD
MOCK -- No --> CLIENT
CLIENT -->|HTTPS + Session Credential| KKStdio Protocol Sanctity: MCP clients communicate with the server over
stdout. All operational logs, warnings, and error traces are strictly written tostderr.Zero Persistent Storage of Secrets: The server does not write session credentials to disk, databases, or cache files. Credentials live exclusively in runtime process memory.
Endpoint Isolation: Upstream endpoints and response parsers are isolated in
src/kodekloud_mcp/kodekloud_client.pywith clearly designatedTODOmarkers.
MCP Tools & Prompts Reference
Available Tools
KodeKloud Learn Tools (learn.kodekloud.com)
Tool Name | Type | Description | Key Arguments |
| Read | Fetch percentage completed, labs completed vs total, and last activity timestamp. |
|
| Read | List enrolled courses, categories, difficulty, and status ( | None |
| Read | Retrieve syllabus modules, lectures, lab exercises, and the immediate next suggested lesson. |
|
| Read | Check currently running, paused, or stopped interactive labs with remaining time. | None |
| Read | View active certification paths (CKA, CKAD, Terraform) and exam readiness percentages. | None |
| Read | Compact study digest: current & longest daily streak, total hours, and next suggested lesson. | None |
| Write | Launch/provision an interactive hands-on lab environment. (Disabled by default) |
|
| Write | Terminate an active lab session and clean up resources. (Disabled by default) |
|
KodeKloud Engineer Tools (engineer.kodekloud.com / Project Nautilus)
Tool Name | Type | Description | Key Arguments |
| Read | Fetch active assigned ticket, scenario requirements, target servers (e.g. | None |
| Read | Retrieve current engineering role (DevOps, SysAdmin), total XP/points, global leaderboard rank, success rate, and promotion eligibility. | None |
| Read | Inspect past completed, failed, or expired tasks, points earned, and completion timestamps. |
|
Write tools (start_lab, stop_lab) are registered only when KODEKLOUD_ENABLE_WRITE_TOOLS=true is set. In read-only mode, they do not appear in the tool catalog.
Available Prompts
study_plan(goal: str): Directs the LLM to inspect your current progress (get_learning_summary), enrolled courses (get_course_progress), remaining syllabus outline (get_course_outline), and exam readiness (get_certifications) to generate a customized, week-by-week study roadmap with hands-on lab milestones.troubleshoot_engineer_task(): Instructs the LLM to act as a Senior DevOps Tech Lead & Mentor for your active KodeKloud Engineer ticket. Inspects the task requirements and target servers viaget_engineer_task()and provides step-by-step diagnostic workflows without spoiling the solution.
Authentication & Session Credential Guide
KodeKloud relies on authenticated browser sessions. You provide your credential via the KODEKLOUD_SESSION_COOKIE environment variable. The server auto-detects:
Tokens starting with
Beareror matching a JWT (eyJ...) are sent viaAuthorization: Bearer <token>.Any other string is sent as a
Cookieheader.
Extracting Credentials in Google Chrome
Open Google Chrome and log into your account at learn.kodekloud.com.
Press
F12(orCmd+Option+Ion macOS) to open DevTools.Select the Network tab, check the Fetch/XHR filter, and refresh the page (
Ctrl+R/Cmd+R).Click on any authenticated request (e.g.
me,progress, orcourses).In the Headers pane on the right:
Scroll down to Request Headers.
Look for
authorization: If present, copy the full value starting withBearer eyJ...Look for
cookie: If no Authorization header is present, copy the entire string aftercookie:(e.g.,_session_id=...; remember_token=...).

Extracting Credentials in Firefox
Open Firefox and log into learn.kodekloud.com.
Press
F12(orCmd+Option+Ion macOS) to open the Web Developer Tools.Go to the Storage tab -> expand Cookies -> select
https://learn.kodekloud.com.Copy the values of your session authentication cookies, or inspect the Network tab headers as described above.
Discovering Endpoints & Sanitizing HAR Traces
Because KodeKloud does not have an official public REST documentation, community members can discover active endpoints:
In the browser DevTools Network tab, perform an action (e.g. view a course or check active labs).
Right-click the request list and select Save all as HAR with content.
CRITICAL SANITIZATION STEP: Open the
.harfile in a text editor. Use find-and-replace to sanitize:Search for
Bearerand replace the token withBearer REDACTED_TOKEN.Search for
cookieand replace session values withREDACTED_COOKIE.Search for your email address, real name, and IP address.
Compare your sanitized payload with the models in
src/kodekloud_mcp/models.py, and submit an issue or PR!
Installation & Quick Start
1. Run Instantly with uvx (Recommended)
uv runs the MCP server directly in an isolated temporary virtual environment without requiring a manual install:
# Test in offline Mock Mode (default)
uvx kodekloud-mcp
# Connect with live session cookie (Linux / macOS)
export KODEKLOUD_SESSION_COOKIE="your_cookie_or_jwt_here"
export KODEKLOUD_USE_MOCK=false
uvx kodekloud-mcp
# Connect with live session cookie (Windows PowerShell)
$env:KODEKLOUD_SESSION_COOKIE="your_cookie_or_jwt_here"
$env:KODEKLOUD_USE_MOCK="false"
uvx kodekloud-mcp2. Install via pip
# Install package from repository
pip install git+https://github.com/Maghav/kodekloud-mcp.git
# Verify installation
kodekloud-mcp --help3. Run with Docker & Docker Compose
The included Dockerfile builds a non-root, minimal runtime image.
Using Docker CLI:
# Build the container
docker build -t kodekloud-mcp .
# Run locally in stdio mode (interactive)
docker run -i --rm \
-e KODEKLOUD_USE_MOCK=true \
kodekloud-mcp --transport stdio
# Run as an HTTP/SSE server on port 8000
docker run -d --rm \
-p 8000:8000 \
-e KODEKLOUD_USE_MOCK=true \
-e KODEKLOUD_SESSION_COOKIE="your_cookie" \
kodekloud-mcp --transport sse --host 0.0.0.0 --port 8000Using Docker Compose:
# Start background SSE server
docker compose up -d
# Check server logs
docker compose logs -fClient Configuration
Claude Desktop
To connect kodekloud-mcp to Claude Desktop, edit your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"kodekloud": {
"command": "uvx",
"args": ["kodekloud-mcp"],
"env": {
"KODEKLOUD_SESSION_COOKIE": "your_cookie_or_jwt_here",
"KODEKLOUD_USE_MOCK": "false",
"KODEKLOUD_ENABLE_WRITE_TOOLS": "false",
"KODEKLOUD_CACHE_TTL_SECONDS": "60"
}
}
}
}If you do not haveuv installed, replace "command": "uvx" with "command": "python" and pass "-m", "kodekloud_mcp.cli" in "args".
Claude Code CLI
Add kodekloud-mcp directly to your Claude Code workspace:
claude mcp add kodekloud -- uvx kodekloud-mcpOr with live credentials:
claude mcp add kodekloud -e KODEKLOUD_SESSION_COOKIE="your_cookie" -e KODEKLOUD_USE_MOCK="false" -- uvx kodekloud-mcpCursor IDE
In Cursor:
Open Settings -> Features -> MCP Servers.
Click Add New MCP Server.
Configure:
Name:
KodeKloudType:
commandCommand:
uvx kodekloud-mcpSet environment variables
KODEKLOUD_SESSION_COOKIEandKODEKLOUD_USE_MOCKin your project.envor system environment.
ChatGPT (Remote SSE Connector)
For remote LLMs and ChatGPT Custom GPT Actions that require an HTTPS/SSE streaming URL:
Launch
kodekloud-mcpin SSE mode behind a TLS reverse proxy (e.g., Caddy or Cloudflare Tunnel):kodekloud-mcp --transport sse --host 0.0.0.0 --port 8000Endpoint URL for client connection:
https://mcp.yourdomain.com/sse(orhttps://mcp.yourdomain.com/mcpfor streamable HTTP).
Deployment Guide
Personal Deployment
For individual learners:
Recommended: Run locally over
stdio. It runs as a private subprocess on your computer, requires zero open ports, and keeps your session credentials strictly local.Remote Personal Host: If you prefer accessing your server from mobile or ChatGPT, deploy the Docker container to a personal VPS, Fly.io, or Google Cloud Run behind Caddy/Nginx enforcing HTTPS and basic auth.
Architecture for the KodeKloud Community
Zero Multi-Tenancy Guarantee:
kodekloud-mcp is intentionally designed as an open-source package where every learner runs their own instance with their own credential.
DO NOT build or host a shared multi-tenant service storing other users' session cookies. Storing third-party session tokens introduces severe liability, risk of credential harvesting, and violates user trust.
If an organization or community team ever provides a hosted proxy service:
In-Memory Per-Request Authentication Only: Never write cookies to disk or databases. Transmit credentials per-request via client headers.
Mandatory HTTPS: Reject unencrypted plain HTTP connections.
Per-User Rate Limiting: Apply token-bucket rate limiting per IP/user to prevent upstream blocks.
Privacy & Data Minimization: Never record student learning histories or PII in centralized logging aggregators.
Open Source Publishing Checklist
When releasing or maintaining community distributions:
Semantic Versioning: Adhere strictly to
MAJOR.MINOR.PATCHinpyproject.tomlandCHANGELOG.md.Git Release Tags: Create signed git tags (
git tag -s v0.1.0 -m "Release v0.1.0").PyPI Trusted Publishing: Use GitHub Actions OIDC Trusted Publishing (no static API tokens stored in repository secrets).
Community Templates: Include
.github/ISSUE_TEMPLATE/for bug reports and feature requests.Security Disclosures: Maintain SECURITY.md with a clear vulnerability reporting route.
Contribution Guide: Maintain CONTRIBUTING.md detailing test suites and sanitization procedures.
Troubleshooting & Logs
1. Viewing Server Logs
Because stdout is reserved for JSON-RPC messages in stdio mode, all operational messages are emitted to stderr.
In Claude Desktop: View logs at:
macOS:
tail -f ~/Library/Logs/Claude/mcp-server-kodekloud.logWindows:
Get-Content "$env:APPDATA\Claude\logs\mcp-server-kodekloud.log" -Wait
In CLI / Shell: When running directly, logs appear in your console terminal in real-time.
2. Session Expired (HTTP 401 / 403)
Symptom:
KodeKloud session expired or rejected (HTTP 401/403). Your browser session credential is no longer valid.Cause: KodeKloud sessions expire periodically or when you log out from another browser tab.
Solution: Open Chrome/Firefox, log in to KodeKloud, copy the fresh cookie or Bearer token, and update
KODEKLOUD_SESSION_COOKIE.
3. Rate Limit Exceeded (HTTP 429)
Symptom:
KodeKloud API rate limit exceeded (HTTP 429). The request was automatically retried 3 times...Solution: The server retries automatically with exponential backoff. Increase
KODEKLOUD_CACHE_TTL_SECONDS=120to cache responses longer and reduce request frequency.
4. Claude Desktop Does Not Detect the Server
Solution: Check that
uvorpythonis in your systemPATH. Restart Claude Desktop completely (Cmd+Qon macOS, or right-click tray icon and exit on Windows).
Security Best Practices
Treat Your Cookie as a Password: Anyone with your session cookie can access your KodeKloud account. Never paste it in public forums, GitHub issues, or chat screenshots.
Instant Invalidation: If you suspect your cookie was exposed, simply log out of KodeKloud in your browser. This immediately terminates the server session.
Never Commit
.envFiles: The.gitignorefile is pre-configured to ignore all.envfiles. Verify withgit statusbefore committing.Principle of Least Privilege: Keep
KODEKLOUD_ENABLE_WRITE_TOOLS=falseunless you specifically require lab automation.
License
This project is licensed under the MIT License. See LICENSE for full details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
- mcpOAuthcom.vibgrate
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Your apps, skills, MCP servers and keys from ahel.ai, served to Claude, ChatGPT, Cursor and Codex.
Build and supervise fleets of agents from Claude Code, Codex or Cursor. Connects over OAuth.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs like Claude to securely execute Kubernetes CLI tools (kubectl, helm, istioctl, argocd) across multiple clusters through dynamic kubeconfig support, allowing natural language Kubernetes management and operations.5MIT
- FlicenseAqualityDmaintenanceConnects Claude Desktop to any Kubernetes cluster, enabling natural language queries for diagnostics and operations such as listing pods, viewing logs, scaling deployments, and more.8-
- FlicenseNot gradedqualityCmaintenanceConnects an AI assistant to local Docker and Kubernetes environments, enabling real-time command execution and log inspection with user approval.-
- AlicenseAqualityBmaintenanceBridges MCP clients such as Claude Code and Cursor to independent Codex app-server sessions, letting them start, poll, steer, review, compact, cancel, and answer prompts for asynchronous Codex tasks over local stdio or a remote authenticated WebSocket. Runs read-only by default, with workspace-write sandboxing only when a user explicitly enables it, and reports job status, model listing, and progress back to the client.101MIT