home / mcp / ollama mcp server
Modern MCP server for Ollama – rebooted and actively maintained.
Configuration
View docs{
"mcpServers": {
"hyzhak-ollama-mcp-server": {
"command": "npx",
"args": [
"ollama-mcp-server"
],
"env": {
"OLLAMA_HOST": "http://127.0.0.1:11434"
}
}
}
}You connect Ollama’s local LLM capabilities to your MCP-powered apps, giving you full control over model execution, customization, and orchestration without leaving your local environment. This MCP server acts as a bridge, exposing Ollama’s features through familiar MCP tools so you can pull, run, chat, and manage models from your existing workflows.
Use your MCP client to pull models, run them with custom prompts, and access a chat completion API that resembles OpenAI-compatible endpoints. You can also create custom models from Modelfiles and pass images to supported vision/multimodal models. The server supports a think parameter for advanced reasoning when your chosen model provides it. Start by configuring the local MCP server so your client can communicate with Ollama, then leverage the standard MCP tool calls to perform each action.
# Prerequisites
- Install Ollama on your system
- Install Node.js (with npm and npx)
# Install the MCP server package and build
npm install
npm run build
# Run the MCP server (example setup shown below for Claude Desktop integration)
# The MCP server is started as a local process via npx ollama-mcp-server
```} ,{Configuring the client to talk to Ollama through MCP is done by pointing to the local Ollama MCP server entry you start. You can pull models from registries, run models with prompts, and use chat_completion to have interactive conversations. For vision models, you can provide images through the appropriate fields. If your model supports think, you can request step-by-step reasoning and view the included <think> blocks when available.
Both the run and chat_completion tools can accept think: true to request step-by-step reasoning from models that support it. When enabled, you may receive a detailed thought process prior to the final answer. Not all models provide this content.
You can create a custom model by providing a Modelfile and a name. This enables you to tailor model behavior and integrate specialized configurations directly through MCP.
Fetch and register a model from a registry so it becomes available for use by MCP tooling.
Execute a model with a given prompt and optional parameters. Returns the model’s final output after completion.
OpenAI-compatible chat interface that accepts system/user/assistant messages and optional think content.
Create a custom model from a Modelfile with a specified name to add to Ollama’s model catalog.