gitwtfhub

wtf is ollama-mcp-host?

chrisryugj/ollama-mcp-host — explained in plain English

Analysis updated 2026-05-18

22TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TL;DR

A local bridge that lets an Ollama AI model call MCP tool servers, so it can search real data and take actions entirely offline.

Mindmap

mindmap
  root((ollama-mcp-host))
    What it does
      Bridges Ollama and MCP
      Auto tool selection
      Local chat interface
    Tech stack
      TypeScript
      Node.js
      Ollama
      MCP SDK
    Use cases
      Offline AI assistant
      Law search tool
      Document generation
    Audience
      Developers
      Air gapped teams
    Setup
      Node 20 required
      Config JSON file
      Build MCP servers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Give a local Ollama model the ability to call MCP tools without sending any data to the cloud.

REASON 2

Run an air-gapped assistant that searches law databases or generates office documents.

REASON 3

Connect any stdio-based MCP server to a single Ollama chat session for tool use.

What's in the stack?

TypeScriptNode.jsOllamaMCP

How it stacks up

chrisryugj/ollama-mcp-host1304674612/agentbenchaerdelan/housand-domaintoolmatrix
Stars222222
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 1h+

Needs Node.js 20+, a locally running Ollama model, and one or more MCP servers built and configured.

The README links a license file but does not state its terms.

Wtf does this do

ollama-mcp-host solves a specific connection problem. A local AI model running through Ollama, such as Google's gemma, is capable but cannot look things up or touch files on its own. To give it that ability, you connect it to tools using MCP, or Model Context Protocol, an open standard for AI tools. The trouble is that Ollama and MCP servers were not built to talk to each other directly. This project is the translator that sits in between: you register one or more MCP servers with it, and a single Ollama model can automatically pick the right tool, call it, and answer using the real result it gets back. Everything runs locally or inside a private network, with no cloud service and no API key needed for the AI model itself, which makes it useful for offline or air-gapped environments where internet access is restricted. The README demonstrates this using two example Korean government tools, one for searching Korean law and one for generating Korean office documents, but says any standard MCP server that communicates over stdio will work the same way. A notable detail is that gemma models have a thinking mode that can cause them to reason internally and then forget to actually issue the tool call, which is a common source of confusion. This host works around that by always telling Ollama to turn thinking off, so tool calls fire reliably. Setting it up involves installing Node.js version 20 or newer, installing Ollama and pulling a tool-capable model like gemma4, cloning and building the MCP servers you want to use, installing this host through npm, and writing a small JSON configuration file that lists the model, the Ollama address, and the paths to each MCP server. Once configured, you run the host from the command line and get an interactive chat where you can type questions, use a tools command to list available tools, and watch the model call tools and answer using their real output. The project has only one runtime dependency, the official MCP SDK, and connects to Ollama using Node's built-in networking, keeping its footprint small. It works both as a command line tool and as a library you can import into your own code.

Yoink these prompts

Prompt 1
Walk me through installing Ollama and pulling a tool-capable model for ollama-mcp-host.
Prompt 2
Help me write an mcp.config.json file that registers two MCP servers with this host.
Prompt 3
Explain why gemma models fail to call tools and how ollama-mcp-host fixes it.
Prompt 4
Show me how to run ollama-mcp-host fully offline inside a private network.

Frequently asked questions

wtf is ollama-mcp-host?

A local bridge that lets an Ollama AI model call MCP tool servers, so it can search real data and take actions entirely offline.

What language is ollama-mcp-host written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Ollama.

What license does ollama-mcp-host use?

The README links a license file but does not state its terms.

How hard is ollama-mcp-host to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is ollama-mcp-host for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.