TL;DR
MCP servers join LLMs to exterior instruments and information sources by way of a standardized protocol. Public MCP servers present capabilities similar to net search, GitHub entry, database queries, and browser automation by way of structured device definitions.
These servers sometimes run as long-lived stdio processes that reply to device invocation requests. To make use of them reliably in functions or share them throughout groups, they must be deployed as steady, accessible endpoints.
Clarifai permits MCP servers to be deployed as managed endpoints. The platform runs the configured MCP course of, handles lifecycle administration, discovers out there instruments, and exposes them by way of its API.
This tutorial walks you thru the right way to deploy any public MCP server. We would be utilizing the DuckDuckGo browser server as a reference implementation. The identical method applies to different stdio-based MCP servers, together with GitHub, Slack, and filesystem integrations.
DuckDuckGo Browser MCP Server
The DuckDuckGo browser MCP server is an open-source MCP implementation that exposes net search capabilities as callable instruments. It permits language fashions to carry out search queries and retrieve structured outcomes by way of the MCP protocol.
The server runs as a stdio-based course of and offers instruments similar to ddg_search for executing net searches. When invoked, the device returns structured search outcomes that LLMs can use to reply questions or full duties that require present net data.
We use this server because the reference implementation as a result of it doesn’t require further secrets and techniques or exterior configuration. The one requirement is defining the MCP command in config.yaml, which makes it simple for us to deploy and take a look at on Clarifai.
If you would like to construct a customized MCP server from scratch with your personal instruments and logic, this information walks by way of that course of utilizing FastMCP.
Now that now we have outlined the reference server, let’s begin.
Set Up the Surroundings
Set up the Clarifai Python SDK:
Set your Clarifai Private Entry Token as an setting variable. Retrieve your PAT from the safety settings in your Clarifai account.
Clone the runners-examples repository and navigate to the browser MCP server listing:
The listing accommodates the deployment information:
- config.yaml: Deployment configuration and MCP server specification
- 1/mannequin.py: Mannequin class implementation
- necessities.txt: Python dependencies
Configure the Deployment
Earlier than importing, replace config.yaml together with your Clarifai mannequin identifiers and compute settings. This file defines the mannequin metadata, MCP server startup command, and useful resource necessities. Clarifai makes use of it to begin the MCP server, allocate compute, and expose the server’s instruments by way of the mannequin endpoint.
The mcp_server part defines how the MCP server course of is began. command specifies the executable, and args lists the arguments handed to that executable. On this instance, uvx duckduckgo-mcp-server begins the DuckDuckGo MCP server as a stdio-based course of.
The mannequin implementation in 1/mannequin.py inherits from StdioMCPModelClass:
StdioMCPModelClass begins the method outlined in config.yaml, discovers the out there instruments by way of the MCP protocol, and exposes these instruments by way of the deployed mannequin endpoint. No further implementation is required past inheriting from StdioMCPModelClass.
The DuckDuckGo MCP server runs on CPU and requires minimal assets.
Add & Deploy MCP Server
Add the MCP server utilizing the Clarifai CLI:
The –skip_dockerfile flag is required when importing MCP servers. This command packages the mannequin listing and uploads it to your Clarifai account.
After importing your MCP server, deploy it on compute so it could possibly run and serve device requests.
Go to the Compute part and create a brand new cluster. You will notice an inventory of obtainable cases throughout totally different suppliers and areas, together with their {hardware} specs.
Every occasion reveals:
- Supplier
- Area
- Occasion kind
- GPU and GPU reminiscence
- CPU and system reminiscence
- Hourly worth

Choose an occasion based mostly on the useful resource necessities you outlined in your config.yaml file. For instance, in case you specified sure CPU and reminiscence limits, select an occasion that satisfies or exceeds these values. Most MCP servers run as light-weight stdio processes, so GPU is often not required until your server explicitly will depend on it.
After deciding on the occasion, configure the node pool. You’ll be able to set autoscaling parameters similar to minimal and most replicas based mostly in your anticipated workload.
Lastly, create the cluster and node pool, then deploy your MCP server to the chosen compute. Clarifai will begin the server utilizing the command outlined in your config.yaml and expose its instruments by way of the deployed mannequin endpoint.
You’ll be able to comply with the information to discover ways to create your devoted compute setting and deploy your MCP server to the platform.
Utilizing the Deployed MCP Server
As soon as deployed, we will work together with the MCP server utilizing the FastMCP consumer. The consumer connects to the Clarifai endpoint and discovers the out there instruments.
Change the URL together with your deployed MCP server endpoint.
This consumer establishes an HTTP connection to the deployed MCP endpoint and retrieves the device definitions uncovered by the DuckDuckGo server. The list_tools() name confirms that the server is operating and that its instruments can be found for invocation.
Combine with LLMs
The instruments uncovered by your deployed MCP server can be utilized with any LLM that helps perform calling. Configure your MCP consumer and OpenAI-compatible consumer to hook up with your Clarifai MCP endpoint so the mannequin can uncover and invoke the out there instruments.
Â
Your MCP server is now deployed as an API endpoint on Clarifai, and its instruments may be accessed and invoked from any suitable LLM by way of the MCP consumer.
Continuously Requested Questions (FAQs)
-
Can I deploy any MCP server utilizing this technique?
Sure. So long as the MCP server runs as a stdio-based course of, it may be outlined within the mcp_server part of config.yaml. Replace the command and arguments, add the mannequin, and the server shall be uncovered by way of its personal endpoint.
-
Do MCP servers require Docker to deploy?
No. When importing MCP servers utilizing the Clarifai CLI, the –skip_dockerfile flag permits the deployment with out requiring a customized Dockerfile.
-
Can I exploit deployed MCP servers with any LLM?
Sure. Any LLM that helps perform calling or device calling can use the instruments uncovered by a deployed MCP server. The instruments have to be formatted in line with the mannequin’s perform calling schema.
-
Do MCP servers require API keys?
It will depend on the server implementation. Some public MCP servers, such because the DuckDuckGo instance used on this information, don’t require further secrets and techniques. Others might require API credentials outlined in setting variables or configuration.
Closing Ideas
We transformed a stdio based mostly MCP server right into a publicly accessible API endpoint on Clarifai. Its instruments can now be found and invoked by any LLM that helps perform calling.
This method helps you to transfer MCP servers from native growth into steady, shareable infrastructure with out altering their core implementation. If a server runs over stdio, it may be packaged, deployed, and uncovered by way of Clarifai.
Now you can deploy your personal MCP servers, join them to your fashions, and prolong your LLM functions with customized instruments or exterior integrations. For extra examples, discover the runners-examples repository.
