MCP (Model Context Protocol) – Standard for AI Tool Integration

The Model Context Protocol (MCP) is an open standard for integrating tools and data sources into AI assistants.

Category:AI & Machine Learning

The Model Context Protocol (MCP) is an open standard developed by Anthropic that enables AI assistants like Claude to interact with external tools, databases, APIs, and other systems. MCP transforms AI assistants from pure text generators into active agents capable of performing real-world actions.

Before MCP, developers had to build separate tool integrations for every AI platform. With MCP there is a unified standard: develop an MCP server for a tool once, and all MCP-compatible AI assistants can use it.

How Does MCP Work?

Architecture: Client-Server Model

MCP is based on a client-server architecture:

  • MCP Client: The AI assistant (e.g. Claude Code, Cursor)
  • MCP Server: A program that provides specific tools or data sources
  • Communication: Standardized JSON-based protocol

What Can an MCP Server Provide?

  • Tools: Functions the AI can call (e.g. "Run Playwright test")
  • Resources: Data the AI can read (e.g. database entries)
  • Prompts: Predefined prompt templates for frequent tasks

MCP in Practice: Examples

1. Playwright MCP – Browser Automation

One of the most well-known MCP servers enables browser automation:

  • What it can do: Open web pages, click, fill forms, take screenshots
  • Use case: End-to-end tests, web scraping, UI debugging
  • Example: "Open my website, click on login, fill out the form, and take a screenshot"
  • Installation: npx @playwright/mcp@latest

2. Filesystem MCP – File Access

Enables structured access to local files:

  • Read and write files
  • Browse directories
  • Retrieve file metadata

3. Database MCP – Database Access

Direct queries to databases:

  • Execute SQL queries
  • Inspect schema
  • Analyze data
  • Note: Only for development databases, never production!

4. Git MCP – Version Control

Git operations directly through the AI:

  • Create commits
  • Switch branches
  • View diff
  • Search history

5. Custom MCP Server

Developers can build their own MCP servers for specific tools:

  • Access to internal APIs
  • Integration of legacy systems
  • Company-specific workflows

MCP Setup: Step by Step

1. Install MCP Server

Example: Playwright MCP

npm install -g @playwright/mcp@latest

2. Configure MCP Server

In the Claude Code configuration (~/.claude.json):

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

3. Restart Claude Code

After configuration changes the session must be restarted.

4. Use MCP Server

In Claude Code:

  • Type /mcp to see available servers
  • AI can automatically access tools
  • Example: "Open https://elasticbrains.de and take a screenshot"

Project-Specific MCP Servers

Problem: Global vs. Project Configuration

MCP servers can be configured globally or per project:

  • Global: ~/.claude.json under mcpServers
  • Project: ~/.claude.json under projects.<path>.mcpServers

Best Practice

Define project-specific MCP servers in the project configuration:

{
  "projects": {
    "/Users/me/my-project": {
      "mcpServers": {
        "custom-api": {
          "command": "node",
          "args": ["./mcp-server.js"]
        }
      }
    }
  }
}

Developing MCP Servers

Basic Structure of an MCP Server

An MCP server is a program that communicates via stdio:

  1. Receive JSON-RPC requests via stdin
  2. Process the request (call tool, fetch data)
  3. Send JSON-RPC response via stdout

Example: Simple MCP Server (Node.js)

import { MCPServer } from '@anthropic-ai/mcp-sdk';

const server = new MCPServer({
  name: 'my-custom-tool',
  version: '1.0.0'
});

// Register tool
server.addTool({
  name: 'get_weather',
  description: 'Get current weather for a location',
  inputSchema: {
    type: 'object',
    properties: {
      location: { type: 'string' }
    }
  },
  handler: async ({ location }) => {
    // API call to weather service
    const weather = await fetchWeather(location);
    return { temperature: weather.temp, condition: weather.condition };
  }
});

server.start();

MCP SDK

Anthropic offers SDKs for various languages:

  • Node.js/TypeScript: @anthropic-ai/mcp-sdk
  • Python: anthropic-mcp
  • Other: Community SDKs for Go, Rust, etc.

MCP in the Agentic Coding Workflow

Use Cases for Agentic Coding

  • Testing: Playwright MCP for automated UI tests
  • Debugging: Database MCP for database inspections
  • CI/CD: Git MCP for automated commits and deploys
  • Integration: Custom MCP for company-specific APIs

Example Workflow

  1. Developer: "Implement login feature and test it"
  2. Claude Code:
    • Generates login component (code generation)
    • Writes Playwright test (via MCP)
    • Runs test (via Playwright MCP)
    • Screenshot on failure (via Playwright MCP)
  3. Result: Fully tested feature, without manual testing

Security and Best Practices

⚠️ Security Notes

  • Never production databases: MCP with DB access only for dev/staging
  • Credentials: Do not hardcode in MCP configuration, use only ENV variables
  • Permissions: Configure MCP servers as restrictively as possible
  • Review: Always review AI-generated changes, even when using MCP

Best Practices

  • Configure MCP servers per project instead of globally
  • Choose tool names that are clear and descriptive
  • Define input schemas strictly (validation)
  • Error handling: return clear error messages
  • Logging: log MCP calls for debugging

The Future of MCP

Emerging Trends

  • MCP Marketplace: Central platforms for MCP servers (like npm for tools)
  • Multi-Agent MCP: Multiple AI agents share MCP servers
  • Bidirectional MCP: Tools can proactively communicate with the AI
  • MCP-as-a-Service: Cloud-hosted MCP servers for teams

MCP Beyond Anthropic

Although developed by Anthropic, MCP is an open standard:

  • OpenAI could integrate MCP into GPT models
  • Open source LLM frameworks (LangChain, LlamaIndex) are building MCP support
  • Potential to become an industry-wide standard

MCP at Elasticbrains

At Elasticbrains we use MCP extensively:

  • Playwright MCP: Automated UI tests in all frontend projects
  • Custom MCP Server: Access to internal development tools
  • Database MCP: Quick database analyses during development
  • Workshop: In our Agentic Coding Workshop you learn MCP setup and best practices

Learning MCP

In our Agentic Coding Workshop we cover MCP in depth:

  • Installing and configuring MCP servers
  • Using Playwright MCP for automated tests
  • Developing custom MCP servers for company-specific tools
  • Best practices for security and performance
  • Hands-on: Using MCP in real projects

MCP Adoption & Ecosystem Growth

MCP is an Anthropic open standard gaining traction with Claude Code users in North America and Western Europe. Adoption is highest among developers who need to extend Claude with custom tools; less adoption among Cursor and GitHub Copilot users (no MCP support yet). The MCP ecosystem is growing (Playwright, Filesystem, Database MCPs available; community-contributed MCPs emerging) but is younger and smaller than LangChain's tool ecosystem. Enterprises building custom AI integrations increasingly use MCP to standardize tool integration patterns.

MCP in Global, Multi-Tool Development Teams

For distributed teams using multiple AI tools, MCP creates a common language for tool integration – though currently only Claude Code natively supports it. Teams can build an MCP once (e.g., Postgres database MCP) and use it across Claude Code deployments globally. This reduces duplication and standardizes tool integrations. For international teams, MCP's security model (explicit credential management) is valuable – MCP servers can be deployed in specific regions (EU MCP server in Frankfurt for GDPR, APAC MCP in Singapore) enabling agents to access local resources without cross-border data transfers.

FAQ for Teams Considering MCP

Is MCP worth learning if I'm not using Claude Code?
Only if you use Claude Code or plan to (Cursor and Copilot don't support MCP yet). If you're on Cursor/Copilot, use their native tool integration instead. MCP's power is Claude Code-specific – it's tightly integrated with how Claude handles tools and context.
Can I build a custom MCP for our proprietary system/API?
Yes – MCP is designed for this. The MCP SDK is open-source and well-documented. Building an MCP is a 1–3 day project for a standard API integration. The benefit: once built, any Claude Code user on your team can use it securely, with credentials managed server-side (never sent to Claude).
How do MCPs handle security and credentials for sensitive APIs?
MCP servers run locally (or on your infrastructure), not on Claude's servers. Credentials are stored server-side and never sent to Claude. Claude only receives results from MCP. This is ideal for accessing internal systems, databases, or APIs with sensitive data – the actual data never leaves your network.

Further Resources

Agentic Coding Workshop

Learn this topic hands-on in our workshop - with real projects and experienced trainers.

View Workshop

More Glossary Terms