
~alter mcp-ollama
io.github.true-alter由 GitHub 账号 true-alter 发布v0.2.1更新于 Oct 25, 2026
Wraps local Ollama models so bulk generation runs on your own hardware, not a paid API.
发布方自己的服务:~Alter
概览
一个本地 MCP 服务器,把批量文本和代码生成交给本机的 Ollama 模型,而不是付费 API。
- 可以做什么
- 用自定义系统提示、温度和 token 上限进行自由文本生成,并把长文本总结为要点、段落或一句话,可聚焦某个主题。从文本中提取结构、分类、实体或标签,并按你提供的规范起草格式化文案。处理源代码:文档字符串、测试、解释、审查、类型标注、注释和重构建议。把 diff 转成提交信息、PR 描述、变更日志、摘要或影响说明,并执行机械式转换、格式转换和重命名。列出本机 Ollama 上的模型,按不带标签的名称拉取模型,并让视觉模型报告截图内容。
- 适用场景
- 适合已在本机运行 Ollama、希望把提交信息、文档字符串、打标签或摘要等常规工作放在自己硬件上完成而非走付费 API 的场景。也适合希望提示词和代码留在本机的会话。
- 运行要求
- 需要 Node 18 或更高版本,以及正在运行且至少已拉取一个模型的 Ollama(默认 hermes3:8b)。可选环境变量用于设置 Ollama 主机、默认模型、视觉模型以及是否允许非回环主机。
安装
在 SourceWeft 中
- 打开 控制台中的 ~alter mcp-ollama,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
~alter mcp-ollama
Hands the work that shouldn't leave your machine to the model already sitting on it
[~alter] [MCP] [Node] [Licence]
What it does · Install · The tools · Why this sits under ~alter
What is mcp-ollama?
An MCP server that hands work to Ollama on the same machine and passes the answer back. Ten tools over stdio. Your client calls one of them, Ollama does the generating on your own GPU, and nothing is charged to an API account.
Most of a working session is mechanical. Docstrings, commit messages, PR descriptions, changelog entries, classification and tagging, summarising a long file, converting one format into another, and having a small vision model look at a screenshot and report what's on screen. None of that needs a frontier model, and most of it gets one anyway, because that's what your client already has an API key for.
Hand it a staged diff and a commit message comes back. Hand it a chunk of source and you get a docstring, a test stub or a set of type annotations. All ten tools, and what each one takes, are in the tools.
The orchestrator decides what gets routed here. This server makes no judgement about what belongs local, and it doesn't stream, queue or cache. It keeps nothing between calls beyond a random identifier for the process it's running in.
It depends on two things and ships neither. Node 18 or newer runs it, and a
running Ollama with at least one model pulled does the actual generating. There
are no weights in this repository and no download of weights at install time.
The default model is hermes3:8b, which you can override per call or per
environment.
Why this sits under ~alter
You already decided that some work stays here. That's why there's a model on this disk, pulled once and left there, instead of an API key doing the same job from a datacentre you'll never see. ~alter starts from the same decision and points it at the other thing that leaves your machine constantly, which is the record of who you are.
Nothing on this machine answers that well today. Your account is a password at a login screen and a token in a config file, and each of those checks one moment and then stops looking. The years of work that actually say who you are sit outside anything either of them can see. An agent commits under your name now, in your editor, and when somebody asks later who allowed that, there's no answer written down anywhere.
~alter answers that with a handle. ~yourname, one of them, carrying a record
built out of work you actually did. A client speaking the protocol picks it up
without being configured again, much the way this server picks up a model you
pulled once and left on the disk.
You bought hardware to stop paying per call. On that record the per-call money runs the other way. The bare fact that you exist is free for anyone to check, depth past that is charged to whoever wants it, and you're the one who decides which readers reach which depth.
None of it is needed here. mcp-ollama has no login and asks for no handle, and
it behaves the same whether you hold one or not. There's one small wire between
them and it's 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 isn't installed no line
gets written at all.
I want to know more
Your friends do not know you from a login. Neither does your family, or the people you work with, or your sports team. They know who you are from how you have shown up, over years. You may look and sound nothing like you did ten years ago and it is still you.
Software still asks the narrow question. A password at the login screen. A token in the app. Each one checks whether this is the right person, right now, at this exact spot, and then looks away. Everything in between is invisible to it, and that is almost all of your life. The AI tools made it worse, because one of them writes in your name now, and when somebody asks who allowed it, there is no answer anywhere on this machine.
One name, and the record under it is yours. ~yourname works at every tool that speaks the protocol, so nothing is set up twice and there is no key to paste, at any point. What is in the record was read from what you did, not typed into a box by you or guessed at by a model. You can cut off access to any of it with one command. No form, no review.
Being read pays you. Anyone can check for free that your handle exists. Reading further, past the fact of you, costs the reader money, that money goes to you, and you decide who gets to read what. Collectives hold a record on the same terms, because it is one record at every scale and the same form holds you, your team, and your country. A union, a club, a trade body, or a group of people who have never met can vouch for their own members and be read the same way you are.
Threads are how you get somewhere. A thread is something you are working towards. You take one on yourself, or ~Alter plants one from what it can already see, or a collective confers one on you. What gets read is the trail you leave while you are doing it, never a certificate at the end.
All of that is the short version of an argument set out properly, in eight chapters at truealter.com/origin. Its seventy-six predictions were each written so the data could come back and say no. Five of them did, and those five are still published alongside the rest.
I want to check it myself
None of it needs taking on trust. Hand this to the AI you already use and let it take you through in your own words.
The ~alter command line is where a person meets ~alter, and this isn't that.
mcp-ollama has no command of its own worth typing and never asks you to log
in to anything. It's a process your MCP client starts and stops, and it
happens to be maintained by the same people.
Install
That puts one command on your PATH, mcp-ollama, which is the process your
client launches. The package ships the build already done, so there is no
compile step and no toolchain to have installed first. CI builds it against
Node 18, 20 and 22 before publish, so anything in that range is known to work
at runtime.
If you would rather install nothing at all, npx -y @truealter/mcp-ollama
fetches it on first use and runs the same process. That is the form used in
the client configuration below.
The scoped name is the one to type. The unscoped mcp-ollama on the public
registry belongs to an unrelated publisher and is not this package.
Nothing is installed as a service and nothing runs in the background. Your client starts the process when it needs it and stops it when it is done.
Routing your first job
1. Pull the model it reaches for by default
That's the default this server reaches for when a tool call doesn't name a model. It's quick and it's honest at classification, tagging and short generations. Heavier models are worth having for code work, and choosing a model covers when to bother.
2. Register the server with your client
If you installed globally, -- mcp-ollama works just as well and skips the
fetch. Cursor, Cline and anything else MCP-aware take the same shape in their
own config. The client launches the process; you never run it by hand except
to debug, and if you do, it sits there waiting on stdin, which is correct
rather than broken.
3. Ask your client what is on the host
Say that to your client in whatever words you like. It resolves to
local_models, which reads Ollama's tag list and reports each model's size,
parameter count, quantisation and family. If what you just pulled comes back,
the wire is good end to end.
4. Hand it a diff and ask for a commit message
Hand that output to your client and ask for a commit message. It routes to
local_diff with commit-message, which prompts for imperative mood, a subject
under 72 characters and a body explaining why rather than what. Nothing about
that needed a frontier model, and now it doesn't use one.
The tools
Ten of them, and the full schemas come over MCP introspection, so any MCP-aware client enumerates them without being told.
Two take a max_tokens argument. local_generate defaults to 2048 and
local_summarize to 1024. The rest set their own ceiling in code, 4096 for
local_code and local_transform, 2048 for local_analyze and most of
local_diff, 512 for a commit message, 1024 for local_draft. If output comes
back cut short on one of those, split the input rather than hunting for a
parameter that isn't there. Temperature is exposed on local_generate only.
local_vision is the odd one and worth a note. It reads pixels and reports what
is on screen, whether the main content area holds real data or an error, which
regions exist, what text is clipped or unreadable. It deliberately doesn't rank
severity or approve anything, because a small vision model reads a render well
and judges it badly. Feed it near full resolution, because below about 1280px
wide it starts inventing data that isn't there.
Choosing a model
Any call can name its own model and the environment default only applies when
it doesn't, so one server handles a mixed workload without being reconfigured.
Run local_models at the start of a session on a host you don't know.
Running it in Docker
No image is published anywhere, so every path below starts with a build from this repository.
The Dockerfile builds on node:20-alpine and already sets OLLAMA_HOST to
http://host.docker.internal:11434, so the container reaches Ollama on the host
rather than looking for it inside itself. That address is not loopback from the
server's point of view, so the loopback gate refuses it and the process exits at
startup unless MCP_OLLAMA_ALLOW_REMOTE=1 is set as well. The image does not
set that one, which is why every command here does.
The image also sets OLLAMA_MODEL to hermes3:8b. Add -e OLLAMA_MODEL=... to
route to a different default.
Docker, on macOS and Windows
Docker, on Linux
host.docker.internal does not resolve there by default, so map it to the
bridge gateway.
Docker Compose
docker-compose.yml ships in this repository, so there is nothing to write. It
carries an extra_hosts mapping that makes the same file work on Linux as well
as Docker Desktop.
This server speaks MCP over stdin and stdout, so it needs a client on the other
end of the pipe. docker compose up starts it with nothing attached and it sits
there doing nothing. Use run, with -T so Compose leaves the pipe alone.
Pointing a client at it
An MCP client launches the server itself, so hand it the whole command rather than a container that is already running.
When something doesn't work
Ollama error 404 on a tool call
That model isn't pulled. Run ollama pull <name> from a shell. local_pull
handles untagged names only, because its validator rejects the colon in a tag
like hermes3:8b.
fetch failed, or connection refused
Ollama isn't running, or OLLAMA_HOST points at the wrong place. Check with
curl $OLLAMA_HOST/api/tags. Inside a container, localhost is the container
itself.
OLLAMA_HOST must be loopback, and the process dies immediately
That's the gate doing its job. Point it back at localhost, or set
MCP_OLLAMA_ALLOW_REMOTE=1 if you genuinely meant a remote host.
Calls feel slow
A cold model has to load first, and everything after that in the same Ollama
process is much faster. If the model is larger than your VRAM, Ollama spills
to CPU, and ollama ps will tell you so.
Vision calls balloon memory or crawl
local_vision caps context at 8192 and holds the model for 30 minutes on
purpose. A 32K context plus one image pushes past 23GB on a 7900-class card
and spills to CPU, which is where the cap came from.
Output stops early
See the token ceilings under the tools. Most tools don't take
max_tokens.
What this server does and doesn't do on your machine
It makes no network call other than to the configured OLLAMA_HOST, and by
default that host has to be localhost, 127.0.0.1 or ::1. A non-loopback
value throws at startup rather than quietly sending your prompts somewhere else,
and getting past that takes a deliberate MCP_OLLAMA_ALLOW_REMOTE=1. Point it
at a remote Ollama on purpose and that endpoint's posture becomes yours.
There's no telemetry, no analytics, no auto-update check and no model weights in
the package. Tool inputs go to Ollama's HTTP API as given and the response comes
straight back. Model names passed to local_pull are validated against
^[a-z0-9][a-z0-9._/-]{0,127}$ before they reach the registry endpoint, so a
caller-supplied string can't wander off that path.
One local write is worth knowing about. If
~/.local/share/alter-runtime/lib/substrate-emit.sh exists, each generation
appends a row to ~/.local/share/alter-runtime/token-burn.jsonl recording the
tool, the model and the token counts. It's fire and forget, it fails silently, it
never touches the tool result, and if that helper isn't installed nothing is
written.
To report a security issue, see SECURITY.md.
The protocols underneath it
The record formats are open Internet-Drafts, so somebody else's implementation reads and writes the same records this one does without asking us. These are the drafts those formats are specified by. This server does not implement them itself; it runs beside the components that do.
Eighteen drafts make up the whole stack. The rest are on the IETF datatracker.
The rest of it
One identity rail, several ways in.
Documentation is at truealter.com/docs.
Bug reports and small patches are welcome, see CONTRIBUTING.md. A report is most useful with the tool you called, the client you called it from, the model you routed to, the full error, and your Node and Ollama versions. For a larger design change, open an issue first so we can agree the scope before you spend time on it.
mcp-ollama is small and stays that way. Routing work to a local Ollama process
is the whole brief.
Apache 2.0. See LICENSE for the full text. Copyright 2026 Alter Meridian Pty Ltd (ABN 54 696 662 049).
~alter is identity infrastructure. Your name is ~yourname and claiming one is free.
来源:README.md,提交 22d7770
工具
0版本历史
1- v0.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分