Yes, you can use Ollama models in the Claude Desktop app by utilizing a Model Context Protocol (MCP) server that bridges between the two systems. This integration allows you to leverage locally running Ollama models directly within the Claude Desktop interface.
How It Works
The integration works through MCP (Model Context Protocol), which allows Claude Desktop to communicate with Ollama models running on your local machine. Several MCP server implementations exist specifically for this purpose:
-
Ollama MCP Server (@rawveg/ollama-mcp): This is a dedicated MCP server that connects Claude Desktop to Ollama, allowing you to access your local Ollama models directly from Claude Desktop[1][3].
-
MCP Ollama Link: Another implementation that allows querying Ollama models directly from Claude with performance tracking and support for different model selection[2].
Features You Get
When connecting Ollama to Claude Desktop via an MCP server, you can:
- List and access all your locally available Ollama models
- Pull new models from Ollama directly from Claude Desktop
- Chat with these models using Ollama's chat API
- Get detailed information about the models
- Benefit from automatic port management[3]
Setting Up Ollama MCP Server
Here's how to set up the Ollama MCP Server for Claude Desktop:
-
Prerequisites:
- Node.js (v16 or higher)
- npm
- Ollama installed and running locally on your machine
-
Installation methods:
A. Via Smithery:
npx -y @smithery/cli install @rawveg/ollama-mcp --client claude
B. Manual installation:
First, install the server globally:
npm install -g @rawveg/ollama-mcp
Then, update Claude Desktop's configuration file by adding this to your claude_desktop_config.json:
{
"mcpServers": {
"@rawveg/ollama-mcp": {
"command": "npx",
"args": [ "-y", "@rawveg/ollama-mcp" ]
}
}
}
The configuration file is located at:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json[3]
-
Configuration options:
- You can customize the port (default: 3456) using the PORT environment variable
- You can specify the Ollama API endpoint (default: http://localhost:11434)[3]
Alternatives
If you're looking for more integrated AI coding solutions:
-
Claude Dev with Ollama: Extensions like Claude Dev for VS Code can be configured to work with local Ollama models, providing AI coding assistance without relying solely on cloud models[5][8].
-
MCP-LLM Bridge: Some users have created bridges that translate between MCP's tool interface and OpenAI's function calling spec, working with Ollama and other OpenAI-compatible endpoints[6].
By setting up this integration, you can save on API costs while still benefiting from Claude Desktop's interface, with the added advantage of keeping your data local when using Ollama models.