Machine Learning

Creating and submitting the MCP server from scratch

Introduction

On September 2025, I participated in Hackathon in a miscarriage of Paris. All groups were required to create a MCP server and to join them to fine.

Although my group was not overcome anything, it was a good experience! In addition, I have never created a MCP server before, so it allowed me to find a positive experience with new technology.

As a result, we created Prédiif – The MCP server allows for training and testing machine directory models directly into conversation and oppose the database, effects and models in various conversations.

PRédictif Logo

Since I was given to you really love the event, I decided to act and write this article to provide some developers to provide a MCP developer and provide a guide for creating the MCP server from the beginning.

If you want to know, Hakathoni solutions from all groups are here.

MCP

Agents of AI and MCP servers have new technology currently looking for the machine study.

MCP represents “Movel Protector model” And at the beginning was developed by 2024 with anthropic and open. The motivation for making MCP was the fact that different llm merchants (Opelai, Google, Mistrah, Mistrah) provided by various APIs for external tools (connectors) of their own.

As a result, if an engineer generated the door connector, then they will have to make another meeting if they want to install it to connect. This method did not allow easy re-use of connectors. This is where the MCP went in.

With MCP, enhancements can create a tool and reuse it in all MCP compatible llms. It leads to the simple transit on the developers as they no longer need to do more things. It is the same as many llms.

Two diagrams indicate travel work in the past, where there is no MCP (left), and after the introduction of MCP (right). As we can see, the MCP includes the process of integration; Therefore, the same tool can be connected to the Agnostical to the many merchants without additional steps.

For details, the use of MCP JSON-RPCProtocol.

Illustration

Step 1

We will build a very simple MCP server that will have only one tool, their purpose will be to greet the user. In that case, we will use FastMCP – Library that allows us to be built up to the MCP servers in the Pythonic servers.
First, we need to support the environment:

uv init hello-mcp
cd hello-mcp

Add FastMCP reliance (this will update PyProject.Toml File):

uv add fastmcp

Create a front file.py and put the following code there:

from mcp.server.fastmcp import FastMCP
from pydantic import Field

mcp = FastMCP(
    name="Hello MCP Server",
    host="0.0.0.0",
    port=3000,
    stateless_http=True,
    debug=False,
)

@mcp.tool(
    title="Welcome a user",
    description="Return a friendly welcome message for the user.",
)
def welcome(
    name: str = Field(description="Name of the user")
) -> str:
    return f"Welcome {name} from this amazing application!"

if __name__ == "__main__":
    mcp.run(transport="streamable-http")

It's good! The MCP server is perfect and may not even be entered into a specific location:

uv run python main.py

From now on, create a gittib storage and press the direction of the area project.

Step 2

Our MCP server is ready, but not sent. By sending, we will use –Alpic– The platform allows us to send MCP servers by several clicks. In that, create an account and log in to the alpic.

In the menu, select an option to create a new project. The alpic suggests importing existing residence. When you connect your GitHub account to the Alpic, you should be able to see the list of available reposingories can be used to shipment. Select one that matches the MCP server and click “Import”.

In the next window, the alpic lifts several options to stop the environment. Support, you can leave these options automatically and click “Move”.

Then, the alpic will create a docker container with the last place imported. According to difficulty, shipment may take time. If all is well, you will see “Sent” The situation with a green circle closest to it.

Underneath the label “Domain”There is a JSON-RPC address of the server sent. Copy the case, as we will need to connect to the next step.

Step 3

The MCP server is designed. We now need to coordinate the LLM provider so we can use it in conversations. In our example, we will abuse the truth, but the communication process should be the same with other LLM providers.

In the left menu, select the “Connectors” option, which will open a new window with existing contacts. The connectors enable the llMs to connect to MCP servers. For example, when you enter the Gittub Connector so you do not happen, when the conversation, if needed, will be able to search code to your codes.

For ourselves, we want importing the custom MCP server just created, so we click on the “Add Connector” button.

In the Modal window, Nun “on the connector” and complete the required information as shown on the screen below. For the Connector server, use the HTTPS server address of the MCP server used in step 2.

After the Connector is added, you can see it in the connection menus:

If you click on the MCP connector, in “Jobs” SubWindow, you will see the list of tools used in the MCP server. In our example, only use one tool “Welcome”So the end of the work we see here.

Step 4

Now, Back to the conversation and click “Enable Tools” Button, allows you to specify MCP LLM servers or servers allowed to use.

Click on the checkbox corresponding to our connector.

Now it's time to check the connector. We can request a llm to use the “Welcomo” tool to greet the user. In the wrong conversation, if the llm recognizes that it requires use of an external tool, the Modal window appears, shows the name of the toolbar (“Welcome”) and the issues that will take (Name = “Francisco”).

To verify selection, click “Continue”. In that case, we will find the answer:

So good! Our MCP server works well. Similarly, we can build more complex tools.

Store

In this article, we present the MCP as an efficient way to build connectors with the LLM merchants. Its simple and maturity has made the MCP very popular in these days, allows developers to reduce the time required to use the LLM plugins.

In addition, we examine a simple example that shows how to create a MCP server. In fact, there is no restricting developers in creating additional MCP apps and other performance from the LLM providers.

For example, in the Migral case, MCP servers can use libraries and documents, allowing tools to take as entering not only the publication but also files. These results can be kept in a conversation and persevered in different discussions.

Resources

All photos unless noted in another way is a writer.

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button