OLLAMA-OMEGA
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**MCP server — Ollama bridge for any IDE. Sovereign compute. No cloud dependency.**
---
Ecosystem Canon
Ollama-Omega is the compute interface layer of the VERITAS & Sovereign Ecosystem (Omega Universe). It surfaces every locally installed Ollama model — and any cloud-hosted model accessible through an Ollama daemon — as a structured MCP tool set inside any MCP-compatible IDE or agent runtime.
Within the Omega Universe, governance flows downward from omega-brain-mcp (the VERITAS gate and approval pipeline) to Ollama-Omega (the inference transport). Ollama-Omega is the final execution node: it issues the prompt, receives model output, and returns a validated, schema-typed response. No inference executes before the upstream gate approves the request.
Ollama-Omega does not perform memory, authentication, persistence, or policy enforcement. Those responsibilities belong to the operators above it in the stack. This node does one thing: connect IDE to Ollama, reliably and without information loss.
---
Overview
**What it is:**
- A single-file MCP server (ollama_mcp_server.py) that bridges Ollama into any MCP-compatible client
- Six validated tools covering health, model listing, chat, generation, model inspection, and model pull
- Compatible with Claude Desktop, VS Code + Continue, Cursor, Antigravity IDE, and any other client that speaks MCP over stdio
**What it is not:**
- A full AI platform, memory layer, or policy engine
- A replacement for the Ollama daemon — it wraps the daemon's HTTP API over MCP stdio transport
- A cloud service — all inference is local or routed through your own Ollama daemon
---
Features
| Feature | Detail |
|---------|--------|
| 6 MCP tools | Health check, list models, chat, generate, show model info, pull model |
| Stdio transport | JSON-RPC 2.0 over stdin/stdout — no network ports opened by this server |
| Typed output schemas | Every tool carries a full outputSchema for structured agent consumption |
| SSRF mitigation | follow_redirects=False on the singleton httpx client |
| Input validation | _validate_required() gate before any HTTP call; no uncaught KeyError |
| Safe JSON handling | _safe_json() wrapper — no crash on malformed Ollama responses |
| Error sanitization | _error() helper — no stack traces, no internals exposed to the client |
| Cloud model support | Any model accessible on your Ollama daemon is available — no config change required |
| Docker-ready | Dockerfile included for containerized deployment |
---
Architecture
The server process lives for the lifetime of the IDE session. One httpx AsyncClient handles all upstream Ollama HTTP traffic. The MCP client never communicates with Ollama directly.
---
Quickstart
Prerequisites
- **Python 3.11 or later**
- **Ollama daemon installed and running**
Install Ollama
| Platform | Method |
|----------|--------|
| **Windows** | Download the installer from ollama.com/download/windows and run it. Ollama starts automatically as a system tray service. |
| **macOS** | Download from ollama.com/download/mac, or via Homebrew: brew install ollama && ollama serve |
| **Linux** | curl -fsSL https://ollama.com/install.sh \| sh — starts the daemon via systemd on supported distributions |
Verify the daemon is reachable before proceeding:
---
Install Ollama-Omega
**Option A — pip (simplest):**
Then download the server file:
**Option B — clone the repository (recommended for local development):**
**Option C — uv (virtual-env isolation, recommended for production):**
**Option D — Docker:**
---
Pull a model
---
Configure your MCP client
Edit the configuration file for your IDE and add the ollama server block. Replace /path/to/Ollama-Omega with the actual path to your clone (or the directory containing ollama_mcp_server.py).