Lets agents manage and run local Ollama models, including pulling, listing and chatting, through the Ollama API.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add ollama -- node /path/to/ollama-server/build/index.js~/.codex/config.toml
[mcp_servers.ollama]
command = "node"
args = ["/path/to/ollama-server/build/index.js"]
# codex mcp add ollama -- node /path/to/ollama-server/build/index.js~/.cursor/mcp.json
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"/path/to/ollama-server/build/index.js"
]
}
}
}.vscode/mcp.json
{
"servers": {
"ollama": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/ollama-server/build/index.js"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"/path/to/ollama-server/build/index.js"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"/path/to/ollama-server/build/index.js"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"/path/to/ollama-server/build/index.js"
]
}
}
}