Understanding MCP Servers (Part 1): Introduction to the Model Context Protocol

Understanding MCP Servers (Part 1): Introduction to the Model Context Protocol

Introduction

AI-assisted development is evolving constantly and at a rate of knots. Over the last year, Model Context Protocol (MCP) has been at the centre of many of the improvements.

This is the first post in a five-part series exploring MCP servers and their application to Infrastructure as Code (IaC) development.

Series Overview:

  • Part 1: Introduction to MCP Servers (this post)
  • Part 2: MCP Servers vs Claude Skills
  • Part 3: Setting Up MCP Servers in VS Code
  • Part 4: MCP Servers for Infrastructure as Code
  • Part 5: Best Practices and Security Considerations

What Are MCP Servers?

Model Context Protocol (MCP) is an open standard introduced by Anthropic and subsequently open-sourced to the broader community. It provides a standardised way for AI agents (like large language models) to communicate with external data sources, tools, and application services.

Anthropic have likened MCP to a universal adapter between AI agents and the real world. Without MCP, every integration between an AI agent and an external service would require custom code. With MCP, you can build a server once that exposes specific capabilities—like database queries, API interactions, or file system access—and any MCP-compatible AI agent can use it.

The Problem MCP Solves

LLMs are trained on large datasets. Without additional data sources, their information is static and frozen at training time.

They cannot:

  • Access up-to-date external data
  • Perform actions in real systems
  • Interact with specialised tools or APIs
  • Maintain state across multiple interactions

Example Limitations:

Without additional access to the internet, if you ask an AI agent “What are the current replication options for Azure Storage Accounts?”, it can only tell you what was in its training data—which might be months or years old. It can’t check the current Azure documentation or API specifications.

Similarly, if you ask it to “List all storage accounts in my subscription,” it simply can’t do it. The AI has no way to connect to your Azure environment.

How MCP Servers Address These Limitations

MCP servers provide:

1. Real-time Data Access Query live systems for current information. An MCP server can connect to Azure APIs and retrieve current resource schemas, configurations, and state.

2. Tool Integration Connect to external APIs and services. Whether it’s GitHub, Azure, databases, or custom internal tools, MCP servers can expose them to AI agents.

3. Standardised Communication Use JSON-RPC for reliable, structured interactions. This means any MCP-compatible client can work with any MCP-compatible server.

MCP Architecture Overview

The MCP Protocol follows a standard client-server architecture. It exposes agent tools and functions with well-defined inputs and outputs described in JSON Schema.

Key Components:

  1. MCP Host: AI application coordinates MCP clients.
  2. MCP Client: Maintains a 1-to-1 connection to the MCP Server and supplies the MCP Host with context.
  3. MCP Server: Exposes data sources and handles requests from clients.
  4. Transport Layer: Uses stdio transport (local, direct process communication) or HTTP-based transport with streaming support (remote communication, standard HTTP authentication methods).
  5. Data Layer: A JSON-RPC exchange protocol that defines message structure and semantics.

Types of MCP Servers

MCP servers can be built for various purposes:

1. Data Access Servers

  • Database query servers
  • API client servers
  • File system access servers
  • Search and retrieval servers

2. Action Servers

  • Deployment automation servers
  • CI/CD integration servers
  • Infrastructure management servers
  • Workflow orchestration servers

3. Integration Servers

  • GitHub integration (repos, PRs, issues)
  • Azure integration (resources, deployments)
  • Slack/Teams integration
  • Custom internal tools

4. Specialised Servers

  • Code analysis servers
  • Security scanning servers
  • Cost optimisation servers
  • Compliance checking servers

Benefits of the MCP Standard

1. Interoperability Any MCP-compatible client can work with any MCP-compatible server. You are not locked into a specific AI platform.

2. Reusability Build an MCP server once, and multiple AI agents can use it. There is no need to create custom integrations for each AI tool.

3. Extensibility Adding new capabilities is as simple as implementing a new tool in your MCP server. There is no need to modify the AI agent.

4. Security Centralised authentication, authorisation, and auditing. Control exactly what AI agents can access and do.

5. Maintainability Updates to external APIs or services only require updating the MCP server, not every AI integration.

MCP vs. Traditional APIs

How is this different from just calling an API?

Traditional API Integration:

  • Requires custom code in the AI application
  • Tight coupling between AI and services
  • Changes require updating AI code
  • Different integration for each AI platform
  • No standard discovery mechanism

MCP Integration:

  • Standardised protocol across integrations
  • Loose coupling via tool definitions
  • Changes only require updating the MCP server
  • Works with any MCP-compatible AI platform
  • Built-in tool discovery and documentation

Think of MCP as “APIs for AI agents”, a layer designed for how AI agents interact with external systems.

Common Use Cases

For Infrastructure as Code:

  • Fetch current resource schemas
  • Validate template configurations
  • Query existing infrastructure
  • Check policy compliance
  • Estimate deployment costs

For Development:

  • Access code repositories
  • Query documentation
  • Run tests and linters
  • Deploy applications
  • Monitor services

For Data Analysis:

  • Query databases
  • Fetch metrics and logs
  • Generate reports
  • Analyse trends
  • Create visualisations

Getting Started: The MCP Ecosystem

The MCP ecosystem is growing rapidly:

Official Servers:

  • Azure MCP Server: Microsoft’s official server for Azure resource management
  • GitHub MCP Server: Repository and workflow management
  • PostgreSQL MCP Server: Database queries and management

What’s Next

In this post, we’ve covered the fundamentals of MCP servers—what they are, why they exist, and how they work. Understanding these basics is crucial as we move forward in the series.

In Part 2, we’ll explore how MCP servers differ from and complement Claude Skills, examining when to use each approach and how they work together to create powerful AI-assisted workflows.

Coming Up in This Series:

  • Part 2: MCP Servers vs Claude Skills - Understanding the differences and how they complement each other
  • Part 3: Setting Up MCP Servers in VS Code - Step-by-step installation and configuration
  • Part 4: MCP Servers for Infrastructure as Code - Practical Bicep and Azure workflows
  • Part 5: Best Practices and Security - Securing your MCP deployments and following best practices

Conclusion

  • MCP servers bridge the gap between AI agents and external systems
  • They provide real-time data access and action capabilities that static LLMs lack
  • The Model Context Protocol is an open standard enabling interoperability
  • MCP servers expose tools via JSON Schema definitions
  • They’re particularly powerful for Infrastructure as Code development
  • The ecosystem is growing rapidly with both official and community servers

Further Resources