> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Understanding the Model Context Protocol and how it enables AI agents to interact with external systems

# What is Model Context Protocol (MCP)?

The **Model Context Protocol (MCP)** is an open standard that unifies how AI models communicate with external tools and services. It acts as a bridge between Large Language Models (LLMs) and the real world, enabling AI agents to interact with databases, APIs, files, and other systems in a standardized way.

![MCP Architecture Overview](https://mintcdn.com/klavisai/QboFM7dVN-cpLliQ/images/concepts/mcp-simple-diagram.avif?fit=max\&auto=format\&n=QboFM7dVN-cpLliQ\&q=85\&s=78ff8163d3af2fcdd2bcf92010542cc1)

## How MCP Works

MCP follows a simple **client-server architecture**:

* **MCP Client**: The AI assistant or application (like Claude Desktop, Cursor, or your custom AI agent)
* **MCP Server**: A specialized backend that exposes tools to interact with external systems
* **Tools**: Individual functions that the AI can call to perform specific actions

```mermaid theme={null}
graph LR
    A[AI Agent] -->|Request| B[MCP Client]
    B -->|Tool Call| C[MCP Server]
    C -->|API Call| D[External Service]
    D -->|Response| C
    C -->|Result| B
    B -->|Context| A
```

## Key Benefits

> [card] Standardized Integration
>
> One protocol for all external integrations - no more custom, one-off connections

> [card] Tool Ecosystem
>
> Access to 100+ pre-built tools across CRM, productivity, and development platforms

> [card] Security & Authentication
>
> Built-in OAuth flows and secure credential management

> [card] Scalable Architecture
>
> Production-ready hosted infrastructure with self-hosting options

## MCP Server Types

### Hosted MCP Servers (Recommended)

Klavis AI provides **production-ready hosted MCP servers** that eliminate setup complexity:

* No infrastructure management
* Built-in OAuth authentication
* Automatic updates and maintenance
* 99.9% uptime SLA

```python theme={null}
from klavis import Klavis

klavis = Klavis(api_key="your-api-key")
server = klavis.mcp_server.create_strata_server(...)
```

### Self-Hosted MCP Servers

For custom requirements or on-premises deployments:

```bash theme={null}
# Run any MCP server with Docker
docker run -p 5000:5000 ghcr.io/klavis-ai/gmail-mcp-server:latest
```

## Available MCP Integrations

Klavis AI offers 100+ MCP servers across different categories:

> [card] [View All Integrations](https://www.klavis.ai/docs/mcp-server/overview.md)
>
> Browse our complete catalog of MCP server integrations

## Getting Started

> [card] [Quick Start Guide](https://www.klavis.ai/docs/quickstart.md)
>
> Get up and running in under 5 minutes

## Learn More

> [card] [MCP Official Spec](https://modelcontextprotocol.io/)
>
> Read the official Model Context Protocol specification

> [card] [GitHub Repository](https://github.com/Klavis-AI/klavis)
>
> Explore our open-source repo

> [card] [Community Discord](https://discord.gg/p7TuTEcssn)
>
> Join our developer community


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.