Sign inSign up

wuodan/mcp-ollama

By wuodan

•Updated 12 months ago

Query model running with Ollama from within Claude Desktop or other MCP clients

Image
Machine learning & AI
Developer tools
0

1.4K

wuodan/mcp-ollama repository overview

⁠🧠 Configure MCP Server

Add this to your MCP server configuration:

{
  "mcpServers": {
    "ollama": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "OLLAMA_HOST=http://OLLAMA-IP:PORT",
        "wuodan/mcp-ollama:latest"
      ]
    }
  }
}

⁠🐋 If your Ollama is also running in Docker

Use the container name of your Ollama service as hostname (e.g., ollama) so both containers communicate over Docker’s internal network:

{
  "mcpServers": {
    "ollama": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--network", "ollama-net",
        "-e", "OLLAMA_HOST=http://ollama:11434",
        "wuodan/mcp-ollama:latest"
      ]
    }
  }
}

Make sure both containers share the same Docker network:

docker network create ollama-net
docker run -d --network ollama-net --name ollama ollama/ollama

⁠💻 If your Ollama runs directly on the Docker host

This configuration works on Linux, Windows, macOS, and WSL2 — no changes needed:

{
  "mcpServers": {
    "ollama": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--add-host=host.docker.internal:host-gateway",
        "-e", "OLLAMA_HOST=http://host.docker.internal:11434",
        "wuodan/mcp-ollama:latest"
      ]
    }
  }
}

Tag summary

Content type

Image

Digest

sha256:495d77ee8…

Size

29.4 MB

Last updated

12 months ago

docker pull wuodan/mcp-ollama