Refact.ai Agent achieved a 93.3% score on Aider's Polyglot Benchmark Read More
Get Started

How to create an MCP Server: Using Refact.ai Agent to build a MinIO Server

April 14, 2025
by Nikita Makarov
4 min read

This is a Guest post by Nikita Makarov.
Author: Nikita Makarov — Principal Software Engineer @UCE Systems. Passionate about building AI- and data-driven products. Creator of PermitZen, an AI-powered permit research assistant that helps homeowners navigate building regulations.
Follow his blog for more tech insights and real-world AI development use cases.

Here is how you can create your own open-source MCP server using the open-source Refact.ai Agent. Follow these steps to do it for your personal needs. My fully implemented version is available here.

Building your own AI workflow will always require some resilient and secure place to store:

MinIO can be your way forward since it is an open-source, cloud and on-premise solution. You can easily deploy it on your machine, server or in the cloud.

Tools used

Goal

Usage of MinIO in AI pipelines often requires developing custom code interfaces and wrappers to properly integrate it with other components of your AI workflow.

Model Context Protocol (MCP) Server simplifies this by enabling AI agents to interact with data storage directly via prompts. With MCP, AI models can access your data storage without requiring complex custom integrations.

The goal was to implement a MinIO MCP server so I can use it for AI Agents implementation, providing a seamless connection between my AI tools and data storage.

Tips for working with AI coding agents

I went ahead with Refact.ai Agent since it can reduce the time not only for implementation, but also testing — you can integrate your new MCP directly in Refact.ai.

If you are new to AI coding agents and worry about quality, here are some tricks. Imagine you are working with a Junior/Middle Software engineer who can code, but needs supervision. Here are the tips you need to understand:

Having this in mind, as with any other software development task you need to:

Creating an MCP Server: Steps and results

Refact.ai created an MCP server in 3 attempts, meaning one attempt is a single chat request to describe what I need.

Attempt 1. One-shot. Failed.

In this attempt I described to use official MCP documentation, but it was too vague:

My goal is to generate a model-context protocol (MCP) for minio. Generate me all needed files for minio-mcp. use as a reference: https://modelcontextprotocol.io/introduction

Attempt 2. Few-shots. Failed.

This was a little closer. I provided more references, but didn’t provide enough expectations. The code was created and probably working, but a brief review showed that it wasn’t implemented in the way I needed:

My goal is to generate a model-context protocol (MCP) for minio. Generate me all needed files for minio-mcp. use as a reference https://github.com/aws-samples/sample-mcp-server-s3 reference mcp server and client. go to inner folders and use all files under make sure to use latest minio python client https://github.com/minio/minio-py

Attempt 3. Few-shots + constraints + clear expectations. Success.

This attempt produced working code with minimal changes needed:

My goal is to generate a model-context protocol (MCP) for minio.
Generate me all needed files for minio-mcp.

  1. use as a reference https://github.com/aws-samples/sample-mcp-server-s3 reference mcp server and client.
  2. go to inner folders and use all files under these folders: https://github.com/aws-samples/sample-mcp-server-s3/tree/main/src/s3_mcp_server
  3. use server reference: https://github.com/aws-samples/sample-mcp-server-s3/blob/main/src/s3_mcp_server/server.py
  4. use client reference: https://github.com/aws-samples/sample-mcp-server-s3/blob/main/src/client.py
  5. make sure to use latest minio python client https://github.com/minio/minio-py
  6. generate all files in the same way as it is in reference repository, also generate project toml, env.example, requirements.txt, etc
  7. apply all changes once completed

The key difference was providing specific file paths from the reference repository and clear, numbered steps for the AI to follow.

Code review, integration into the MCP client, and testing still took some time, but the implementation time was reduced by 90%. Code was generated within minutes, and it was functional.

Testing and results

I used 4 MCP clients to test that the MinIO MCP server was working:

I will skip the MCP client configuration details. These are well described in:

Visual Proof: Working implementations

Claude Desktop with configured MCP server Claude Desktop with configured MCP server

Refact.ai with working MinIO MCP server: Refact.ai with working MinIO MCP server

Lessons learned and conclusion

Next steps

If you’re interested in implementing your own MinIO MCP server:

The combination of open-source storage and AI tools opens up powerful possibilities for creating secure, flexible AI workflows with complete data sovereignty.

Author: Nikita Makarov