Ollama MCP Bridge CLI

A proxy in front of the Ollama API that adds tools from several MCP servers, so any client gets them with no code changes.

  • 107 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The bridge starts the connected MCP servers and runs their calls on behalf of the model, and it is open to any CORS origin by default.
All reasons and checks

jonigl/ollama-mcp-bridge

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/ollama-mcp-bridge

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The bridge starts the connected MCP servers and runs their calls on behalf of the model, and it is open to any CORS origin by default.

This is third-party code. Review the repository files before installing.

What it does

Ollama MCP Bridge is a FastAPI server that sits between a client and Ollama. On startup it reads a JSON configuration, connects every listed MCP server and merges their tools into one list. A request to `/api/chat` goes to Ollama together with that list, and the bridge runs any tool calls itself and feeds the results back to the model until it finishes its answer. All other Ollama endpoints are proxied unchanged, so existing clients keep working. Servers connect over stdio, StreamableHTTP or SSE, and tools of each server can be included or excluded with a filter. The bridge streams responses, caps the number of tool rounds and works with Ollama cloud models.

Who it is for. Developers of local AI apps on Ollama who want to give a model MCP tools without rewriting the client.

Good fit when

  • A chat client already talks to Ollama and needs files and search through MCP servers.
  • Several MCP servers must sit behind one address and extra tools must be filtered out.
  • A local model calls tools in a loop and the number of rounds must be capped.
  • The bridge runs in Docker next to Ollama and is exposed to clients on port 8000.

Not a fit when

  • You need tools outside `/api/chat`: only that route can call MCP.
  • The agent already speaks MCP directly and a middleman adds nothing.
  • You need client authentication: all CORS origins are allowed by default.

Example request

Start the bridge against local Ollama with the configuration from `mcp-config.json` and show which tools it collected.

Limitations

Python 3.10 or newer or Docker is required, along with a running Ollama. MCP tools attach only to the `/api/chat` route and other requests pass straight through. By default the bridge listens on 0.0.0.0 and allows any CORS origin, so outside a local machine it should be closed with network rules. The tool-round limit is unset by default, and a looping model will keep calling tools without stopping until `--max-tool-rounds` is set.

How to disable. Stop the bridge process or container and point clients back to the direct Ollama address. Remove the PyPI package with `pip uninstall ollama-mcp-bridge`.

FAQ

How do I start the bridge?

Run `uvx ollama-mcp-bridge` or `pip install --upgrade ollama-mcp-bridge` and then launch the `ollama-mcp-bridge` command. The default configuration file is named `mcp-config.json`.

Which MCP servers can be connected?

Local processes over stdio, remote endpoints over StreamableHTTP and servers over SSE. Each server can have a tool filter in include or exclude mode.

What does the `/api/chat` route do?

It forwards the request to Ollama with all tools, runs calls through the matching MCP servers and repeats the loop until the model finishes. All other routes are proxied unchanged.

How do I use another Ollama address?

The `--ollama-url` option sets the server address and defaults to `http://localhost:11434`. Headers such as an API key are added through `--upstream-header`.

How do I run the bridge in Docker?

Run `docker compose up`: `docker-compose.yml` builds the bridge, connects to Ollama on the host at `host.docker.internal:11434` and exposes port `8000`.

Discussion

No questions or reviews yet.

CLI tools

A TypeScript terminal bridge: a local Ollama model calls tools across several MCP servers at once (files, email, search) based on the request text

CLIBroad access984Repository stars

A terminal MCP client for local Ollama models: MCP tools, prompts and resources, an agent mode and model switching

CLIExtended access836Repository stars

An Open WebUI proxy that exposes any MCP server as an HTTP API with an OpenAPI schema

CLIBroad access4.4KRepository stars

Ollaya skill and MCP server: an agent puts typed questions to local decision models and gets probabilities with no LLM call

SkillExtended access1.5KRepository stars

A proxy compresses the tool descriptions of a large MCP server so the model spends context only on the calls it needs.

MCP serverExtended access142Repository stars

A bridge from Claude.ai to your own OpenClaw assistant: chat delegates tasks over OAuth 2.1 and HTTPS

MCP serverBroad access188Repository stars

README in short

The repository has a FastAPI bridge, documentation, a Dockerfile and a docker-compose file with a demo weather server. Configuration supports variable expansion with `${env:VAR_NAME}` and `${workspaceFolder}`. The package version is checked at startup.

README badge

Report a problem