Learning resourcesReviewed · Ollama

Ollama guide: running Claude Code with local and cloud models

This is Ollama's documentation page for pointing Anthropic's Claude Code terminal coding assistant at models served by Ollama, written for developers who want to use local or Ollama-hosted cloud models, and its main catch is that results and feature support depend on the model you pick and some hosted tools are not fully supported. It covers a one-command launcher (ollama launch claude), a non-interactive mode for scripts and CI, a direct connection to Ollama's cloud with an API key, a manual local setup with environment variables, scheduled /loop prompts and a Telegram channel option.

Researched 14 Nov 2026

In short.

This is Ollama's documentation page for running Anthropic's Claude Code coding assistant against models served through Ollama. It is aimed at developers who want local or Ollama-hosted cloud models behind Claude Code. Its main catch is that behaviour depends on the chosen model and some hosted features are not fully supported. The page documents four routes: the ollama launch claude launcher, a non-interactive --yes mode for scripts and CI, a direct connection to [https://ollama.com] with an API key, and a manual setup that uses environment variables to point Claude Code at [http://localhost:11434]. It also lists capabilities (chat, command execution, tool calling, file edits, subagents, web search, web fetch, vision, thinking), recommends a 64k or larger context window for bigger repositories, and describes /loop scheduled prompts and a Telegram channel. The page does not state pricing, licence terms, minimum versions, model quality or data-handling terms. This report is based only on reading this one page, and none of its commands were run.

Researched and written by an AI model and checked by a second AI model. How it works

The reviewed scope is the complete text of the single page at [https://docs.ollama.com/integrations/claude-code.md], captured as selected-page.txt. Linked pages were excluded and not read: the Claude Code overview and permissions pages, Ollama's cloud model search, context length, web search, the API quickstart, Anthropic compatibility, the Telegram plugin repository and the documentation index. No commands, installers, models, plugins or cloud endpoints were run or contacted, so behaviour, performance, compatibility and cost are unverified. The page carries no licence notice, so no files are offered for distribution.

The overview

What this resource is

The resource is a single page in Ollama's documentation, titled Claude Code, in the integrations section at [https://docs.ollama.com/integrations/claude-code.md]. It explains how to use Claude Code with models served by Ollama. The page describes Claude Code as a tool that reads your codebase, edits files and runs commands.

The page states that Ollama connects Claude Code to local and cloud models through its Anthropic-compatible API. The page is a how-to guide, not software you install. It does document a launcher command (ollama launch claude) that is part of Ollama. The page names no author, version or date.

Overall assessment

The page is a compact, practical setup reference. It gives copy-ready commands for four routes, a capability list, a context-length note and two caveats. First, hosted WebSearch and advanced tool controls are not fully supported on the direct cloud route. Second, Claude Code settings can override shell variables.

It says little about what a careful adopter would want to know before relying on it: which models work well with Claude Code's tool use, the minimum Ollama version for the launcher, what cloud usage costs, and how cloud requests are handled. This page leaves all of those unknown. Nothing was run, so this report cannot confirm that any command works as written.

Who it is for

It suits developers who already use Claude Code in a terminal, or want to try it, and want to swap in models available through Ollama. That includes people who prefer local models on their own machine and people who want larger cloud-hosted models. The page says cloud models let you use larger models without downloading them.

The non-interactive section is for people who script Claude Code or run it in Docker or CI. The Telegram and /loop sections are for people who want a longer-running or remotely driven session. Complete beginners may find the environment-variable steps and the permission-skipping warning demanding, because the page assumes you are comfortable with a shell and already know Claude Code.

What it lets you do

The page lists these capabilities: chat (ask questions about a repository or task), command line (run commands under Claude Code's permission flow), tool calling with compatible models, file edits (read and edit files in your project), subagents (split work across tasks), web search through Ollama, web fetch (fetch and summarize web pages), vision (send images and screenshots) and thinking controls with compatible models.

The page also documents three further features. The first is a non-interactive mode. The second is scheduled tasks: /loop followed by an interval and a prompt or slash command, with examples such as checking open pull requests every 30 minutes or triaging new GitHub issues every 15 minutes. The third is a Telegram channel that connects a bot to a Claude Code session.

The page does not say how well each capability works with each model. Several capabilities are marked as needing compatible models. The page supplies example model names but no capability-by-model matrix.

Using it

What you need

Requirements differ by route. Manual local setup: the first step on the page is installing Claude Code, with install commands for macOS, Linux and Windows. The environment variables then point Claude Code at the local address [http://localhost:11434], where it expects Ollama's API. The page gives no steps for installing or starting Ollama on this route.

Direct cloud route: the page says to install Claude Code and put an Ollama API key in OLLAMA_API_KEY. It states that no Ollama installation is required. Launcher route: the page shows only the ollama launch claude command and its flags. It does not say whether Claude Code must already be installed or whether an Ollama service must already be running. With --yes, the launcher pulls the model when needed and requires --model.

For local models, the page says to choose a model and set a context window of 64k or larger. It notes that larger repositories need a context length of 64k or higher. It links to a separate context-length page, which was not reviewed. For the direct cloud route, the page says to choose a cloud model that supports tools. For the Telegram option you need the Telegram plugin from the claude-plugins-official repository and a bot created with @BotFather.

Not stated: minimum Ollama or Claude Code versions, hardware needs for local models, which operating systems the launcher supports (the Claude Code install commands cover macOS, Linux and Windows), and whether Claude Code itself needs an account on these routes.

How it works

According to the page, Ollama exposes an Anthropic-compatible API and Claude Code is pointed at it. The manual and direct routes do this with three environment variables. ANTHROPIC_BASE_URL is set to [http://localhost:11434] for local use or [https://ollama.com] for cloud use. ANTHROPIC_AUTH_TOKEN is set to a placeholder (ollama) or the real API key. ANTHROPIC_API_KEY is set to an empty string. The page says to use ANTHROPIC_AUTH_TOKEN for bearer authentication.

The page says ollama launch claude launches Claude Code with Ollama, but it does not say exactly what the command configures internally. With --yes the launcher skips selectors, pulls the model when needed and requires --model. Everything after -- is passed directly to Claude Code. Details of the compatibility layer are on a separate Anthropic compatibility page that was not reviewed. Tool calling and thinking depend on the model. The page supplies example model names but no capability-by-model matrix.

In its direct-cloud section, the page says hosted WebSearch and advanced tool controls are not fully supported. Separately, it says Ollama's web search API can be used from Claude Code and links to its own setup page. The page does not present that API as a replacement for the unsupported hosted WebSearch functionality.

Setup routes

Launcher: run ollama launch claude. The page gives no further steps. Model selection happens through selectors that the page does not describe.

Direct to Ollama's cloud: install Claude Code and set OLLAMA_API_KEY. Then, in Bash or Zsh, run claude with ANTHROPIC_BASE_URL=https://ollama.com, ANTHROPIC_AUTH_TOKEN="$OLLAMA_API_KEY" and ANTHROPIC_API_KEY="", choosing a cloud model that supports tools. The page warns that Claude settings can override shell variables. Check the base URL and credentials in those settings, then run /status to verify the connection.

Manual local: install Claude Code with curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux, or irm https://claude.ai/install.ps1 | iex on Windows. Then export ANTHROPIC_AUTH_TOKEN=ollama, ANTHROPIC_API_KEY="" and ANTHROPIC_BASE_URL=http://localhost:11434, and run claude --model followed by a model name. The install one-liners download a script from [https://claude.ai/install.sh] or [https://claude.ai/install.ps1] and run it straight away. If you prefer to inspect scripts first, do so before piping them to a shell.

None of these steps were run for this report.

Worked example from the page

The page's non-interactive example is: ollama launch claude --model gemma4:cloud --yes -- -p "how does this repository work?". As the page describes it, --model names the model and --yes skips selectors and pulls the model if needed. The double dash ends Ollama's arguments, and everything after it, here -p "how does this repository work?", is passed directly to Claude Code. The page does not explain what -p does. It presents this mode for scripts, Docker or CI.

A scheduled example is /loop 30m Check my open PRs and summarize their status, typed inside Claude Code. The page gives the general form as /loop <interval> <prompt or /command>.

A Telegram example is ollama launch claude -- --channels plugin:telegram@claude-plugins-official. The page notes that Claude Code asks for permission on most actions. To let the bot work autonomously, it suggests configuring permission rules or passing --dangerously-skip-permissions in an isolated environment. These examples were not run. The model names are as printed on the page, and whether they are currently available is not confirmed.

Assessment & evidence

Limitations and risks

Limits stated on the page: hosted WebSearch and advanced tool controls are not fully supported on the direct cloud route. Basic chat and file edits work with compatible models. Tool calling and thinking controls need compatible models. Larger repositories need a context length of 64k or higher. Claude settings can override shell variables.

Relevant points the page does not cover: how closely non-Anthropic models follow Claude Code's tool-use conventions, minimum versions and rate limits. The cloud route connects to Ollama's cloud endpoint. The page does not specify which project contents are sent or how requests are retained or handled, so check Ollama's terms before sending proprietary code.

Safety: Claude Code can run commands and edit files. The page itself places --dangerously-skip-permissions in the context of an isolated environment. The Telegram channel lets a chat interface drive a session that can act on your project, so permission rules matter. The install commands pipe a remote script into a shell.

Why this assessment

This report contains four kinds of statement. Documented facts come from the page: the commands, flags, environment variables, capability list, context-length note and stated caveats. Assessment judgments are interpretations of that content, such as calling the page a usable setup reference or saying beginners may find it demanding. The page offers no benchmarks, comparisons or test results, so the report makes no claims about model quality, speed, cost or reliability.

Recommendations are suggestions, not page content. Examples are trying the setup on a small, non-sensitive repository and reviewing install scripts before running them. Unknowns are things the page does not address: pricing, licences, minimum versions, data handling, hardware needs and what ollama launch configures internally. These are labelled unknown.

Alternatives and related options

The page shows several routes to the same goal. The Ollama launcher works with local models and also with cloud models, as its gemma4:cloud example shows. A manual setup points Claude Code at a local Ollama address. A direct connection to Ollama's cloud works without installing Ollama, though Claude Code must still be installed. The page does not cover other ways of connecting Claude Code to models, or other terminal coding assistants, and no comparison was assessed.

For web search, the page presents Ollama's web search API as a separately documented option for use from Claude Code, with setup on a linked page that was not read. The page also says hosted WebSearch is not fully supported on the direct cloud route. It does not say that Ollama's web search API replaces that hosted functionality.

Evidence base

The evidence is the captured text of the single original page at [https://docs.ollama.com/integrations/claude-code.md], captured on 14 November 2026. Documented facts in this report come from that page. Assessment judgments and suggested next steps are interpretations and recommendations based on it. Topics the page does not cover are marked unknown.

The page begins with a note pointing to a documentation index at [https://docs.ollama.com/llms.txt]. Neither that index nor any other linked page was read. No commands were run, no installation was attempted and no outside sources were consulted. The evidence therefore shows what the page says, not whether its instructions work.

Access & freshness

Costs

The page states no prices. It does not say whether Ollama cloud models, the Ollama API key, web search or web fetch are free, limited or paid. It also does not state the cost of using Claude Code itself, or whether the routes described need an Anthropic account or subscription.

The page does not specify local hardware requirements, memory requirements or their costs. It recommends a context window of 64k or larger for bigger repositories but gives no hardware figures.

Rights and licence

The captured page contains no licence statement, copyright notice or reuse terms for the documentation text. The page does not give the licences of Ollama, Claude Code, the Telegram plugin or the models it names, so they are unknown from this evidence. The page also supplies no terms of service or usage conditions for Ollama's cloud service, the Ollama API key or the linked models, so any such terms remain unknown from this evidence.

Freshness

The page was captured on 14 November 2026. It shows no publication date, last-updated date or version number, so the text alone does not show how current it is. The examples use specific model names (gemma4:cloud, glm-5.3-flash, kimi-k2.7-code:cloud, qwen3.5), and whether those exist or are recommended today was not checked. Command flags, plugin names and the Anthropic compatibility behaviour may change. Compare against the live Ollama and Claude Code documentation before relying on them.

Suggested next steps

If you want to try it, start with the manual local route or the launcher on a small, non-sensitive repository. Set a context window of 64k or larger and confirm the connection with /status. Check that your chosen model supports tools before expecting file edits or command use to work.

Before using the cloud route with real code, read Ollama's pricing and data-handling terms, which this page does not provide. Keep Claude Code's normal permission prompts on, and use --dangerously-skip-permissions only in an isolated environment, as the page advises. If you usually review install scripts, do so before piping this one to a shell. The linked context-length, web search and Anthropic compatibility pages cover details this page leaves out.

Evidence for this report

selected-page.txtselected · checked 2026-11-14