What Is an MCP Server? The Complete Guide to Model Context Protocol

by Sandlabs Team, Founder, Sandlabs

Every AI tool you use needs its own integration. Your Slack bot has one connector. Your database assistant has another. Your GitHub copilot has a third. Each with its own authentication flow, its own data format, its own quirks.

Now multiply that across every AI model, every business tool, and every team in your organisation. You get an explosion of custom glue code that's expensive to build and painful to maintain.

This is the exact problem that MCP servers solve.

What Is an MCP Server?

An MCP server is a lightweight program that exposes your tools, data sources, and workflows to AI models using the Model Context Protocol (MCP) — an open standard created by Anthropic. It acts as a bridge between an AI assistant like Claude and your external systems (databases, APIs, file systems, SaaS tools), translating requests into actions and returning structured results.

Think of it like USB-C. Before USB-C, every device had a different charging port. Your phone had micro-USB, your laptop had MagSafe, your camera had some proprietary connector. You needed a drawer full of cables.

MCP is USB-C for AI integrations. One standard protocol. Any AI model can talk to any tool through a single, consistent interface.

How Does Model Context Protocol Work?

MCP uses a client-server architecture built on JSON-RPC 2.0. There are three participants in every MCP interaction:

MCP Host

The AI application your user interacts with. This is Claude Desktop, Claude Code, ChatGPT, Cursor, VS Code — any AI-powered app that supports MCP.

MCP Client

A lightweight connector inside the host that maintains a one-to-one connection with an MCP server. Each client talks to exactly one server.

MCP Server

The program you build (or install from the community). It exposes capabilities to the AI model through three core primitives:

  • Tools — Executable functions the AI can call. Query a database, send a Slack message, create a GitHub issue.
  • Resources — Read-only data sources. File contents, database records, API responses.
  • Prompts — Reusable interaction templates that guide the AI's behaviour for specific tasks.

Here's what the flow looks like in practice:

  1. The user asks Claude: "What are the open pull requests on our main repo?"
  2. Claude's MCP client sends a JSON-RPC request to the GitHub MCP server
  3. The server authenticates with GitHub, fetches the PRs, and returns structured data
  4. Claude formats the response and presents it to the user

All of this happens through one standardised protocol. No custom API wrappers. No brittle glue code.

Why MCP Servers Matter for AI Development

Before MCP, connecting an AI model to external tools meant building bespoke integrations for every combination of model and tool. If you had 5 AI models and 10 tools, you needed up to 50 custom integrations.

With MCP, each tool needs one server. Each AI model needs one client. 5 models + 10 tools = 15 components instead of 50. The math gets even better as you scale.

The Real Benefits

Interoperability. Build an MCP server once, and it works with Claude, ChatGPT, Gemini, and every other model that supports the protocol. The ecosystem now has over 12,000 community-built servers.

Security by design. MCP servers run in your environment, on your infrastructure. The AI model never gets direct access to your database or API keys. The server acts as a controlled gateway.

Composability. An AI agent can use multiple MCP servers in a single workflow — query your database, check your CRM, draft an email, and send it through Slack, all in one interaction.

Maintainability. When an API changes, you update one MCP server. Not fifty integration scripts scattered across your codebase.

MCP Server Architecture: What's Inside

An MCP server is surprisingly simple. At its core, it's a program that:

  1. Declares its capabilities (tools, resources, prompts)
  2. Listens for JSON-RPC requests from an MCP client
  3. Executes the requested action
  4. Returns a structured result

Transport Mechanisms

MCP supports two transport types:

stdio (Standard Input/Output) — The server runs as a local process on your machine. Communication happens through stdin/stdout. This is the simplest option and ideal for local development or desktop tools like Claude Desktop.

Streamable HTTP — The server runs remotely and accepts HTTP requests. This is what you use in production for shared, team-wide, or cloud-deployed servers.

Setting Up Your First MCP Server: Step by Step

Here's how to get a pre-built MCP server running with Claude Desktop. We'll use the popular PostgreSQL MCP server as an example.

Step 1: Install the MCP Server

Most MCP servers are distributed as npm or pip packages. For the Postgres server:

npm install -g @modelcontextprotocol/server-postgres

Step 2: Configure Claude Desktop

Open your Claude Desktop config file and add the server:

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:password@localhost:5432/mydb"
      ]
    }
  }
}

Step 3: Restart Claude Desktop

After restarting, Claude can now query your PostgreSQL database directly. Ask it "Show me all users who signed up this week" and it will write and execute the SQL for you.

Step 4: Test the Connection

Open Claude Desktop and look for the MCP server indicator (a small plug icon). Click it to verify your Postgres server is connected and its tools are available.

Step 5: Start Querying

Try a natural language query like "What are the top 10 products by revenue this month?" Claude will use the MCP server's query tool to fetch the data and present it in a readable format.

Real-World MCP Server Examples

The MCP ecosystem has exploded. Here are some of the most widely used servers and what they enable:

GitHub MCP Server

Lets AI models manage repositories, pull requests, issues, and code reviews. Ask Claude to "review the latest PR and summarise the changes" and it handles the entire workflow.

Slack MCP Server

Send messages, search conversation history, manage channels. Perfect for AI agents that need to communicate with your team as part of a workflow.

PostgreSQL / MySQL MCP Servers

Direct database access through natural language. The AI writes the SQL, the server executes it, and results come back structured.

Google Drive MCP Server

Search, read, and organise documents. An AI assistant can pull information from your Drive to answer questions or compile reports.

File System MCP Server

Read and write local files. Essential for coding assistants and document processing workflows.

Custom MCP Servers

This is where the real value lives for businesses. Pre-built servers cover common tools, but your proprietary systems — your internal CRM, your custom billing platform, your compliance database — need custom MCP servers built specifically for your workflows.

At Sandlabs, we build custom MCP connectors for businesses that want their AI to work with the tools they already use. We've built connectors for internal databases, legacy APIs, compliance systems, and industry-specific platforms. If you're exploring this, our guide to building custom MCP connectors covers the architecture and approach in detail.

MCP Server Configuration for Claude Code

If you're using Claude Code (Anthropic's CLI tool for developers), MCP server configuration lives in your project's settings:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    },
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token"
      }
    }
  }
}

This gives Claude Code access to both GitHub and Slack in a single session. You can chain actions across both — for example, "create a GitHub issue for every unresolved Slack thread tagged #bugs."

MCP Server Security: What You Need to Know

Security is built into the protocol's design, but you still need to be thoughtful about implementation:

Principle of least privilege. Only expose the tools and resources the AI actually needs. If it only needs to read from your database, don't give it write access.

Environment-based secrets. API keys and credentials are passed through environment variables in the server config. They never flow through the AI model itself.

Input validation. Your MCP server should validate every request before executing it. If the AI asks to drop a table, your server should say no.

Audit logging. Log every action your MCP server takes. This is essential for compliance and debugging.

Network isolation. Run production MCP servers in isolated network segments. The server should only be able to reach the specific services it needs.

The Future of MCP Servers

MCP adoption is accelerating. Anthropic created the standard, and OpenAI, Google, and Microsoft have all adopted it. The protocol is evolving rapidly with new capabilities:

  • OAuth 2.1 support for standardised authentication across remote servers
  • Streamable HTTP transport replacing the older SSE approach for better reliability
  • Elicitation allowing servers to request additional input from users mid-workflow
  • Tool annotations that describe side effects, helping AI models make safer decisions

The trajectory is clear: MCP is becoming the standard interface between AI and everything else. Every business tool will eventually have an MCP server, just like every business tool eventually got a REST API.

Should You Build or Buy MCP Servers?

For common tools like GitHub, Slack, and databases — use the community-built servers. They're mature, well-maintained, and free.

For your proprietary systems — you need custom MCP servers. This is where most businesses get stuck. Building a production-grade MCP server requires understanding the protocol, implementing proper security, handling edge cases, and maintaining it as both your systems and the protocol evolve.

If you're a technical team with bandwidth, our guide to building custom MCP connectors will get you started. If you'd rather move fast and get it right the first time, tell us about your project. We build custom MCP connectors with fixed pricing and deliver in 2-4 weeks.

Frequently Asked Questions

What is an MCP server in simple terms?

An MCP server is a small program that connects an AI model (like Claude or ChatGPT) to an external tool or data source using a standardised protocol. It translates the AI's requests into actions — like querying a database or sending a message — and returns the results in a format the AI understands.

What does MCP stand for?

MCP stands for Model Context Protocol. It's an open standard created by Anthropic in late 2024 that defines how AI applications communicate with external tools and data sources. The protocol uses JSON-RPC 2.0 and supports both local (stdio) and remote (HTTP) transport mechanisms.

Is MCP only for Claude, or does it work with other AI models?

MCP works with any AI model or application that implements the protocol. While Anthropic created MCP, it's been adopted by OpenAI (ChatGPT), Google (Gemini), Microsoft (Copilot), and development tools like Cursor and VS Code. Building one MCP server makes your tool accessible to all of them.

How is an MCP server different from a regular API?

A regular API exposes endpoints that any program can call. An MCP server wraps that API (or any data source) in a standardised format that AI models understand natively. It adds tool descriptions, structured input/output schemas, and discovery — so the AI knows what's available and how to use it without custom integration code.

Do I need to write code to use MCP servers?

Not necessarily. Many pre-built MCP servers can be installed with a single command and configured in a JSON file. You only need to write code if you're building a custom MCP server for a proprietary system. For common tools like GitHub, Slack, and PostgreSQL, community-built servers are ready to use out of the box.

More articles

Claude Certification 2026: All Four Anthropic Exams, What They Cost, and Whether Your Team Needs One

Anthropic now runs four proctored Claude certifications through Pearson VUE. What CCAO-F, CCDV-F, CCAR-F and CCAR-P actually test, what they cost in AUD, how to study for free, and the honest answer on whether a certificate changes anything for your business.

Read more

Does Anthropic Charge GST in Australia? Claude Invoices, ABNs and Your BAS

Anthropic adds 10% GST to Australian Claude subscriptions by default - and if you do not add your ABN, you probably cannot claim it back. How the imported-services rules work, the two-minute fix, and what to do about invoices you have already paid.

Read more

Let's build something great together.

Melbourne, Australia — serving founders worldwide. [email protected]