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

Tools

ollama_list_models

List available Ollama models.

ollama_execute_task

Delegate a coding task to an Ollama model. Returns output with change preview.

  • If changes are detected, requires_approval: true is returned

  • Review changes, then use ollama_write_files to apply

ollama_write_files

Write files from Ollama output. Use after reviewing changes.

ollama_preview_changes

Analyze text for file write markers and show change preview.

Usage

OpenCode

Add to opencode.json:

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

Claude Desktop

Add to claude_desktop_config.json:

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

Workflow

1. ollama_execute_task(task, model)  →  output + changes[]
2. Review changes
3. ollama_write_files(output)        →  files written

Environment Variables

Variable

Default

Description

OLLAMA_HOST

http://localhost:11434

Ollama server address

OLLAMA_TIMEOUT_MS

120000

Request timeout in ms

-
license - not tested
-
quality - not tested
B
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