Mithril — API — The Beacon Towers




Purpose
🏰
HTTP server exposing Mithril as an Ollama-compatible and OpenAI-compatible endpo
Files
5
LOC
827

Key Concept

External tools (Junie, OpenCode) connect here. They see fellowships as 'models' and talk standard protocols.

Mithril exposes three API protocols simultaneously on the same port:

1. Ollama API (for Junie, OpenCode, Open WebUI)

2. OpenAI API (for LangChain, custom apps)

3. MCP Protocol (for Claude Desktop)

How Clients Connect

Point any Ollama-compatible client to http://localhost:16180. Fellowships appear as selectable "models". The client doesn't know it's talking to an orchestrated team of models.

Download as CSV
Endpoint Protocol Purpose
GET /health Health check + version
GET /api/tags Ollama List models (includes fellowships)
POST /api/chat Ollama Chat with streaming support
POST /api/generate Ollama Text generation
GET /v1/models OpenAI List models
POST /v1/chat/completions OpenAI Chat completion
POST /mcp MCP JSON-RPC tool calls (24 tools)

FilePurpose
mcp.rs
mod.rs
ollama.rs
openai.rs
server.rs