MCPcopy
hub / github.com/ollama/ollama

github.com/ollama/ollama @v0.31.1 sqlite

repository ↗ · DeepWiki ↗ · release v0.31.1 ↗
10,469 symbols 47,237 edges 820 files 2,917 documented · 28%
README

ollama

Ollama

Start building with open models.

Download

macOS

curl -fsSL https://ollama.com/install.sh | sh

or download manually

Windows

irm https://ollama.com/install.ps1 | iex

or download manually

Linux

curl -fsSL https://ollama.com/install.sh | sh

Manual install instructions

Docker

The official Ollama Docker image ollama/ollama is available on Docker Hub.

Libraries

Community

Get started

ollama

You'll be prompted to run a model or connect Ollama to your existing agents or applications such as Claude Code, OpenClaw, OpenCode , Codex, Copilot, and more.

Coding

To launch a specific integration:

ollama launch claude

Supported integrations include Claude Code, Codex, Copilot CLI, Droid, and OpenCode.

AI assistant

Use OpenClaw to turn Ollama into a personal AI assistant across WhatsApp, Telegram, Slack, Discord, and more:

ollama launch openclaw

Chat with a model

Run and chat with Gemma 4:

ollama run gemma4

See ollama.com/library for the full list.

See the quickstart guide for more details.

REST API

Ollama has a REST API for running and managing models.

curl http://localhost:11434/api/chat -d '{
  "model": "gemma4",
  "messages": [{
    "role": "user",
    "content": "Why is the sky blue?"
  }],
  "stream": false
}'

See the API documentation for all endpoints.

Python

pip install ollama
from ollama import chat

response = chat(model='gemma4', messages=[
  {
    'role': 'user',
    'content': 'Why is the sky blue?',
  },
])
print(response.message.content)

JavaScript

npm i ollama
import ollama from "ollama";

const response = await ollama.chat({
  model: "gemma4",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});
console.log(response.message.content);

Supported backends

  • llama.cpp project founded by Georgi Gerganov.

Documentation

Community Integrations

Want to add your project? Open a pull request.

Chat Interfaces

Web

Desktop

  • Dify.AI - LLM app development platform
  • AnythingLLM - All-in-one AI app for Mac, Windows, and Linux
  • Maid - Cross-platform mobile and desktop client
  • Witsy - AI desktop app for Mac, Windows, and Linux
  • Cherry Studio - Multi-provider desktop client
  • Ollama App - Multi-platform client for desktop and mobile
  • PyGPT - AI desktop assistant for Linux, Windows, and Mac
  • Alpaca - GTK4 client for Linux and macOS
  • SwiftChat - Cross-platform including iOS, Android, and Apple Vision Pro
  • Enchanted - Native macOS and iOS client
  • RWKV-Runner - Multi-model desktop runner
  • Ollama Grid Search - Evaluate and compare models
  • macai - macOS client for Ollama and ChatGPT
  • AI Studio - Multi-provider desktop IDE
  • Reins - Parameter tuning and reasoning model support
  • ConfiChat - Privacy-focused with optional encryption
  • LLocal.in - Electron desktop client
  • MindMac - AI chat client for Mac
  • Msty - Multi-model desktop client
  • BoltAI for Mac - AI chat client for Mac
  • IntelliBar - AI-powered assistant for macOS
  • Kerlig AI - AI writing assistant for macOS
  • Hillnote - Markdown-first AI workspace
  • Perfect Memory AI - Productivity AI personalized by screen and meeting history

Mobile

SwiftChat, Enchanted, Maid, Ollama App, Reins, and ConfiChat listed above also support mobile platforms.

Code Editors & Development

Libraries & SDKs

Frameworks & Agents

RAG & Knowledge Bases

  • RAGFlow - RAG engine based on deep document understanding
  • R2R - Open-source RAG engine
  • MaxKB - Ready-to-use RAG chatbot
  • Minima - On-premises or fully local RAG
  • Chipper - AI interface with Haystack RAG
  • ARGO - RAG and deep research on Mac/Windows/Linux
  • Archyve - RAG-enabling document library
  • Casibase -

Extension points exported contracts — how you extend this code

Tool (Interface)
Tool defines the interface for agent tools. [7 implementers]
x/tools/registry.go
Attention (Interface)
Attention is the contract for caches that back attention layers (KVCache, RotatingKVCache). [8 implementers]
x/mlxrunner/cache/kvcache.go
Block (Interface)
Block interface for both dense and MoE blocks [134 implementers]
x/models/glm4_moe_lite/glm4_moe_lite.go
Layer (Interface)
Layer is the interface for neural network layers with a Forward method. [134 implementers]
x/imagegen/nn/nn.go
Runner (Interface)
Runner executes an integration with the selected model and its resolved launch metadata. models is ordered with the prim [21 …
cmd/launch/launch.go
Tool (Interface)
Tool defines the interface that all tools must implement [7 implementers]
app/tools/tools.go
State (Interface)
(no doc) [50 implementers]
progress/progress.go
Parser (Interface)
(no doc) [19 implementers]
model/parsers/parsers.go

Core symbols most depended-on inside this repo

WriteString
called by 1267
server/internal/internal/syncs/line.go
Run
called by 1236
cmd/launch/launch.go
Contains
called by 1131
template/template.go
Error
called by 732
ml/device.go
String
called by 697
fs/config.go
Equal
called by 337
x/mlxrunner/mlx/ops.go
Close
called by 319
ml/backend.go
Close
called by 277
x/imagegen/server.go

Shape

Function 5,577
Method 3,415
Struct 1,125
Interface 156
TypeAlias 104
Class 56
FuncType 36

Languages

Go97%
TypeScript3%

Modules by API surface

x/imagegen/mlx/mlx.go205 symbols
ml/backend.go123 symbols
convert/sentencepiece/sentencepiece_model.pb.go119 symbols
cmd/launch/launch.go118 symbols
cmd/launch/launch_test.go110 symbols
llm/llama_server.go106 symbols
app/ui/app/codegen/gotypes.gen.ts93 symbols
api/types.go93 symbols
x/create/create.go81 symbols
cmd/launch/codex_app.go81 symbols
cmd/launch/integrations_test.go78 symbols
x/mlxrunner/cache_test.go77 symbols

Dependencies from manifests, versioned

github.com/TheTitanrain/w32v0.0.0-2018051700023 · 1×
github.com/agnivade/levenshteinv1.1.1 · 1×
github.com/apache/arrow/go/arrowv0.0.0-2021111216115 · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×
github.com/bahlo/generic-list-gov0.2.0 · 1×
github.com/bytedance/sonicv1.11.6 · 1×
github.com/bytedance/sonic/loaderv0.1.1 · 1×
github.com/charmbracelet/colorprofilev0.2.3-0.20250311203 · 1×
github.com/charmbracelet/lipglossv1.1.0 · 1×
github.com/charmbracelet/x/ansiv0.10.1 · 1×

For agents

$ claude mcp add ollama \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact