# Ollama MCP Bridge

An API layer in front of the Ollama API that adds tools from multiple Model Context Protocol servers so every Ollama chat request can call them, while every other Ollama endpoint is proxied through unchanged.

Ollama MCP Bridge sits in front of the Ollama API and adds tool-calling support drawn from any number of Model Context Protocol (MCP) servers, connected at startup from a JSON configuration file. Each server can be reached over stdio, HTTP (Streamable HTTP) or the older SSE transport, and tools from each server can be included or excluded individually for finer control.

The chat endpoint automatically loops through multiple rounds of tool calls until a request is complete, up to a configurable limit, and streams responses incrementally, including intermediate thinking output from Ollama or from MCP tools. Configuration strings support variable expansion, so environment variables and workspace paths can be referenced directly in the server configuration.

It is a FastAPI application in Python, installable from PyPI or run with Docker or Docker Compose, and works with both local and cloud Ollama models, including custom upstream headers such as an API key on every proxied request.

Website: https://jonigl.github.io/ollama-mcp-bridge/
