For the complete documentation index, see llms.txt. This page is also available as Markdown.

MCP (Model Context Protocol)

What is MCP?

MCP, short for Model Context Protocol, is a standardized protocol for communication between LLMs and external services. It enables various large language models such as Anthropic Claude, OpenAI GPT, and Google Gemini to interact with other services using the same set of standardized rules.

What Can MCP Help With?

With MCP, LLMs are no longer just chatbots that can talk -- they become intelligent work partners that can actually execute tasks.

Connect to External Data Sources in Real Time

  • Access databases

  • Read file systems

  • Integrate with cloud services

Proactively Invoke Tools

  • Execute code

  • Operate applications


How MCP Works

The operating principle of MCP is illustrated in the diagram below:

Component
Description

Frontend (User-facing)

Users issue commands through UI or SDK

AI Model Layer

LLM calls MCP Client to interact with external tools in a standardized format

Protocol Layer (MCP)

Uses JSON-RPC 2.0 to define tool interfaces, Schema validation, and streaming transport. JSON-RPC 2.0 is a communication protocol that defines "request and response" structures in JSON format, allowing LLMs to communicate with various programs using the same language.

MCP Servers

Receive model requests and interact with actual tools or data systems. In addition to hosting your own MCP Servers, you can also use Remote MCP services to connect LLMs with other services.

External Systems

Various real-world resources: databases, APIs, Git, file systems, etc.

MCP Workflow Diagram

Through this workflow, LLMs can use a unified language to interact with various external programs, helping you complete tasks that would otherwise require manual effort.

MCP Use Cases

Case 1: Organizing Google Drive Files via MCP -- Document Search and Summarization

Tell the LLM the task in natural language:

Find all documents related to "2024 Annual Budget" in Google Drive and compile them into a summary report.

The LLM will automatically determine which MCP tools to invoke based on your needs, such as the search_files tool.

MCP Workflow:

Actions performed by the AI:

  1. Search for documents containing the keyword "2024 Annual Budget"

  2. Read the contents of the 5 documents found

  3. Analyze key points from each document

  4. Generate a consolidated summary report

  5. Provide budget analysis recommendations

Result delivered to the user:


Case 2: Connecting Google Sheets and Slack via MCP -- Scheduled Weekly Report Generation Sent to a Channel

The LLM can connect multiple external service tools via MCP, as shown in the workflow below:

A scheduling service triggers the LLM weekly to perform the same query task:

The LLM will automatically determine which MCP tools to invoke based on your needs, such as the search_sheet and query_sheet tools.

The AI assistant's weekly processing workflow:

  1. Search for the "Sales Data" spreadsheet

  2. Read the spreadsheet values

  3. Generate a consolidated summary report based on requirements, such as average revenue, year-over-year growth, etc.

  4. Automatically send the compiled results to a Slack channel


Core Value of MCP

LLM Provides Intelligence

  • Natural language understanding

  • Reasoning and decision-making

  • Knowledge synthesis

  • Creative generation

  • Anomaly detection

  • Predictive analysis

MCP Provides Capabilities

  • Connect to various tools

  • Execute real actions

  • Cross-system integration

  • Secure and reliable

  • Standardized communication

By combining LLM and tools, LLMs evolve from "just talking" to "getting things done", becoming all-around work partners that can understand, think, and execute.


MaiAgent MCP Integration Advantages

Support for Multiple Network Protocols

MaiAgent MCP supports a variety of network protocols, ensuring efficient and stable communication across different application scenarios. Through a flexible protocol selection mechanism, the system can automatically choose the most suitable transport method based on actual needs, providing enterprises with the best integration experience.

Protocol
Communication Direction
Connection Type
Supported by MaiAgent

Standard HTTP/HTTPS

Bidirectional (Request/Response)

Short-lived

Streamable HTTP

Bidirectional

Short or Long-lived

WebSocket (WS/WSS)

Bidirectional Streaming

Persistent

SSE

Unidirectional Streaming (Server→Client)

Long-lived

Unix Domain Socket

Bidirectional

Persistent (Local)

Named Pipe

Bidirectional

Persistent (Local)

Stdio

Bidirectional

Persistent (Process Lifetime)

Rapid Integration via Graphical Interface

MaiAgent provides an intuitive graphical interface that lets you quickly integrate MCP tools without writing code. The interface provides fields for environment variables and parameters -- you can directly enter the settings you need, and the system will automatically read and apply them to the MCP tool.

For instructions on creating MCP tools, see: User Guide -- Creating MCP Tools

With the services provided by MaiAgent above, you can freely choose the protocols your enterprise needs and quickly integrate them into the MaiAgent system. Through MaiAgent's comprehensive platform services, you can build your own intelligent AI assistant.

Last updated

Was this helpful?