Skip to content

Commit 761ccdf

Browse files
authored
Merge branch 'main' into feat/refactor-and-ollama-cloud-models
2 parents 1e16861 + 1d89ed0 commit 761ccdf

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,15 @@ Create an MCP configuration file at `mcp-config.json` with your servers:
169169
}
170170
```
171171

172-
### CORS Configurationn
172+
> [!WARNING]
173+
> **Docker Command Limitations**: When running in Docker, MCP servers should use commands available in the container:
174+
> -`npx` for Node.js-based MCP servers
175+
> -`uvx` for Python-based MCP servers
176+
> - ✅ Direct executables in the container
177+
> -`docker` commands (unless Docker-in-Docker is configured)
178+
> - ❌ Local file paths from your host machine
179+
180+
### CORS Configuration
173181

174182
Configure Cross-Origin Resource Sharing (CORS) to allow requests from your frontend applications:
175183

@@ -185,6 +193,9 @@ CORS_ORIGINS="http://localhost:3000,http://localhost:8080,https://app.example.co
185193
```
186194

187195
**Environment Variables:**
196+
- `OLLAMA_URL`: URL of the Ollama server (default: `http://localhost:11434`)
197+
- Can be overridden with `--ollama-url` CLI parameter
198+
- Useful for Docker deployments and configuration management
188199
- `CORS_ORIGINS`: Comma-separated list of allowed origins (default: `*`)
189200
- `*` allows all origins (shows warning in logs)
190201
- Specific origins like `http://localhost:3000,https://myapp.com` for production

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ services:
1111
volumes:
1212
- ./mcp-config.json:/root/mcp-config.json
1313
restart: unless-stopped
14-
command: uv run ollama-mcp-bridge --ollama-url=http://host.docker.internal:11434

src/ollama_mcp_bridge/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Simple CLI entry point for MCP Proxy"""
22
import asyncio
3+
import os
34
import typer
45
import uvicorn
56
from loguru import logger
@@ -12,7 +13,7 @@ def cli_app(
1213
config: str = typer.Option("mcp-config.json", "--config", help="Path to MCP config JSON file"),
1314
host: str = typer.Option("0.0.0.0", "--host", help="Host to bind to"),
1415
port: int = typer.Option(8000, "--port", help="Port to bind to"),
15-
ollama_url: str = typer.Option("http://localhost:11434", "--ollama-url", help="Ollama server URL"),
16+
ollama_url: str = typer.Option(os.getenv("OLLAMA_URL", "http://localhost:11434"), "--ollama-url", help="Ollama server URL"),
1617
reload: bool = typer.Option(False, "--reload", help="Enable auto-reload"),
1718
version: bool = typer.Option(False, "--version", help="Show version information, check for updates and exit"),
1819
):

0 commit comments

Comments
 (0)