Setting up an MCP Host on SUSE Linux Enterprise Server #
- WHAT?
The MCP host (mcphost) is a command-line interface that implements the Model Context Protocol, enabling large language models (LLMs) to communicate with specialized tools and system services via MCP servers.
- WHY?
Use the MCP host to enable LLMs to safely interact with system services, execute commands and manage files through a structured environment.
- EFFORT
It takes 15 minutes of reading time.
- GOAL
By the end of this article, you will have an installed instance of the MCP host configured to mediate between an LLM and specific system tools.
- REQUIREMENTS
An installed and properly registered instance of SLES 16.0
Access to SUSE Customer Center (SCC) for update channels
Network access to the Internet and your chosen LLM provider
A supported LLM backend
1 What is the MCP host? #
The MCP Host is a command-line tool designed to act as a central mediator between a Large Language Model (LLM) and various specialized tools known as MCP servers.
Its primary purpose is to provide a structured environment where an LLM can safely access system information, execute commands, or manage files to perform complex tasks that the model cannot do on its own.
1.1 How does the MCP host work? #
On the one hand, it interacts with LLMs by establishing a connection to a provider; on the other hand, it manages MCP Servers, which are the actual providers of "tools" or "capabilities."
2 MCP host installation #
The MCP host is not installed on SUSE Linux Enterprise Server by default. To use it, install the mcphost package.
To install the package, run the command:
sudo zypper in mcphost3 MCP host configuration #
MCP Host behavior is defined using JSON configuration files. While such configuration is optional, defining configuration files has the following benefits:
Performance optimization: Even large LLMs have limited context windows. Minimizing the number of exposed tools helps achieve faster and more accurate results.
Better security: Configurations allow for "minimal exposure" by restricting the LLM’s access to only the specific directories and tools required.
Behavior standardization: You can predefine "system prompts" to enforce specific response formats.
Operations simplification: Storing technical details like provider URLs and model names eliminates repetitive manual input.
3.1 Structure of configuration files #
A standard configuration file typically contains:
systemPrompt: Defines the core instructions, behavioral rules and persona of the AI assistant for a specific session.model: Specifies the identifier of the target LLM.provider-url: Specifies the URL of the target LLM. When running the model locally, use the formathttp:localhost:<port_number>. The listening port number depends on your LLM provider.mcpServers: Defines the tools that the host can access (for example, file system, monitoring or systemd tools). A single configuration file can include multiple MCP servers.
{
"system-prompt": "You are a System Security Auditor for SLES 16.0. Your goal is to analyze system health and security logs. You may read configurations and run diagnostic commands, but you must never attempt to modify the system state.",
"model": "ollama:gpt-oss:20b",
"provider-url": "http://localhost:11434/",
"mcpServers": {
"read_only_configs": {
"type": "builtin",
"name": "fs",
"options": {
"allowed_directories": [ "/etc", "/var/log" ]
},
"allowedTools": [ "read_file", "list_directory" ]
},
"diagnostics": {
"type": "builtin",
"name": "bash"
}
}
}
{
"system-prompt": "You are a System Security Auditor for SLES 16.0. Your goal is to analyze system health and security logs. You may read configurations and run diagnostic commands, but you must never attempt to modify the system state.",
"model": "ollama:gpt-oss:20b",
"provider-url": "http://localhost:11434/",
"mcpServers": {
"read_only_configs": {
"type": "builtin",
"name": "fs",
"options": {
"allowed_directories": [ "/etc", "/var/log" ]
},
"allowedTools": [ "read_file", "list_directory" ]
},
"diagnostics": {
"type": "builtin",
"name": "bash"
}
}
}The example above restricts the LLM to access only /etc` and /var/log, to use only bash tools and read and list operations. The delete and write operations are not available to the LLM. To run the MCP host with such a configuration file, issue the command:
mcphost --config PATH_TO_THE_JSON_CONFIGURAION_FILE4 What’s next? #
After the MCP host server is installed, you can proceed to installing and configuration of MCP servers: