Skip to main content
Glama
shenmali

ollama-mcp

by shenmali

ollama-mcp

MCP server for delegating coding tasks to local Ollama models.

Setup

cd ollama-mcp
npm install
npm run build

Usage

OpenCode

Already configured in opencode.json. Tools are available as:

  • ollama_list_models — List available Ollama models

  • ollama_execute_task — Delegate a task to an Ollama model

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ollama": {
      "command": "node",
      "args": ["/absolute/path/to/ollama-mcp/dist/index.js"]
    }
  }
}

Codex

Add to config:

{
  "mcp": {
    "ollama": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/ollama-mcp/dist/index.js"]
    }
  }
}

Environment Variables

Variable

Default

Description

OLLAMA_HOST

http://localhost:11434

Ollama server address

OLLAMA_TIMEOUT_MS

120000

Request timeout in ms

File Writing Protocol

Models can request file writes using this marker format:

{file_write: {"path": "src/file.ts", "content": "file content here"}}

The server parses these markers and writes files to the working directory. Path traversal outside the working directory is blocked.

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shenmali/ollama-mcp-subagent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server