Open-source Claude alternatives
Claude's models and apps are closed. These open-weight models and open-source apps can stand in, and you can run them on your own computer or with your own API keys.
Checked . Every fact about another product links to its source.
Is Claude itself open source? No: Anthropic does not publish Claude's weights. What is open and what is not
Looking for Claude for Open Source? That is Anthropic's program for open-source maintainers, not an open-source Claude. Anthropic's page
Open-weight models you can run instead of Claude
Open weights means you can download the model and run it yourself. It does not always mean open source: several of these use custom licences with conditions on attribution, revenue, or hosting. Read the licence before you build a product on one.
| Model | Apache 2.0 or MIT? | With Ollama |
|---|---|---|
| Llama 4 and Muse Spark Open | No, custom | Local |
| Qwen3.8 | Yes | Local |
| DeepSeek V4 | Yes | Cloud only |
| Mistral Small 4, Medium 3.5, and Large 4 | Yes | Local |
| gpt-oss | Yes | Local |
| Kimi K3 and K2.6 | No, custom | Cloud only |
| GLM-5 | Yes | Cloud only |
| Gemma 4 | Yes | Local |
Llama 4 and Muse Spark Open
Meta
Llama 4 Scout (109B total, 17B active), Llama 4 Maverick (400B total, 17B active), and Muse Spark Open (816B total, 42B active)
Llama 4 takes text and images, and Meta lists assistant-style chat and visual reasoning as its intended uses. Scout has a 10M-token context window and Maverick 1M. Muse Spark Open, released in October 2026, is built for coding and agentic work, with a 1M-token context. Downloads on Hugging Face need you to accept Meta's terms first.
Licence: Llama 4 Community License; Muse Model LicenseBoth licences are custom. Llama 4: companies with more than 700 million monthly active users need a separate licence, products must show "Built with Llama", and the multimodal rights are not granted to people or companies based in the EU. Muse Spark Open: products must credit "Built with Muse Spark Open", and a Model-as-a-Service business with more than $20 million in yearly revenue needs an agreement with Meta.
ollama pull llama4:scout67 GB download. Muse Spark Open is cloud only on Ollama.
Sources:Llama 4 model cardLlama 4 licenceLlama 4 use policyLlama 4 Scout on Hugging FaceMuse Spark Open model cardLlama 4 on Ollama
Qwen3.8
Alibaba's Qwen team
Qwen3.8-27B, plus the larger Qwen3.8-Flash-Next and Qwen3.8-2.4T-A95B
Qwen lists coding, professional work, research, and long-horizon agentic tasks. Qwen3.8-27B is a dense model that also understands images and video, with a 262,144-token native context. Qwen's own hosted API is Qwen Cloud.
Licence: Apache 2.0 (27B); Qwen Community License 1.0 (Flash-Next); Qwen3.8-Max License (2.4T-A95B)The larger models use custom licences. Flash-Next needs a separate licence from Qwen for any Model-as-a-Service or AI coding or office assistant business, and 2.4T-A95B needs one when that business has more than $50 million in yearly revenue.
ollama pull qwen3.8:27b18 GB download.
Sources:Qwen3.8-27B model cardFlash-Next licence2.4T-A95B licenceQwen CloudQwen3.8 on Ollama
DeepSeek V4
DeepSeek
DeepSeek-V4.1-Flash and DeepSeek-V4-Pro
V4.1-Flash is a multimodal mixture-of-experts model with 552B backbone parameters and contexts of up to 1M tokens. DeepSeek describes the V4-Pro release from August 2026 as having greatly enhanced agentic capabilities. DeepSeek also sells V4 access through its own API.
Licence: MIT, for the code and the weights
ollama run deepseek-v4.1-flash:cloudCloud only on Ollama: it runs on Ollama's servers.
Sources:V4.1-Flash model cardV4-Pro model cardDeepSeek APIV4.1-Flash on Ollama
Mistral Small 4, Medium 3.5, and Large 4
Mistral AI
Mistral Small 4 (119B total, 6.5B active), Mistral Medium 3.5 (128B), and Mistral Large 4 (1T)
Small 4 combines instruction, reasoning, and coding in one model, reads images, and has a 256k context. Mistral says Large 4 does especially well on cybersecurity, finance, and law work, and is fluent in 160+ languages. Large 4 is also on Mistral's API.
Licence: Apache 2.0 (Small 4); Modified MIT (Medium 3.5); Mistral Ecosystem Open-Weight License (Large 4)Medium 3.5 grants no rights to a company with more than $20 million in monthly revenue. Large 4 needs a commercial licence from Mistral for any Model-as-a-Service business.
ollama pull mistral-small3.215 GB download of Mistral Small 3.2, the previous Apache 2.0 Small model. Small 4 is not in Ollama's library, and Large 4 is cloud only.
Sources:Small 4 model cardMedium 3.5 licenceLarge 4 model cardSmall 3.2 model cardSmall 3.2 on Ollama
gpt-oss
OpenAI
gpt-oss-120b (117B total, 5.1B active) and gpt-oss-20b (21B total, 3.6B active)
OpenAI built them for reasoning and agentic tasks, with function calling, structured outputs, and adjustable reasoning effort. gpt-oss-120b fits on one 80 GB GPU, and gpt-oss-20b runs within 16 GB of memory.
Licence: Apache 2.0
ollama pull gpt-oss:20b14 GB download. gpt-oss:120b is 65 GB.
Sources:gpt-oss-120b model cardOpenAI open modelsgpt-oss on Ollama
Kimi K3 and K2.6
Moonshot AI
Kimi K3 (2.8T total, 104B active), Kimi K3.1 Pro, and Kimi K2.6 (1T total, 32B active)
Moonshot built Kimi K3 for long-horizon coding, knowledge work, and reasoning. It reads text, images, and video, with a 1M-token context, and K3.1 Pro is post-trained from it. K2.6 targets long-horizon coding and agent swarms, with a 256K context. Moonshot also sells access through its Kimi API.
Licence: Kimi K3 License and Kimi K3.1 Pro License; Modified MIT (K2.6)All three ask products with more than 100 million monthly active users or $20 million in monthly revenue to show the model's name. The K3 licences also require an agreement with Moonshot AI for a Model-as-a-Service business with more than $20 million in yearly revenue.
ollama run kimi-k3:cloudCloud only on Ollama: it runs on Ollama's servers.
Sources:Kimi K3 model cardKimi K3 licenceKimi K2.6 model cardKimi APIKimi K3 on Ollama
GLM-5
Z.ai
GLM-5.2, GLM-5.3, and GLM-5.3-Flash (320B total, 18B active)
Z.ai calls GLM-5.2 its flagship for long-horizon tasks, with a 1M-token context and coding at several effort levels. GLM-5.3-Flash is the first natively multimodal model in the GLM-5 series. Z.ai also sells access through its API.
Licence: MIT (GLM-5.2 and GLM-5.3-Flash); GLM-5.3 License (GLM-5.3)The GLM-5.3 licence asks a Model-as-a-Service business with more than $10 billion in yearly revenue to pass a Z.ai security review first.
ollama run glm-5.2:cloudCloud only on Ollama: it runs on Ollama's servers.
Sources:GLM-5.2 model cardGLM-5.3-Flash model cardGLM-5.3 licenceZ.ai APIGLM-5.2 on Ollama
Gemma 4
Google DeepMind
Gemma 4 E2B, E4B, 12B, 26B A4B, and 31B
Google sized them for everything from phones and laptops (E2B, E4B) to GPUs and workstations (12B to 31B). It lists reasoning, coding, function calling, and image input, with up to 256K context.
Licence: Apache 2.0
ollama pull gemma46.6 to 9.5 GB download (E4B). gemma4:31b is 19 to 20 GB.
Sources:Gemma 4 31B model cardGemma 4 licenceGemma 4 on Ollama
Open-source apps that replace the Claude app
The model is half of it. These apps give you the chat window, files, and tools, on a model you choose. Each one is described from its own pages.
OpenWork
Open source
Desktop app for macOS, Windows, and Linux
The open-source alternative to Claude Cowork: an agent that works on the files in a folder you choose, with skills, MCP servers, and scheduled tasks. Use Claude with your own key, any of 50+ providers, or a local model through its built-in Ollama screen.
Licence: MIT (desktop app)
Pick it if: You want an agent that does work on your files, not only chat, on any model.
Open WebUI
Custom licence
Self-hosted web app, plus a desktop app
A self-hosted AI platform built to run fully offline. Connect local models through Ollama or any OpenAI-compatible API. Install it with pip or Docker, or use the desktop app for macOS, Windows, and Linux. Deployments with more than 50 users in 30 days must keep the Open WebUI branding unless they have permission or an enterprise licence.
Licence: Open WebUI License: BSD-3-Clause terms plus a branding clause
Pick it if: You want a ChatGPT-style web interface for Ollama that you host yourself.
LibreChat
Open source
Self-hosted web app
A self-hosted chat platform for many providers, including Anthropic, OpenAI, Google, Ollama, and any OpenAI-compatible API. It adds agents, MCP servers, skills, a code interpreter, and multi-user sign-in with OAuth2, LDAP, or email.
Licence: MIT
Pick it if: You want one shared chat app for a team, run on your own server.
Jan
Open source
Desktop app for Windows, macOS, and Linux
Downloads and runs models such as Llama, Gemma, Qwen, and gpt-oss from Hugging Face, fully offline if you want. It also connects to cloud providers, including Anthropic, supports MCP, and serves an OpenAI-compatible API on localhost:1337.
Licence: Apache 2.0
Pick it if: You want a ChatGPT-like desktop app that runs models offline.
Sources:Jan on GitHubJan licence
AnythingLLM
Open source
Desktop app, or a Docker server
Chat with your documents and run agents on local or cloud models, including Anthropic's. It has a built-in local model engine based on llama.cpp, MCP support, scheduled tasks, and multi-user permissions in the Docker version.
Licence: MIT
Pick it if: You mostly want to chat with a library of your own documents.
Sources:AnythingLLM on GitHub
LM Studio
Not open source
Desktop app for macOS, Windows, and Linux
Finds, downloads, and runs llama.cpp and MLX models, connects MCP servers, and serves OpenAI-compatible and Anthropic-compatible APIs for other apps. Running local models is free.
Licence: Free under LM Studio's app terms. Its lms command-line tool is MIT.
Pick it if: You want a polished app to download and serve local models, and do not need open source.
Sources:LM Studio docsLM Studio serverLM Studio pricingLM Studio app termslms on GitHub
Run a model on your computer with Ollama
Ollama is a free, MIT-licensed tool for macOS, Windows, and Linux that downloads open-weight models and runs them on your machine. Once a model is downloaded it needs no internet connection. Model names that end in :cloud run on Ollama's servers instead, and need an Ollama account.
Install Ollama
On macOS or Linux, run the install script. On Windows, download the installer from ollama.com.
curl -fsSL https://ollama.com/install.sh | shDownload a model
Pick one from the table above. gpt-oss:20b is a 14 GB download, and gemma4 is smaller.
ollama pull gpt-oss:20bTry it in the terminal
Send a prompt to check that the model works.
ollama run gpt-oss:20bUse it in an app
In OpenWork, open Settings › Ollama, pick the model, and click Add to workspace. Other apps can use Ollama's OpenAI-compatible API at http://localhost:11434/v1.
Sources:Ollama on GitHubOllama downloadOllama OpenAI compatibilityOllama cloud modelsOpenWork: use local models
Use an open model with your own API key
No GPU? The model makers sell API access, and so do routers that carry many models. OpenWork's provider list comes from the OpenCode model catalog, which includes DeepSeek, Moonshot AI, Z.AI, Mistral, Alibaba, OpenRouter, and Ollama Cloud.
Create an API key
With the model maker, such as DeepSeek, Moonshot AI for Kimi, Z.ai for GLM, or Mistral, or with a router such as OpenRouter.
Connect it
In OpenWork, open Settings › AI Providers › Connect provider, search for the provider, and paste the key.
Pick the model
Choose it in the chat's model picker. You can switch models for any chat, including back to Claude.
Sources:OpenCode providersmodels.dev catalogOpenWork: add a custom LLMOpenRouter models
Run a model on your own server
For a team, serve the weights on a GPU server with vLLM or SGLang, which the gpt-oss, Qwen, and Mistral model cards list, and point apps at the server's OpenAI-compatible API.
Serve the model
This is the command from the gpt-oss model card. Hugging Face's vLLM instructions for the model then call it at http://localhost:8000/v1.
vllm serve openai/gpt-oss-20bAdd it to OpenWork
Add the server to opencode.jsonc in your workspace folder, then run Reload OpenCode config.
{ "provider": { "my-server": { "npm": "@ai-sdk/openai-compatible", "name": "My server", "options": { "baseURL": "http://localhost:8000/v1" }, "models": { "openai/gpt-oss-20b": { "name": "gpt-oss-20b" } } } } }Share it with your team
Add the endpoint once in OpenWork Cloud as a custom provider, so nobody has to set it up by hand.
Sources:gpt-oss-20b model cardgpt-oss-20b with vLLMOpenWork: add a custom LLMOpenWork: share a provider
Frequently asked questions
- What are the open-source alternatives to Claude?
- For the model: open-weight models such as Llama 4, Qwen3.8, DeepSeek V4, Mistral Small 4, gpt-oss, Kimi K3, GLM-5.2, and Gemma 4. For the app: OpenWork, Open WebUI, LibreChat, Jan, and AnythingLLM. LM Studio is free but not open source.
- Is Claude open source?
- No. Anthropic does not publish Claude's model weights, and Claude Code's license reserves all rights. The Claude Agent SDK for Python and the Model Context Protocol are open source.
- Is there a free Claude alternative?
- Yes. Open-weight models cost nothing to run on your own hardware with Ollama, and OpenWork, Jan, Open WebUI, LibreChat, and AnythingLLM are free to download. Hosted APIs and Ollama's cloud models are billed by their providers.
- Are open-weight models open source?
- Not always. gpt-oss, Gemma 4, Qwen3.8-27B, and Mistral Small 4 use Apache 2.0, and DeepSeek V4, GLM-5.2, and GLM-5.3-Flash use MIT. Llama 4, Muse Spark Open, Kimi K3, and the larger Qwen and Mistral models use custom licences with conditions on attribution, revenue, or hosting.
- Can I run a Claude alternative offline?
- Yes. Download a model with Ollama, then use it from OpenWork, Jan, Open WebUI, or AnythingLLM. Once the model is downloaded, it needs no internet connection.
- Can I keep using Claude in an open-source app?
- Yes. OpenWork, LibreChat, Jan, and AnythingLLM can all use Anthropic's models with your own API key. In OpenWork you can switch any chat to an open model and back.
Run an open model on your own files.
OpenWork is free, open source, and works with Ollama, your own keys, or Claude.