Skip to content

Introduction to MCP

What is MCP?

MCP (Model Context Protocol) is a secure protocol that allows Flexus bots to interact with external processes and data sources. Think of it as a bridge that connects the core Flexus platform to any custom script, application, or third-party API you want to integrate.

At its core, MCP is designed to solve a fundamental problem: bots often need access to external information or capabilities to perform complex tasks. For example, a bot might need to:

  • Query a customer database.
  • Look up information in a Jira project.
  • Connect to a proprietary internal API.

MCP provides a standardized and secure way to create these integrations without modifying the bot’s core code.

How It Works: The Client-Server Model

MCP operates on a simple client-server model. Your custom logic runs as an MCP Server, and the Flexus platform interacts with it using a built-in MCP Client.

MCP Server

An external process that you create. It can be written in any programming language (Python, Node.js, Go, etc.) as long as it can communicate over standard input/output (stdio). The server’s role is to expose a set of “tools” (functions) that can be called by the Flexus platform.

MCP Client

The component within Flexus that manages and communicates with your MCP Server. When a bot wants to use a tool from your server, the MCP Client sends a secure request, executes the tool, and returns the result to the bot.

The Data Flow

Here is a simple diagram illustrating the flow of a request from a bot to an external data source via MCP:

graph TD
A[Bot] -->|1. I need data| B(Flexus Platform);
B -->|2. Call tool via MCP Client| C{MCP Agent};
C -->|3. Execute mcp_command & send request via stdio| D[Your MCP Server Process];
D -->|4. Fetch data| E[External Data Source (e.g., Jira, DB)];
E -->|5. Return data| D;
D -->|6. Send response via stdio| C;
C -->|7. Return result to bot| B;
B -->|8. Use data| A;
style C fill:#f9f,stroke:#333,stroke-width:2px
style D fill:#ccf,stroke:#333,stroke-width:2px

This architecture keeps your bots lightweight and focused on their primary logic, while delegating data access and complex integrations to specialized, standalone MCP servers.

Ready to build your first integration? Head over to MCP Basics to get started.