Operations 10 min read

How to Build an AI‑Powered Smart Ops Platform with CodeBuddy and MCP

This article walks through a real‑world case of using CodeBuddy and the Model Context Protocol (MCP) to automate blog deployment, detailing the problem, MCP architecture, step‑by‑step deployment commands, MCP server generation, and the final intelligent operations workflow.

Wukong Talks Architecture
Wukong Talks Architecture
Wukong Talks Architecture
How to Build an AI‑Powered Smart Ops Platform with CodeBuddy and MCP

Introduction

While trying to publish a blog, the author encountered a broken Jenkins deployment pipeline that required manual packaging and uploading of files, which was repetitive and error‑prone. The goal was to let an AI assistant (CodeBuddy) handle the compile‑package‑upload‑deploy sequence automatically.

MCP Overview

The Model Context Protocol (MCP) acts as a standardized bridge between large language models (LLMs) and external tools, allowing AI applications to safely access and manipulate local or remote resources. MCP consists of three components:

MCP Host : the LLM‑enabled client (e.g., an IDE or AI tool) that initiates requests.

MCP Client : maintains a 1:1 connection with an MCP Server and forwards commands.

MCP Server : provides context, tools, and prompts to the client, enabling the LLM to decide which capability to invoke.

When a user sends a prompt such as “deploy the production order service,” the Host queries the Server for available capabilities, forwards the prompt to the LLM, and the LLM decides which tool to call. The Server executes the tool, returns results, and the Host presents the final response.

Deployment Steps

The original Jenkins pipeline was replaced with four simple manual steps:

Compile the blog source code.

Package the dist directory into dist.tar.gz.

Upload the archive to the website’s root directory.

Extract the archive on the server.

The first step (local compilation) does not require MCP; the remaining steps are automated with CodeBuddy.

Deploying the Blog Directly with CodeBuddy

Initially the author asked CodeBuddy to copy dist.tar.gz to the remote server, but the operation failed because no server IP, credentials, or destination path were provided. After supplying the SSH host, user, port, key path, and target directory, CodeBuddy successfully uploaded the archive.

Next, the author instructed CodeBuddy to move the file to the correct web root and run the extraction command:

上传到这 /我的网站的路径/passjava-learning ,并执行解压命令  tar -xzf dist.tar.gz

CodeBuddy generated the appropriate shell command and executed it, completing the upload and extraction.

Generating MCP Code

To encapsulate the deployment logic, the author prompted CodeBuddy to create an MCP Server project that would run the previously generated commands. CodeBuddy scaffolded a Node.js project with an index.ts entry (about 100 lines) and a configuration file.

{
  "mcpServers": {
    "blog-deploy": {
      "command": "node",
      "args": ["/Users/wukong/Documents/TencentCloud/MCP/blog-deploy-server/build/index.js"],
      "env": {
        "BLOG_PATH": "/Users/wukong/xx/00.PassJava-VuePress/dist",
        "TAR_FILE": "/Users/wukong/xx/00.PassJava-VuePress/dist.tar.gz",
        "SSH_HOST": "<填写服务器 ip>",
        "SSH_USER": "<填写服务器账号>",
        "SSH_PORT": "22",
        "SSH_KEY_PATH": "<填写本地密钥路径>",
        "DEPLOY_PATH": "<填写网站根目录>"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Running npm run build compiled and started the MCP Server. The author also tweaked the server code to include the compression step and pass the blog directory as a parameter.

Running the MCP Server to Deploy the Blog

In the CodeBuddy Craft chat interface, the author simply typed “deploy the blog,” and the MCP Server automatically performed the upload, extraction, and verification steps, eliminating the need for Jenkins entirely.

The blog was successfully live, confirming that the AI‑driven workflow works.

Conclusion

This case study demonstrates how an AI agent combined with MCP can create a lightweight, intelligent operations platform that automates repetitive deployment tasks. The approach can be extended to broader DevOps scenarios, paving the way for more comprehensive AI‑assisted operational tooling.

automationMCPdeploymentDevOpsAI OpsCodeBuddy
Wukong Talks Architecture
Written by

Wukong Talks Architecture

Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.