by jonigl
Extend the Ollama API with dynamic AI tool integration from multiple MCP (Model Context Protocol) servers. Fully compatible, transparent, and developer-friendly, ideal for building powerful local LLM applications, AI agents, and custom chatbots
# Add to your Claude Code skills
git clone https://github.com/jonigl/ollama-mcp-bridgeGuides for using ai agents skills like ollama-mcp-bridge.
ollama-mcp-bridge is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by jonigl. Extend the Ollama API with dynamic AI tool integration from multiple MCP (Model Context Protocol) servers. Fully compatible, transparent, and developer-friendly, ideal for building powerful local LLM applications, AI agents, and custom chatbots. It has 108 GitHub stars.
ollama-mcp-bridge's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/jonigl/ollama-mcp-bridge" and add it to your Claude Code skills directory (see the Installation section above).
ollama-mcp-bridge is primarily written in Python. It is open-source under jonigl on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ollama-mcp-bridge against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
π Full documentation: https://jonigl.github.io/ollama-mcp-bridge/
Installation, configuration reference, architecture notes and a code reference, all searchable.
${env:VAR_NAME} and ${workspaceFolder} in config strings/api/chat adds tools while all other Ollama API endpoints are transparently proxiedlinux/amd64 and linux/arm64 images published to GitHub Container Registry on every releaseYou can install ollama-mcp-bridge in several ways, depending on your preference:
Install instantly with uvx:
uvx ollama-mcp-bridge
pip install --upgrade ollama-mcp-bridge
docker compose up
This uses the included docker-compose.yml file which:
host.docker.internal:11434)8000 on the hostCORS_ORIGINS environment variable)OLLAMA_PROXY_TIMEOUT[!TIP] To skip the local build and use the pre-built image from GitHub Container Registry instead, replace the
build:block indocker-compose.ymlwith:image: ghcr.io/jonigl/ollama-mcp-bridge:latest
[!NOTE] β¨ NEW: Pre-built multi-arch Docker images (
linux/amd64andlinux/arm64) are now published automatically to the GitHub Container Registry on every release. No local build required!
Pre-built multi-arch images (linux/amd64 and linux/arm64) are published to the GitHub Container Registry on every release. Available tags:
latest β most recent stable releasevX.Y.Z β specific version (e.g. v0.10.0)sha-<commit> β exact commit SHA builddocker run -p 8000:8000 \
-e OLLAMA_URL=http://host.docker.internal:11434 \
-v "$PWD/mcp-config.json:/mcp-config.json" \
-v "$PWD/mock-weather-mcp-server:/mock-weather-mcp-server" \
-w / \
ghcr.io/jonigl/ollama-mcp-bridge:latest
Key flags:
-p 8000:8000 β exposes the bridge on your host at port 8000-e OLLAMA_URL=http://host.docker.internal:11434 β routes Ollama traffic to the host machine (required on macOS and Windows; on Linux use --network host or the host's IP instead)-v "$PWD/mcp-config.json:/mcp-config.json" β mounts your local config into the container-v "$PWD/mock-weather-mcp-server:/mock-weather-mcp-server" β mounts the mock MCP server without :ro so uv can create its .venv inside the directory-w / β sets the working directory to / so relative paths in mcp-config.json resolve correctly[!NOTE] On Linux,
host.docker.internalmay not resolve automatically. Use--network hostand keepOLLAMA_URL=http://localhost:11434, or replace it with your host's LAN IP.
# Clone the repository
git clone https://github.com/jonigl/ollama-mcp-bridge.git
cd ollama-mcp-bridge
# Start Ollama (if not already running)
ollama serve
# Run the bridge
uv run ollama-mcp-bridge
If you want to install the project in editable mode (for development):
# Install the project in editable mode
uv tool install --editable .
# Run it like this:
ollama-mcp-bridge
/api/chat endpoint only): When a chat completion request is received on /api/chat:
/api/chat, /health, and /version) are fully proxied to the underlying Ollama server with no modification.You can configure MCP servers in three ways:
{"command": "...", "args": [...], "env": {...}}{"url": "https://..."} - Uses StreamableHTTP by default{"url": "https://.../sse"} - If the URL ends with /sse, the bridge connects via Server-Sent EventsCreate an MCP configuration file at mcp-config.json with your servers:
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"./mock-weather-mcp-server",
"run",
"main.py"
],
"env": {
"MCP_LOG_