Skip to content

Introduction to MCP servers

AI Refinery now supports the use of the Model Context Protocol (MCP) to extend the capabilities of the provided agents and models. The MCP protocol is an open standard that allows AI models to access and use data from various sources like databases, APIs, and files, without needing custom code for each integration.

Hosting of MCP Servers

MCP servers can be hosted in various environments, ranging from local machines to cloud platforms. The hosting environment dictates the infrastructure requirements and accessibility.

Hosting Environments:

  • Local Machine: Suitable for development, testing, and small-scale deployments. Requires minimal setup but limits accessibility.
  • Cloud Platforms (e.g., AWS, Google Cloud, Azure): Provide scalability, reliability, and accessibility. Requires cloud account setup and resource provisioning.
  • Containerized Environments (e.g., Docker, Kubernetes): Enables consistent deployments across different environments and simplifies scaling.

Exposure of MCP Servers

Exposure Methods:

MCP servers typically expose their functionality through a network endpoint. Common exposure methods include:

  • STDIO: Local exposure for initial development and debugging.
  • HTTP/HTTPS: The most common method, allowing clients to interact with the server using standard HTTP requests.
  • Server-Sent Events (SSE): Allows the server to push updates to clients in real-time. Useful for applications requiring continuous data streams. MCP servers can use SSE to provide real-time data updates to connected agents.
  • WebSockets: Enables bidirectional communication between the server and clients, suitable for interactive applications.

Exposure Compatibility:

Given its easy setup, versatile functionality, and allowing for both local and public exposure of the servers, the MCPClientAgent is compatible with SSE-exposed servers. However, servers that natively support the STDIO protocol can be made compatible using tools such as mcp-proxy that create a proxy SSE transport and mirror the default STDIO transport of the server.