ollama-mcp-bridge
by jonigl
Overview
Provides an API layer in front of the Ollama API, seamlessly adding tools from multiple MCP servers so every Ollama request can access all connected tools transparently.
Installation
docker-compose upEnvironment Variables
- OLLAMA_URL
- CORS_ORIGINS
- MAX_TOOL_ROUNDS
- OLLAMA_PROXY_TIMEOUT
- SYSTEM_PROMPT
- MCP_REQUEST_TAG
Security Notes
The bridge allows configuration of Model Context Protocol (MCP) servers via a `mcp-config.json` file. When configuring `stdio` transport, the `command` and `args` fields in this file are executed as shell commands on the host machine. If `mcp-config.json` is not trusted or can be manipulated by an attacker, this can lead to arbitrary code execution, which is a critical security risk. Environment variables, either directly retrieved via `os.getenv` or expanded from `${env:VAR_NAME}` within the configuration, can influence server behavior including commands executed or URLs accessed, posing an injection risk if untrusted. The default `CORS_ORIGINS` is `*`, which allows all origins and is not recommended for production environments.
Similar Servers
fastapi_mcp
Automatically converts FastAPI endpoints into Model Context Protocol (MCP) tools for seamless integration with LLM agents.
mcpo
Exposes Model Context Protocol (MCP) tools as OpenAPI-compatible HTTP servers.
mcp-context-forge
Converts web content (HTML, PDF, DOCX, etc.) and local files from a URL into high-quality Markdown format. It supports multiple conversion engines, content optimization, batch processing, and image handling.
mcp-client-for-ollama
An interactive terminal client for connecting local Ollama LLMs to Model Context Protocol (MCP) servers, enabling advanced tool use and workflow automation for local LLMs.