Tuesday, April 29, 2025

MCP for DevOps – Sequence Opener and MCP Structure Intro

MCP for DevOps – Sequence Opener and MCP Structure Intro

You may have undoubtedly heard about Anthropic’s MCP (Mannequin Context Protocol) open supply mission. When you haven’t, I hope your trip on a distant island with out web entry was beautiful!

As a die-hard YouTube Premium fan, I’m inundated with video suggestions with themes like “What’s MCP?” “OMG, This Adjustments Every part,” and my favourite, “Goodbye Builders, MCP is Right here to Keep.” Significantly? Whereas it’s a unbelievable mission, it isn’t right here to exchange us.

Over the subsequent a number of weeks, I’ll delve into these subjects:

MCP—Why Ought to You Care?: This can present a short overview of MCP from a communication, discovery, and interplay perspective. We are going to then discover what it seems to be like on the wire and the way it features as a shopper/server structure, adopted by numerous use circumstances. I received’t cowl the historical past of MCP or different important data, as numerous glorious sources can be found on YouTube, dev.to, Medium, and elsewhere.

MCP for DevOps: I’ll focus on a collection of use circumstances that work properly for DevOps, NetOps, and SecOps roles.

MCP How-to: That is the place issues get thrilling. I’ll current a number of demos and walk-throughs for the next use circumstances:

  • Cursor with GitHub: Use Cursor as an MCP shopper to programmatically work together with an MCP server that integrates with GitHub for a Cisco DevOps workflow
  • Cursor with Argo CD: Use Cursor as an MCP shopper to programmatically work together with an MCP server that employs Argo CD for a Cisco DevOps workflow
  • Claude Desktop & DevOps Workflows: We are going to swap issues up through the use of Claude Desktop as a substitute of Cursor to exhibit flexibility on the MCP shopper aspect

On the finish of the sequence, I’ll tie all of this collectively to point out how Cursor, with a number of MCP shoppers, can drive modifications to Ansible playbooks in a GitHub repository, triggering actions within the Argo CD workflow. Finally, we are going to use the Ansible playbook to switch configuration settings on Cisco options equivalent to Cisco ISE (Id Providers Engine) and different Cisco merchandise.

I hope you be a part of me on this journey.

Let’s get began with discussing the MCP structure and why you must care about it.


MCP Intro—Why Ought to You Care?

Welcome to the primary publish in our three-part technical sequence on Mannequin Context Protocol (MCP), a brand new, targeted protocol constructed to assist AI functions and brokers work together with instruments, APIs, recordsdata, and databases persistently and programmatically.

When you’re in DevOps and experimenting with AI-driven automation, MCP deserves your consideration—not as a silver bullet however as a sensible step towards cleaner integration between AI methods and your operational stack. That mentioned, it’s early days. MCP is new and transferring quick, and whereas it already solves numerous real-world issues, there are nonetheless corners to shine and edge circumstances it doesn’t but cowl.

What’s MCP, and Why Does It Matter?

As illustrated in Determine 1, Mannequin Context Protocol (MCP) is a protocol that gives a uniform method to plug in an AI mannequin into instruments and companies.

Determine 1. MCP with LLMs and Instruments

It’s:

  • A light-weight communication protocol designed particularly for AI brokers and functions.
  • Constructed to attach these brokers to instruments, APIs, databases, and file methods.
  • Structured as a shopper/server structure—easy and predictable.
  • Plumbing

It’s not:

  • A messaging protocol for agent-to-agent communication.
  • An LLM, database, AI assistant or agent.
  • A general-purpose integration platform.
  • A alternative in your current APIs or knowledge bus.

MCP’s job is tightly scoped: give an AI agent a clear, standardized method to uncover, request, and invoke capabilities on current tool-based infrastructure. In case your LLM-powered bot must name a REST API, record recordsdata, or question a database—MCP offers the glue.

MCP issues as a result of it reduces and, in lots of circumstances, removes the toil for AI functions and brokers to seek out, hook up with, and leverage exterior instruments and companies equivalent to APIs, knowledge sources, and different non-AI native instrument units. For Dev/Web/SecOps employees, it could actually convey speedy worth so that you can leverage an AI agent to connect with your current knowledge sources and APIs in order that an operationally-focused agent can extra precisely full duties.

We are going to focus on use circumstances within the subsequent weblog, however think about you want to create a workflow that works with Ansible Playbooks, NetBox, and GitHub and automate configurations towards your infrastructure.

An instance workflow could appear to be this:

  • You manually create a Jinja2 template for Ansible and host it on GitHub.
  • Collect knowledge out of your NetBox deployment.
  • You employ Python + Jinja2 to populate the playbook template with knowledge from NetBox after which invoke Ansible by way of a Python module, CLI, runner, and so on.
  • Ideally, you utilize a CI/CD instrument to auto-run this workflow.

Quick ahead from the nice ’ole days; you or somebody in your group be taught concerning the energy of AI Brokers and create a sequence of AI brokers that may faucet into every instrument and knowledge supply with out writing any code. They will leverage MCP to connect with every useful resource as MCP servers and work together with them natively—no particular script code. No scouring the web for SDKs or some mysterious script somebody recommends that you simply don’t perceive. To me, that is certainly one of many value-add use circumstances of MCP.

Overview of MCP – Structure and Core Parts

MCP has a streamlined structure and there aren’t many transferring components.

As illustrated in Determine 2 MCP makes use of a shopper/server structure. Let’s outline what the shopper and server elements do.

Determine 2. MCP Parts

Determine 2 reveals an MCP host which is an AI utility equivalent to an AI agent, IDE, coding assistant, and so on..

The MCP shopper (MCP-C) is software program that runs on MCP hosts and has one-to-one connections to MCP servers (MCP-S).

The MCP server is software program that represents particular service or instrument capabilities.

The MCP host makes use of the language-specific MCP SDK for shopper connections (instance: MCP Python SDK) to determine connections to MCP servers. The MCP SDK is used for each client-side and server-side code.

Instance Python MCP shopper code.

Instance Python MCP server code.

Many present MCP shoppers are full functions or AI brokers with the MCP shopper SDK performance natively inbuilt. You may see an instance record right here: https://modelcontextprotocol.io/shoppers

There are quite a few sources of MCP server lists on the Web. Here’s a record from the MCP mission: https://modelcontextprotocol.io/examples. Some MCP shopper suppliers, equivalent to Cursor, have their very own record of servers: https://cursor.listing/.

Determine 2 reveals that every MCP-C occasion has a one-to-one connection to every MCP-S occasion. Within the determine, there are two MCP shoppers working on the MCP host, an AI agent on this instance. The primary MCP shopper is connecting to a locally-hosted MCP server that gives native machine file system entry. The second MCP shopper is connecting to a remotely hosted MCP server that’s offering entry to a distant file system.

MCP shoppers trade messages with MCP servers utilizing JSON-RPC 2.0 (because the wire format). For native knowledge sources, MCP makes use of JSON-RPC over stdio (Customary Enter/Output) because the transport. Determine 3., illustrates how an MCP-C connects to an area MCP-S for file or DB entry utilizing stdio. The MCP-S sends JSON-RPC messages to its normal output / stdout and reads from the usual enter / stdin.

Determine 3. JSON-RPC over stdio

Right here is an instance of working an MCP filesystem server regionally in stdio mode and limiting entry to a really particular listing:

npx -y @modelcontextprotocol/server-filesystem /Customers/shmcfarl/code/mcp-testing
 Safe MCP Filesystem Server working on stdio
 Allowed directories: [ '/Users/shmcfarl/code/mcp-testing' ]
 

Utilizing an incredible take a look at instrument such because the MCP Inspector you’ll be able to pair an area shopper (MCP Inspector) along with your regionally working stdio or HTTP+SSE server:

npx -y @modelcontextprotocol/inspector npx -y @modelcontextprotocol/server-filesystem /Customers/shmcfarl/code/mcp-testing
 Beginning MCP inspector...
 Proxy server listening on port 3000
 
 MCP Inspector is up and working at http://localhost:5173
 Question parameters: {
   transportType: 'stdio',
   command: 'npx',
   args: '-y @modelcontextprotocol/server-filesystem -y /Customers/shmcfarl/code/mcp-testing',
 . . . [Output removed for clarity]
 Spawned stdio transport
 Linked MCP shopper to backing server transport
 Created internet app transport
 Created internet app transport
 Arrange MCP proxy
 Obtained message for sessionId 697bd02d-5d67-4dfc-85b9-6a12d6a99f45
 Obtained message for sessionId 697bd02d-5d67-4dfc-85b9-6a12d6a99f45
 Obtained message for sessionId 697bd02d-5d67-4dfc-85b9-6a12d6a99f45
 Obtained message for sessionId 697bd02d-5d67-4dfc-85b9-6a12d6a99f45

MCP helps HTTP+SSE (Server-Despatched Occasions) to ship structured requests from service backends utilizing MCP servers to MCP shoppers for native or distant connections. The 2025-03-26 specification modifications states that MCP is transferring to a extra versatile Streamable HTTP transport. Nonetheless, HTTP+SSE transport can nonetheless be used for backward compatibility. This retains it clear, traceable, and tool-agnostic. Observe: As of the time of scripting this weblog, the brand new Streaming HTTP assist is just not accomplished in every SDK.

Determine 4 illustrates the connection circulate for HTTP+SSE situations. Within the determine, HTTP POST is used for MCP-C -to- MCP-S messages. HTTP+SSE is used for MCP-S -to- MCP-C messages.

Determine 4. MCP-C -to- MCP-S communication utilizing HTTP+SSE

You may undergo the MCP quickstart server and shopper guides to discover ways to setup your personal climate shopper/server combo: https://modelcontextprotocol.io/quickstart/server. Utilizing an identical setup, you’ll be able to see some HTTP messages for stuff like a instruments record name:

POST /messages/?session_id=6ccde3779adf43cc9d3f5f661508310b HTTP/1.1
 Host: 0.0.0.0:8080
 Settle for: */*
 Settle for-Encoding: gzip, deflate
 Connection: keep-alive
 Person-Agent: python-httpx/0.28.1
 Content material-Size: 46
 Content material-Kind: utility/json
 
 {"methodology":"instruments/record","jsonrpc":"2.0","id":2}
 HTTP/1.1 202 Accepted
 date: Tue, 08 Apr 2025 20:14:51 GMT
 server: uvicorn
 content-length: 8
 
 Accepted
 

And a instrument name to get the climate forecast:

POST /messages/?session_id=6ccde3779adf43cc9d3f5f661508310b HTTP/1.1
 Host: 0.0.0.0:8080
 Settle for: */*
 Settle for-Encoding: gzip, deflate
 Connection: keep-alive
 Person-Agent: python-httpx/0.28.1
 Content material-Size: 134
 Content material-Kind: utility/json
 
 {"methodology":"instruments/name","params":{"title":"get_forecast","arguments":{"latitude":39.7392,"longitude":-104.9903}},"jsonrpc":"2.0","id":3}
 HTTP/1.1 202 Accepted
 date: Tue, 08 Apr 2025 20:14:54 GMT
 server: uvicorn
 content-length: 8
 
 Accepted
 

And a response for the climate forecast immediate I entered for Denver, CO:

occasion: message
 knowledge: {"jsonrpc":"2.0","id":3,"consequence":{"content material":[{"type":"text","text":"nThis Afternoon:nTemperature: 74..FnWind: 12 mph WnForecast: Partly sunny. High near 74, with temperatures falling to around 72 in the afternoon. West wind around 12 mph, with gusts as high as 18 mph.nn---nnTonight:nTemperature: 42..FnWind: 5 to 10 mph WSWnForecast: Partly cloudy, with a low around 42. West southwest wind 5 to 10 mph, with gusts as high as 18 mph.nn---nnWednesday:nTemperature: 71..FnWind: 5 to 15 mph WnForecast: Mostly sunny, with a high near 71. West wind 5 to 15 mph, with gusts as high as 24 mph.nn---nnWednesday Night:nTemperature: 40..FnWind: 2 to 14 mph WNWnForecast: Mostly clear, with a low around 40. West northwest wind 2 to 14 mph, with gusts as high as 29 mph.nn---nnThursday:nTemperature: 68..FnWind: 2 to 8 mph ESEnForecast: Sunny, with a high near 68. East southeast wind 2 to 8 mph, with gusts as high as 16 mph.n"}],"isError":false}}

Because the specification change to Streamable HTTP may be very latest and never absolutely applied as of the writing of this weblog, I’ll forgo doing a granular clarification of that connection sequence. I really helpful that you simply learn concerning the proposed Streamable HTTP implementation right here: https://modelcontextprotocol.io/specification/2025-03-26/primary/transports#streamable-http.

Discovery

When an agent must work together with a instrument or service, MCP offers a useful resource discovery mechanism that lets MCP shoppers uncover out there sources. The MCP shopper can use direct sources or useful resource templates. You may learn extra concerning the useful resource discovery choices at https://modelcontextprotocol.io/docs/ideas/sources. However, the necessary factor to know is that the purpose of useful resource discovery is to seek out out the next data:

  • Supported capabilities and actions
  • Protocol variations
  • Customized metadata

Determine 5 reveals the MCP-C to MCP-S request/response circulate for the capabilities discovery.

Determine 5. MCP Discovery Circulate

Whereas there isn’t any MCP server registry that MCP shoppers can search to dynamically uncover all out there MCP servers and their capabilities, there are MCP server directories as was famous early within the doc. There’s an ever-growing variety of MCP directories and in lots of circumstances, all of them have the identical or related record of MCP servers. A number of of the numerous websites embody:

MCP Useful resource Discovery – Instance

Let’s have a look at an instance of useful resource discovery utilizing direct sources.

I’ve the SQLite MCP Server working on my native machine. I’m utilizing Claude Desktop as my AI utility with the MCP shopper performance configured to make use of the SQLite MCP server. Here’s a snippet from my claude_desktop_config.json file:

"mcpServers": {
     "sqlite": {
       "command": "uvx",
       "args": ["mcp-server-sqlite", "--db-path", "/Users/shmcfarl/code/mcp-testing/sqlite/test.db"]
     },

Once I use Claude Desktop to instrument name SQLite and ask for an inventory of server sources, you’ll be able to see the message trade from the MCP shopper to MCP server.

2025-04-09T18:08:37.964Z [sqlite] [info] Message from shopper: {"methodology":"sources/record","params":{},"jsonrpc":"2.0","id":44}
 2025-04-09T18:08:37.965Z [sqlite] [info] Message from server: {"jsonrpc":"2.0","id":44,"consequence":{"sources":[{"uri":"memo://insights","name":"Business Insights Memo","description":"A living document of discovered business insights","mimeType":"text/plain"}]}}
 

Per the MCP specification you’ll be able to see the strategy utilized by the MCP shopper is sources/record and the MCP server responds utilizing the direct sources format:

{
   uri: string;           // Distinctive identifier for the useful resource
   title: string;          // Human-readable title
   description?: string;  // Optionally available description
   mimeType?: string;     // Optionally available MIME sort
 }

Conclusion

MCP is off to a powerful begin, particularly for DevOps groups experimenting with AI-driven automation.

On the similar time, it’s nonetheless a younger protocol. MCP provides you a clear basis in the event you’re constructing AI-enabled workflows that must work together with infrastructure and instruments safely—however you’ll nonetheless must assess match in your particular use case.

There’s much more introductory content material that I may cowl, however I feel this lays a basis for the remainder of the weblog sequence. For the rest of the blogs it can be crucial so that you can know:

MCP is right for:

  • Brokers want to connect with a number of knowledge sources and companies in a normal method
  • It abstracts away the per-integration code complexity – simply use the MCP SDK
  • You want it for a low toil platform or with IDE integrations

What doesn’t MCP do (at the very least right now)?

  • MCP is just not an agent-to-agent framework
  • MCP is just not used for the creation, deployment, lifecycle administration, and safety of brokers or instruments
  • MCP is just not an LLM
  • MCP is just not an information supply
  • MCP doesn’t dynamically uncover instruments and companies the MCP server will symbolize

We additionally discovered how MCP shoppers and servers work together with each other and over which forms of protocol and messaging codecs.

Let’s cease there and decide again up within the subsequent weblog on MCP for DevOps: Use Circumstances

Favor to see it in motion? Watch the total MCP for DevOps: Structure & Parts video walkthrough right here: https://youtu.be/Qdms0EHwhOw

Subsequent within the sequence

MCP for DevOps: Use Circumstances

✅ AI Brokers Triggering DevOps Instruments Use MCP to work together with current DevOps scripts, APIs, or companies in a normal format an AI agent can devour.

✅ Infrastructure-Conscious LLMs Let your AI apps ask structured questions like “What kubernetes companies are working in namespace default?” or “Create a brand new database desk”—with stay solutions from methods by way of MCP servers.

✅ Safe Instrument Invocation by way of AI expose choose CLI instruments or automation workflows by way of an MCP server interface, permitting AI brokers to work together with them beneath managed circumstances equivalent to utilizing a Docker scout MCP to scan photographs.

See you on the subsequent publish!

Share:

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles