Unify and manage your data

Use a local Ollama model with MCPHost and Reltio MCP Server

Learn how to install MCPHost, configure it to connect to the Reltio MCP Server, and run it with a local Ollama model on Windows, macOS, and Linux.

This topic explains how to set up and run MCPHost with a local Ollama model connected to the Reltio MCP Server. You'll install MCPHost using Go, create a configuration file with your MCP Server details, pull and serve an Ollama model locally, and then run MCPHost so it can interact with the MCP Server through that model. The steps in this procedure are specific to Windows, macOS, and Linux, and they use only commands and parameters provided in the supported setup process.

Prerequisites

Follow these steps to use a local Ollama model with MCPHost and Reltio MCP Server:
  1. Install MCPHost.
    All operating systems:
    go install github.com/mark3labs/mcphost@latest
  2. Create the configuration file.
    File location:
    • macOS/Linux: ~/.mcphost.yaml
    • Windows: %USERPROFILE%\.mcphost.yaml
    Contents:
    mcpServers:
      reltio-mcp-server:
        type: "remote"
        url: "https://<your-tenant-id>.reltio.com/ai/tools/mcp/"
        headers:
          - "Authorization: Bearer <your-token-here>"
  3. Download an Ollama model.
    All operating systems:
    ollama pull llama3.1:8b
    Search Ollama to use a different model.
  4. Start Ollama.
    All operating systems:
    ollama serve
  5. Run MCPHost with Ollama.
    All operating systems:
    mcphost -m ollama:llama3.1:8b
MCPHost is running with your selected local Ollama model and is connected to the Reltio MCP Server using your access token. You can now send requests through MCPHost, and they will be processed by the local model while using the tools and data exposed by the configured MCP Server.

Troubleshooting for the Ollama model setup with MCPHost and Reltio MCP Server

command not found: mcphost / 'mcphost' is not recognized
macOS/Linux:
The installed binary is placed in the Go bin directory, typically $HOME/go/bin. If this directory is not in your shell's PATH, the system will not find the mcphost command. To fix:
export PATH=$PATH:$HOME/go/bin
Add this line permanently to your shell profile file (~/.bash_profile, ~/.zshrc, or ~/.bashrc) to keep it across sessions.

Windows:

The installed binary is placed in C:\Users\<your-username>\go\bin. If this folder is not in your PATH, Windows will not find mcphost. To fix for the current PowerShell session:
$env:Path = "$env:Path;$env:USERPROFILE\go\bin"
To make this permanent, add the folder to your User PATH in System Properties > Environment Variables.
Slowness/unresponsiveness
Select a smaller model and repeat the process. Search on Ollama for available models.
Agent error
error during Chat request:
registry.ollama.ai/library/<model> does not support tools
Select a model that supports tools and repeat the process. Search Ollama for models that are compatible with tool use.