MCP.so
登录

MCP Ollama

@true-alter

基本信息

分类

AI 与智能体

许可证

Apache-2.0

传输方式

stdio

作者

true-alter

提交者

maxchop

关于 MCP Ollama

MCP server wrapping local Ollama models for Claude Code delegation

MCP Ollama 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

MCP Ollama 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is mcp-ollama?

mcp-ollama is an MCP server that wraps local Ollama models, allowing orchestrators like Claude Code or Cursor to offload simple tasks to a locally-running model instead of paying per token. It is plumbing. The orchestrator decides what to route locally, and the server exposes ten tools that pass the work straight to a local model.

How to use mcp-ollama?

Clone https://github.com/true-alter/mcp-ollama and build it, then point your MCP client at dist/index.js over stdio, using the Server configuration above. You need a running Ollama instance with at least one model pulled, default hermes3:8b. Set OLLAMA_HOST and OLLAMA_MODEL if yours differ. Tools are exposed automatically via MCP introspection.

Key features of mcp-ollama

  • Ten tools for generation, summarisation, code, diffs, and more
  • Talks only to Ollama on loopback, and refuses a non-loopback host unless you opt in explicitly
  • Override the model per tool call, or set OLLAMA_MODEL for the whole server
  • Ships no model weights and sends nothing off the machine
  • Keeps nothing between calls beyond a random identifier for the process it is running in
  • Runs in Docker against Ollama on the host, with one environment flag on macOS and Windows and an extra host mapping on Linux

Use cases of mcp-ollama

  • Route classification, one-liners, and tags to a fast 8B model instead of a frontier API
  • Generate commit messages, PR descriptions, and changelogs locally from diffs
  • Write docstrings, tests, or code reviews using a code-specialised Ollama model
  • Summarise long documents or analyse text against a specific question without API costs
  • Draft content in a given style, then refine it later with an external model

Tools

local_analyze, local_code, local_diff, local_draft, local_generate, local_models, local_pull, local_summarize, local_transform, local_vision

Why this sits under ~alter

You already decided some work stays on this machine. That is why there is a model on this disk instead of an API key doing the same job from a datacentre you will never see. ~alter starts from the same decision and points it at the other thing that leaves your machine constantly, the record of who you are.

There is one small wire between them and it is worth naming plainly. If the ~alter runtime happens to be installed on this machine, every local generation appends a single line to a file in your own home directory, recording that the work ran here at no API cost. That line never goes anywhere, and if the runtime is not installed no line gets written at all.

None of that is needed here. mcp-ollama has no login and asks for no handle, and it behaves the same whether you hold one or not. It is a process your MCP client starts and stops, and it happens to be maintained by the same people.

https://truealter.com

常见问题

1

What dependencies does mcp-ollama require?

Node 18+, a running Ollama instance (default `http://localhost:11434`), and at least one model pulled into Ollama.

2

Does mcp-ollama send my data anywhere?

No. The server makes no network calls beyond the configured `OLLAMA_HOST` endpoint, which it requires to be loopback unless you set `MCP_OLLAMA_ALLOW_REMOTE=1`. It ships no telemetry, no analytics and no auto-update pinger. There is one local write and it is worth naming here rather than leaving you to find it. If the ~alter runtime is installed on this machine, each generation appends a single line to a file in your own home directory recording that the work ran locally at no API cost. That line never leaves the machine, and with no runtime installed no line is written at all.

3

What transport does mcp-ollama use?

It uses stdio transport and is designed to be launched by MCP-aware clients such as Claude Code and Cursor. Running the binary directly is only useful for debugging.

4

Why are my tool outputs truncated?

Each tool has a default `max_tokens` of 2048. For longer generations, pass `max_tokens` explicitly in the tool call.

5

I get a 404 error when calling a tool.

The model you requested is not available on Ollama. Run `ollama pull <name>` or use the `local_pull` tool from your MCP client to pull it.

评论

AI 与智能体 分类下的更多 MCP 服务器