AI DevOps Sidekick with MCP Servers
Deploy Kubernetes apps using 5 MCP servers and natural language prompts.
Introduction
30 Second Summary
DevOps engineers spend hours writing YAML manifests, running kubectl commands, and switching between documentation tabs. What if you could just describe what you want deployed and watch it happen?
In this project, you will wire up 5 MCP servers into a single AI coding assistant and deploy a web app to a local Kubernetes cluster using nothing but natural language prompts.
What You'll Build
You type one sentence into your AI assistant and watch pods spin up in your terminal. Your sidekick reads docs, checks team standards, writes manifests, applies them, and verifies the deployment.
By the end of this project, you'll have:
- A local Kubernetes cluster running an Nginx web app showing "Deployed by AI Sidekick" that you deployed entirely through conversation with an AI.
- 5 MCP servers collaborating in a single assistant to index code, retrieve documentation, query tabular data, manage files, and operate Kubernetes.
- Token usage stats proving that indexed retrieval is dramatically cheaper than dumping entire files into context.
- Secret Mission: Deploy a production-grade multi-container pod with a sidecar, health checks, and resource limits derived from team standards data.
Are there any prerequisites?
You need Docker installed and running before you start. On Windows or macOS, that means Docker Desktop. On Linux, Docker Engine is sufficient.
This is Project 1 of a 3-part series. Projects 2 and 3 build on this same environment for incident response and compliance auditing.
Before We Start
Before We Start...
Before we dive in, let's lock in what you're about to build and why it matters.
Wiring multiple MCP servers into a single AI assistant turns it from a chatbot into an operator that can actually read your code, query your docs, and run commands against real infrastructure.
Install the Foundation
Your AI sidekick needs two things before it can do any real work: runtimes to power the MCP servers, and a Kubernetes cluster to deploy into.
In this step, you will install Python, Node.js, and the tools that create a local cluster on your machine. By the end, you will have a fully running Kubernetes environment ready for your AI to command.
In this step, get ready to:
- Install Python 3.12, Node.js 22, and uv.
- Install Kind and kubectl.
- Create a local Kubernetes cluster.
Install Python, Node.js, and uv
MCP servers in this project run on Python and Node.js. The uv tool provides uvx, a command that launches Python-based MCP servers in isolated environments without manual installs.
- Check if Python 3.12 or higher is already installed by running this command:
python3 --version
On Windows, run python --version instead.
✔️ I see version 3.12 or higher
Python is ready. Skip ahead to the Node.js check below.
ⓧ I see an older version
You have Python installed, but the project needs 3.12 or higher. Install the correct version for your operating system.
macOS
- Install Python 3.12 via Homebrew by running:
brew install python@3.12
After installing, your default python3 may still point to the older system Python. Run python3.12 --version to confirm the new version is available. If python3 --version still shows the old version, use python3.12 directly throughout this project.
Windows
- Install Python 3.12 by running:
winget install Python.Python.3.12
- Close and reopen your terminal, then run python --version to confirm it shows 3.12.
Linux
- Install Python 3.12 by running:
sudo apt update && sudo apt install python3.12 python3-pip -y
- Run python3.12 --version to confirm installation.
ⓧ Command not found
Python is not installed yet. Install it for your operating system.
macOS
- Install Python 3.12 via Homebrew by running:
brew install python@3.12
- Run python3 --version to confirm it shows 3.12.
Windows
- Install Python 3.12 by running:
winget install Python.Python.3.12
- Close and reopen your terminal, then run python --version to confirm it shows 3.12.
Linux
- Install Python 3.12 by running:
sudo apt update && sudo apt install python3.12 python3-pip -y
- Run python3.12 --version to confirm installation.
- Now check if Node.js 22 or higher is installed by running:
node --version
✔️ I see version 22 or higher
Node.js is ready. Skip ahead to the uv install below.
ⓧ I see an older version
You have Node.js installed, but the project needs version 22 or higher. Upgrade for your operating system.
macOS
- Install Node.js 22 via Homebrew by running:
brew install node@22
- Close and reopen your terminal, then run node --version to confirm it shows v22 or higher.
Windows
- Install Node.js 22 LTS by running:
winget install OpenJS.NodeJS.LTS
- Close and reopen your terminal, then run node --version to confirm it shows v22 or higher.
Linux
- Install Node.js 22 via NodeSource by running:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install nodejs -y
- Run node --version to confirm it shows v22 or higher.
ⓧ Command not found
Node.js is not installed yet. Install it for your operating system.
macOS
- Install Node.js 22 via Homebrew by running:
brew install node@22
- Run node --version to confirm it shows v22 or higher.
Windows
- Install Node.js 22 LTS by running:
winget install OpenJS.NodeJS.LTS
- Close and reopen your terminal, then run node --version to confirm it shows v22 or higher.
Linux
- Install Node.js 22 via NodeSource by running:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install nodejs -y
- Run node --version to confirm it shows v22 or higher.
- Install uv (the tool that provides uvx) by running this command:
macOS
pip3 install uv
Windows
pip install uv
Linux
pip3 install uv
- Verify uv is working by running:
uvx --version
✔️ I see a version number
All three runtimes are ready.
ⓧ Command not found
Your terminal cannot find uvx. Close and reopen your terminal to refresh PATH, then try again. If it still fails, run pip3 install uv (or pip install uv on Windows) once more and check for errors in the output.
Still seeing command not found?
On macOS, if pip3 itself is not found, run python3.12 -m pip install uv instead. On Windows, make sure you reopened your terminal after installing Python.
help me fix uvx not being found after installing uv
Install Kind and kubectl
Kind creates lightweight Kubernetes clusters inside Docker containers. The kubectl command-line tool is how you (and your AI) talk to that cluster.
- Check if Kind is already installed by running:
kind --version
✔️ I see a version number
Kind is ready. Skip ahead to the kubectl check below.
ⓧ Command not found
Install Kind for your operating system.
macOS
- Install Kind via Homebrew by running:
brew install kind
- Run kind --version to confirm installation.
Windows
- Install Kind via Chocolatey by running:
choco install kind
- Close and reopen your terminal, then run kind --version to confirm installation.
Linux
- Download and install the Kind binary by running:
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.32.0/kind-linux-amd64 && chmod +x ./kind && sudo mv ./kind /usr/local/bin/kind
- Run kind --version to confirm installation.
- Check if kubectl is already installed by running:
kubectl version --client
✔️ I see a version number
kubectl is ready. Move on to creating your cluster.
ⓧ Command not found
Install kubectl for your operating system.
macOS
- Install kubectl via Homebrew by running:
brew install kubectl
- Run kubectl version --client to confirm installation.
Windows
- Install kubectl via Chocolatey by running:
choco install kubernetes-cli
- Close and reopen your terminal, then run kubectl version --client to confirm installation.
Linux
- Download and install the kubectl binary by running:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- Run kubectl version --client to confirm installation.
Kind or kubectl install failing?
On Windows, Chocolatey requires an elevated (Administrator) terminal. Right-click your terminal app and select Run as administrator, then retry the install command.
On macOS, if brew is not found, install Homebrew first from https://brew.sh.
help me install Kind and kubectl on my system
Create the Kind cluster
Kind uses Docker to spin up a Kubernetes cluster as containers on your machine. This gives you a real cluster without needing cloud resources or a virtual machine.
- Make sure Docker is running. Open Docker Desktop (Windows/macOS) or confirm the Docker daemon is active on Linux by running docker info.
- Create your Kubernetes cluster by running this command:
kind create cluster --name devops-sidekick
What does this command do?
Kind pulls a lightweight Kubernetes node image and runs it as a Docker container. The --name devops-sidekick flag gives your cluster a specific name so you can manage multiple clusters without confusion.
This takes 1-2 minutes. You will see progress messages as Kind downloads the node image and bootstraps the cluster components.
Before you run the next command, what do you think kubectl get nodes will show? Think about what Kind just created.
- Verify your cluster is running by running:
kubectl get nodes
You should see one node named devops-sidekick-control-plane with a status of Ready.
Node not showing Ready status?
If the node shows NotReady, wait 30 seconds and run kubectl get nodes again. The cluster components need a moment to initialize after creation.
If you see a connection error, confirm Docker is running. On Windows, Docker Desktop must be in Linux containers mode with the WSL2 backend enabled.
help me troubleshoot my Kind cluster not reaching Ready status
Your local Kubernetes cluster is alive and ready to take orders. Next up, you will wire up the MCP servers that give your AI the ability to reach this cluster and much more.
Wire Up the MCP Server Stack
Your local Kubernetes cluster is running and every runtime is installed. But your AI coding assistant has no idea any of this infrastructure exists.
MCP servers bridge that gap. Each server exposes tools and resources that an AI can discover and call. In this step, you'll install 5 MCP servers and wire them into your coding assistant so it treats your cluster, filesystem, documentation, code, and data as callable capabilities.
In this step, get ready to:
- Install the jMunch MCP server packages (jCodeMunch, jDocMunch, jDataMunch).
- Configure all 5 MCP servers in your AI coding assistant.
- Verify every server connects successfully.
Install the jMunch MCP servers and create the project folder
The jMunch family provides three specialized MCP servers. jCodeMunch indexes source code symbols. jDocMunch indexes documentation sections. jDataMunch indexes tabular data like CSVs.
- Install all three jMunch packages by running this command:
pip install jcodemunch-mcp jdocmunch-mcp "jdatamunch-mcp[all]"
- Confirm the packages installed by running:
pip list | grep mcp
You should see jcodemunch-mcp, jdocmunch-mcp, and jdatamunch-mcp in the output.
Not seeing the packages?
If you see a permission error, try running pip install --user instead. Some systems require the --user flag for global installs.
If pip is not found, try pip3 instead. Some systems install the Python package manager under that name.
Help me troubleshoot
Now you need a project folder where your AI sidekick will read and write files.
- Move to your Desktop by running this command:
macOS
cd ~/Desktop
Linux users: this same command works on Linux.
Windows
cd $HOME\Desktop
- Create your project folder and move into it by running these commands:
macOS
mkdir devops-sidekick
cd devops-sidekick
Linux users: this same command works on Linux.
Windows
mkdir devops-sidekick
cd devops-sidekick
- Confirm you're in the right place by running:
pwd
You should see a path ending in devops-sidekick.
Configure MCP servers in your editor
Each MCP server runs as a subprocess that your editor launches on demand. You tell the editor which servers to start by adding a JSON config that maps server names to their launch commands.
VS Code + Cline (recommended)
Cline is a VS Code extension that connects to MCP servers and lets you chat with an AI that can call their tools.
- Install VS Code if you don't already have it. Run the install command for your platform:
macOS
brew install --cask visual-studio-code
Windows
winget install -e --id Microsoft.VisualStudioCode
Linux
sudo snap install --classic code
- Press Cmd+Space (macOS) or the Windows key (Windows) to open your search bar.
- Type Visual Studio Code and press Enter to open it.
- Open the Extensions view by pressing Cmd+Shift+X (macOS) or Ctrl+Shift+X (Windows/Linux).
- Search for saoudrizwan.claude-dev and click Install.
- After installation, click the robot icon that appears in the left sidebar to open the Cline panel.
- Click the MCP Servers icon (the stacked server icon in Cline's top toolbar).
- Go to the Configure tab and click Configure MCP Servers.
- This opens a JSON file. Replace the entire contents with the config for your operating system below.
macOS
- Paste this config into the file. Replace USERNAME with your actual macOS username. On Linux, change /Users/ to /home/.
{
"mcpServers": {
"jcodemunch": {
"command": "uvx",
"args": ["jcodemunch-mcp"],
"disabled": false
},
"jdocmunch": {
"command": "uvx",
"args": ["jdocmunch-mcp"],
"disabled": false
},
"jdatamunch": {
"command": "uvx",
"args": ["jdatamunch-mcp"],
"disabled": false
},
"kubernetes": {
"command": "npx",
"args": ["-y", "mcp-server-kubernetes"],
"disabled": false
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/[[USERNAME=\"your macOS username\"]]/Desktop/devops-sidekick"],
"disabled": false
}
}
}
Windows
- Paste this config into the file. Replace USERNAME with your actual Windows username.
{
"mcpServers": {
"jcodemunch": {
"command": "cmd",
"args": ["/c", "uvx", "jcodemunch-mcp"],
"disabled": false
},
"jdocmunch": {
"command": "cmd",
"args": ["/c", "uvx", "jdocmunch-mcp"],
"disabled": false
},
"jdatamunch": {
"command": "cmd",
"args": ["/c", "uvx", "jdatamunch-mcp"],
"disabled": false
},
"kubernetes": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-server-kubernetes"],
"disabled": false
},
"filesystem": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\[[USERNAME=\"your Windows username\"]]\\Desktop\\devops-sidekick"],
"disabled": false
}
}
}
- Save the file. Cline auto-detects the change. No restart needed.
Why the cmd wrapper on Windows?
Cline on Windows does not inherit your shell PATH. Wrapping commands with cmd /c forces a fresh shell that resolves uvx and npx correctly. macOS and Linux do not need this wrapper.
Cursor (alternative)
- Open a terminal inside the devops-sidekick folder.
- Create the Cursor MCP config directory and file by running:
macOS
mkdir -p .cursor
touch .cursor/mcp.json
Linux users: this same command works on Linux.
Windows
mkdir .cursor
New-Item .cursor\mcp.json
- Open .cursor/mcp.json in Cursor and paste the config matching your operating system (use the same JSON shown in the VS Code + Cline tab for your platform).
- Save the file.
- Restart Cursor completely. Click File then Exit, and reopen the project.
- Verify by navigating to File then Preferences then Cursor Settings then MCP. You should see green dots next to each server.
Why does Cursor need a restart?
Unlike Cline, Cursor only reads its MCP config at startup. A full restart is required for it to discover new servers.
What are these 5 servers doing?
- jcodemunch indexes source code symbols using AST parsing. It retrieves functions and classes without reading entire files.
- jdocmunch indexes documentation into searchable sections. It retrieves relevant docs without dumping entire repos.
- jdatamunch indexes tabular data (CSV, Excel, Parquet). It lets the AI query rows and aggregate values.
- kubernetes wraps kubectl so the AI can create, read, and delete cluster resources.
- filesystem gives the AI read/write access to your project folder on disk.
Verify server connections
Before you check the panel, do you think all 5 servers will connect on the first try? Think about what could go wrong with paths or missing binaries.
- In Cline, click the MCP Servers icon (stacked server icon in the top toolbar).
- Check that all 5 servers show green status dots.
You should see green dots next to jcodemunch, jdocmunch, jdatamunch, kubernetes, and filesystem. Five green dots means your AI can now reach all five capabilities.
Seeing red dots on some servers?
- Windows: Make sure you used the cmd /c wrapper in every server entry. Without it, Cline cannot find uvx or npx.
- macOS/Linux: Run which uvx and which npx in your terminal. Both should return a path. If not, your PATH is missing those binaries.
- Filesystem server: Double-check that the path in your config exactly matches your devops-sidekick folder location. The path must be absolute.
- Open the VS Code Developer Tools (press Cmd+Shift+P or Ctrl+Shift+P, then type Developer: Toggle Developer Tools) to see detailed error logs.
Help me debug my MCP server connections
Your AI sidekick now has eyes on your code, docs, data, cluster, and filesystem. Next up, you'll feed it real knowledge and watch it answer questions with indexed precision instead of guesswork.
Give Your AI Eyes and Hands
Your MCP servers are connected and the AI can talk to your cluster, read your filesystem, and query data.
But right now, it is working blind. It has zero project-specific knowledge. Indexing documentation and code gives it precise, token-efficient context instead of forcing it to guess from training data.
In this step, get ready to:
- Index Kubernetes documentation with jDocMunch.
- Create project files and index them with jCodeMunch.
- Verify the AI answers questions with cited documentation.
Index Kubernetes documentation and query the cluster
Your AI sidekick currently knows nothing about Kubernetes beyond what its training data includes. That training data can be outdated or incomplete.
By indexing the official Kubernetes docs through jDocMunch's index_repo tool, you give the AI a structured, searchable knowledge base it can cite directly.
- Switch to the Cline chat panel in VS Code (click the robot icon in the sidebar).
- Type this prompt into the Cline chat:
Index the Kubernetes documentation from the kubernetes/website GitHub repository using jDocMunch's index_repo tool.
- Press Enter to send the prompt.
- Approve any tool-use requests that Cline shows you.
Watch Cline's output. You should see it call the index_repo tool with kubernetes/website as the URL. The indexing takes a minute or two depending on your network speed.
What is index_repo doing?
The index_repo tool fetches documentation files from the GitHub repository via the GitHub API. It parses them into sections and stores a searchable index locally. Later, when you ask a question, the AI retrieves only the relevant sections instead of loading entire files into context.
Once indexing completes, Cline will confirm how many documents were indexed.
- Now ask the AI to check the live cluster state by typing this prompt:
Use the Kubernetes MCP server to list all nodes in the cluster. Show me their status.
- Approve the tool-use request.
The AI calls the Kubernetes MCP server and returns your cluster's node list. You should see devops-sidekick-control-plane with a Ready status.
Not seeing the node list?
Make sure Docker Desktop is still running. The Kind cluster lives inside Docker containers. If Docker stopped, the cluster is unreachable.
Also confirm the kubernetes MCP server still shows a green dot in the MCP Servers panel. If it disconnected, save the config file again to trigger a reconnect.
Why can't my AI reach the Kubernetes cluster?
Create app files and index the project
The AI needs something to deploy. You will create a simple Nginx web app that displays a custom message. Then you will index the project files so the AI understands your codebase at the symbol level.
- In VS Code, create a new file called index.html inside your devops-sidekick folder by clicking File then New File.
- Paste the following content into index.html:
<!DOCTYPE html>
<html>
<head>
<title>AI Sidekick</title>
</head>
<body>
<h1>Deployed by AI Sidekick</h1>
</body>
</html>
What does this file do?
This is the web page your Nginx container will serve. It displays a simple heading that proves the AI successfully deployed your app to Kubernetes.
- Save index.html.
- Create another new file called Dockerfile in the same devops-sidekick folder.
- Paste the following content into Dockerfile:
# Use the lightweight Nginx Alpine image as the base
FROM nginx:alpine
# Copy our custom HTML into Nginx's default serving directory
COPY index.html /usr/share/nginx/html/index.html
What does this Dockerfile do?
It starts from the official nginx:alpine image (a minimal web server) and copies your index.html into the location Nginx serves files from. The result is a container that serves your custom page.
- Save Dockerfile.
Confirm both files exist by running this in your terminal:
ls
You should see Dockerfile and index.html listed in the output.
- Now ask the AI to index your project files by typing this prompt in Cline:
Index this project folder with jCodeMunch so you can search my code by symbol.
- Approve the tool-use request.
Cline calls jCodeMunch's index_folder tool on your project directory. You should see confirmation that the Dockerfile and index.html were indexed.
Indexing returned an error?
If jCodeMunch reports that the path is not found, make sure your VS Code workspace is open to the devops-sidekick folder on your Desktop. The filesystem MCP server can only access the directory you configured in the MCP settings.
Why is jCodeMunch unable to index my project?
Test the knowledge pipeline
You have indexed external documentation (Kubernetes docs) and your own project code. Time to test whether the AI pulls answers from those indexes instead of guessing from training data.
Before you send the next prompt, think about this: do you expect the AI to answer from its general training data, or from the indexed Kubernetes documentation you just loaded?
- Type this prompt in Cline:
What is a Kubernetes Deployment? Use the indexed Kubernetes documentation to answer, and cite the source section.
- Approve any tool-use requests.
The AI should call jDocMunch's search_sections tool, retrieve the relevant documentation section, and answer with a citation referencing the kubernetes/website repository. Look for a section ID or document path in the response.
How do I know it used the index?
Check Cline's tool-call log above the answer. You should see calls to search_sections or get_section from the jDocMunch server. If those calls appear, the answer comes from indexed docs. If no jDocMunch tools were called, the AI fell back to its training data.
AI answered without using jDocMunch?
Some models may answer from memory if they already know the topic well. Rephrase your prompt to be more explicit: try asking about a very specific Kubernetes concept and add "search the indexed kubernetes/website documentation before answering." This forces the model to use the tool.
My AI is not using the jDocMunch index when I ask Kubernetes questions.
Your AI sidekick now has eyes (indexed documentation and code) and hands (cluster access and filesystem control). Next up, you will put it all together and ask the AI to deploy your Nginx app to Kubernetes using nothing but a natural language prompt.
Deploy with AI and Hit the Wall
Your AI sidekick now has indexed knowledge of Kubernetes documentation and your project files. Time to put it all together.
In this step, you will give the AI a single natural language prompt and watch it orchestrate across multiple MCP servers to build, load, and deploy your Nginx app to the Kind cluster. Then you will discover something important is missing.
In this step, get ready to:
- Prompt the AI to deploy your Nginx app end-to-end using MCP tools.
- Verify your pods are running and test access with port-forwarding.
- Discover the gap in the deployment that the AI missed.
Prompt the AI to deploy end-to-end
Your AI has access to the filesystem, your code index, Kubernetes docs, and the live cluster. A single well-crafted prompt can trigger the full deploy workflow.
- Switch back to the Cline chat panel in VS Code.
- Type the following prompt and send it:
Build a Docker image from my Dockerfile tagged as nginx-app:latest, load it into my Kind cluster named devops-sidekick, then create a Kubernetes Deployment manifest in k8s/deployment.yaml and apply it to deploy the app.
What will the AI do?
The AI orchestrates across multiple MCP servers to fulfil this request. It uses the filesystem server to read your Dockerfile and write the manifest. It runs terminal commands to build the image and load it into Kind. It uses the Kubernetes server to apply the manifest.
Watch the Cline panel as it requests approval for each tool call. Approve each one to let the deployment proceed.
The AI will run several steps. You will see it execute commands similar to:
- docker build -t nginx-app:latest . to build the image from your Dockerfile.
- kind load docker-image nginx-app:latest --name devops-sidekick to make the image available inside the cluster.
- Writing a k8s/deployment.yaml manifest using the filesystem MCP server.
- Applying the manifest via the Kubernetes MCP server.
Approve tool calls as they appear
Cline shows a permission prompt each time the AI wants to use a tool or run a terminal command. Read each one to understand what the AI is doing, then click Approve.
Once the AI reports that the deployment is complete, you are ready to verify it.
Verify pods are running and test access
The AI says deployment is done. Time to confirm that pods are actually running on the cluster.
- Check the pod status by running this command in your terminal:
kubectl get pods
What should I see?
You should see one or more pods with names starting with nginx-app and a STATUS of Running. The READY column should show 1/1.
Pods are running. Now confirm the app actually serves your custom HTML page.
- Forward traffic from your local machine to the pod by running:
kubectl port-forward deployment/nginx-app 8080:80
What does this command do?
kubectl port-forward creates a tunnel from port 8080 on your machine to port 80 inside the pod. This lets you access the app in your browser without exposing it externally.
The command keeps running in the foreground. You will need to open a new terminal tab for the next commands.
- Open your browser and navigate to http://localhost:8080.
You should see your custom page displaying "Deployed by AI Sidekick". Your AI just deployed a working app to Kubernetes with a single prompt.
Not seeing the page?
- Make sure the port-forward command is still running in your terminal. If it exited, re-run it.
- Check that no other process is using port 8080. Try a different local port: kubectl port-forward deployment/nginx-app 9090:80.
- Run kubectl get pods again and confirm the pod STATUS is Running, not CrashLoopBackOff or ImagePullBackOff.
If the pod shows ImagePullBackOff, the image was not loaded into Kind properly. Ask the AI to re-run the image load step.
Help me debug my pod or port-forward issue.
- Stop the port-forward by pressing Ctrl+C in the terminal where it is running.
Hit the wall
The app works when you port-forward directly to it. But what about other services in the cluster?
- Ask the AI this question in the Cline chat:
How would other services in this cluster reach the nginx-app? Is the deployment complete?
The AI will explain that the deployment is missing a Kubernetes Service. Without a Service, other pods in the cluster have no stable way to discover or connect to your app.
Before you verify this yourself, what do you think kubectl get svc will show in the default namespace?
- Confirm the missing Service by running:
kubectl get svc
You will see only the default kubernetes service. There is no Service for nginx-app.
Why did the AI miss this?
The AI created a working Deployment because it had Kubernetes documentation context. But it had no knowledge of your team's standards or best practices.
Without team context, the AI did the minimum: deploy pods. It did not know that every production app in your organization requires a Service for internal discovery. This is the gap that structured team data fills.
Your AI deployed a running app, but it produced an incomplete deployment. In the next step, you will give the AI team standards data and watch it fix this gap on the first try.
Add Context, Fix, and Measure
Your AI deployed pods in Step 4, but it left out a critical piece: a Kubernetes Service. The gap exists because the AI had no team standards to follow.
You will fix this by feeding structured rules into jDataMunch. After re-prompting, the AI will generate a complete, standards-compliant manifest on the first try and you will measure the token savings.
In this step, get ready to:
- Create team deployment standards and index them with jDataMunch.
- Re-prompt the AI to generate and apply a complete manifest with both Deployment and Service.
- Verify the Service works and measure token savings.
Create and index team standards
The AI produced an incomplete deployment because it had no rules to follow. A CSV file acts as a queryable "team playbook" that jDataMunch can index and retrieve from at a fraction of the token cost of dumping the whole file into context.
- Create the standards directory inside your devops-sidekick project folder by running this command:
mkdir standards
- Confirm the directory was created by running:
ls
You should see standards listed alongside your existing folders.
- In VS Code's Explorer sidebar, expand the standards folder.
- Create a new file called deployment-standards.csv inside it.
- Paste the following content into the file:
rule_id,category,rule,applies_to,priority
R001,networking,Every Deployment must have a matching ClusterIP Service,all,critical
R002,resources,All containers must specify CPU and memory requests and limits,all,critical
R003,labeling,All resources must include app and team labels,all,high
R004,networking,Services must expose port 80 for HTTP workloads,web,high
R005,resources,CPU limit must not exceed 500m for standard workloads,standard,medium
R006,resources,Memory limit must not exceed 256Mi for standard workloads,standard,medium
What do these rules encode?
Each row is a team deployment rule the AI can query. Rule R001 is the one that directly addresses the gap from Step 4: every Deployment must have a matching Service. Rules R002-R006 add resource limits and labeling requirements that a production team would enforce.
- Save standards/deployment-standards.csv.
Now you need to make this data available to the AI through jDataMunch's indexing.
- Switch to the Cline chat panel and type this prompt:
Index the file standards/deployment-standards.csv using jDataMunch's index_local tool.
Watch the Cline panel. The AI calls jDataMunch's index_local tool and you should see a confirmation that the CSV was indexed successfully.
Index failing or tool not found?
Make sure the jdatamunch server is still showing a green dot in the MCP Servers panel. If it disconnected, click the refresh icon next to it.
Also verify the file path is correct. The AI needs the relative path from your project root: standards/deployment-standards.csv.
Help me debug why jDataMunch can't index my CSV file.
Re-prompt with standards context
The AI now has structured rules it can query. Instead of guessing what a deployment needs, it can look up your team's exact requirements and generate a compliant manifest.
- In the Cline chat, type this prompt:
Check the team deployment standards in jDataMunch for rules that apply to our nginx-app. Then generate a complete Kubernetes manifest that follows ALL the rules: include both a Deployment and a ClusterIP Service for nginx-app on port 80, with proper resource limits and labels. Write the manifest to k8s/complete-deployment.yaml and apply it to the cluster.
What is the AI doing behind the scenes?
The AI orchestrates across multiple MCP servers in sequence. It queries jDataMunch to retrieve the team rules, uses the filesystem server to write the manifest file, and then calls the Kubernetes server to apply it to your cluster.
This is the multi-server orchestration that makes MCP powerful. One prompt triggers a coordinated workflow across three different servers.
Watch the Cline panel as the AI works. You should see it call search_data or get_rows on jDataMunch, write the file, and then apply the manifest.
AI not querying standards or skipping rules?
If the AI generates a manifest without consulting jDataMunch, try being more explicit: "First, use jDataMunch's search_data tool to find all rules with priority critical or high. Then use those rules to generate the manifest."
Help me get the AI to follow team standards when generating Kubernetes manifests.
Verify the fix and measure token savings
The AI should have created and applied the complete manifest. Now you will confirm the Service exists and measure how efficient the indexed retrieval was.
- Before you run the next command, predict: will you see a nginx-app Service listed this time? What type should it be?
- Check for the Service by running:
kubectl get svc nginx-app
You should see a ClusterIP Service named nginx-app on port 80. This is the piece that was missing in Step 4.
Service not found?
If you see an error saying the service was not found, the AI may not have applied the manifest. Go back to the Cline chat and ask: "Apply the manifest at k8s/complete-deployment.yaml to the cluster using kubectl."
Help me figure out why my nginx-app Service doesn't exist after the AI generated the manifest.
- Now port-forward through the Service to confirm the app is reachable. Run this command:
kubectl port-forward service/nginx-app 8080:80
What does port-forward through a Service prove?
In Step 4 you port-forwarded directly to a pod. This time you are routing through the Service, which is how other services in the cluster would reach your app. It proves the Service is correctly wired to the pods.
This command runs in the foreground. Keep it running while you test.
- Open your browser and go to http://localhost:8080.
You should see "Deployed by AI Sidekick" in your browser. The app is now accessible through the Service.
- Press Ctrl+C in the terminal to stop the port-forward.
Now for the final measurement. You will ask the AI to report how many tokens each MCP server used.
- In the Cline chat, type this prompt:
Call get_session_stats on jDocMunch and jDataMunch. Show me the token savings for this session.
The AI calls get_session_stats on each server and reports the cumulative token savings and cost avoided.
What do these metrics prove?
The tokens_saved metric compares how many tokens the AI would have consumed if it loaded raw files into context versus how many it actually used through indexed retrieval. Higher savings mean the MCP server delivered the same knowledge at a fraction of the cost.
For a small CSV the absolute numbers are modest. In a real codebase with thousands of lines of docs and data, the savings scale dramatically. jDataMunch's documentation shows scenarios with 25,000x token savings on large files.
Secret mission
Production-Grade Multi-Container Deployment
Your single-container deployment works, but production workloads are rarely that simple. Real clusters run sidecars for logging, health checks for reliability, and resource limits for stability. Can you get your AI sidekick to deploy a multi-container pod that would pass a real team review?
Clean Up Your Resources
Clean Up Your Resources
Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project runs entirely locally using Docker containers, so there are no ongoing cloud costs.
Resources you used:
- Kind cluster devops-sidekick (runs as Docker containers on your machine).
- Python packages: jcodemunch-mcp, jdocmunch-mcp, jdatamunch-mcp.
- Project folder devops-sidekick on your Desktop (contains index caches, manifests, and app files).
- MCP server configuration entries in your editor (Cline or Cursor).
Keep everything running
No action needed. Choose this if you are still actively building or plan to continue with Projects 2 and 3 in this series (Incident Response and Compliance Audit).
- The Kind cluster uses approximately 500MB of RAM while running.
- Your MCP server config stays in place. Servers only consume resources when actively called by your AI assistant.
- The devops-sidekick folder remains on your Desktop with all manifests and index caches intact.
Pause - I'll come back to this later
Shut down Docker to free up memory. Your cluster data persists and will restart automatically when Docker starts again.
- On macOS or Windows, quit Docker Desktop from the system tray or menu bar.
- On Linux, stop the Docker service by running:
sudo systemctl stop docker
- When you are ready to resume, start Docker Desktop (macOS/Windows) or run sudo systemctl start docker (Linux). Your cluster will come back automatically.
- Your MCP server config and project folder stay in place.
Delete - I don't want to use this again
Remove all project resources and start fresh. Follow each step below to fully clean up.
- Delete the Kind cluster by running:
kind delete cluster --name devops-sidekick
- Uninstall the Python packages by running:
pip uninstall jcodemunch-mcp jdocmunch-mcp jdatamunch-mcp -y
- Remove the project folder. On macOS or Linux, run:
rm -rf ~/Desktop/devops-sidekick
- On Windows, open PowerShell and run:
Remove-Item -Recurse -Force "$env:USERPROFILE\Desktop\devops-sidekick"
- Remove MCP server entries from your editor config. In Cline, open the MCP Servers panel, click the Configure tab, then click Configure MCP Servers. Delete all five server entries (jcodemunch, jdocmunch, jdatamunch, kubernetes, filesystem) and save the file.
- If using Cursor, delete the .cursor/mcp.json file from your project folder (already removed if you deleted the project folder above).
That's a Wrap!
That's a Wrap!
Nice work! You just built a DevOps sidekick powered by 5 MCP servers working together, deployed a web app to Kubernetes using nothing but natural language, and proved that indexed retrieval beats brute-force context stuffing.
You've learned how to:
- Wire up 5 MCP servers (jCodeMunch, jDocMunch, jDataMunch, Kubernetes, Filesystem) into a single AI coding assistant so the LLM can orchestrate across code, docs, data, cluster operations, and file access.
- Deploy an Nginx web app to a local Kubernetes cluster using nothing but natural language prompts, watching the AI write manifests and apply them through MCP Tools.
- Hit a designed obstacle (missing Service), fix it by feeding team standards as structured data via jDataMunch, and measure the token savings of indexed retrieval versus dumping entire files into context.
- Secret Mission: Deploy a production-grade multi-container pod with a sidecar, health checks, and resource limits derived from team standards data.
This environment is ready for Project 2 (Intelligent Incident Response) and Project 3 (Infrastructure Compliance Audit) in this series. Keep your Kind cluster running to pick up where you left off.
Ready to quiz yourself?