ollama-mcp
by rawveg·★ 160·综合分 47
TypeScript MCP 服务器,提供完整的 Ollama SDK 和 14 个工具,实现本地 LLM 集成。
概述
ollama-mcp 是为 Ollama 设计的完整模型上下文协议实现,提供本地 LLM 模型与兼容 MCP 的应用(如 Claude Desktop 和 Cline)之间的无缝集成。它包含 14 个工具,涵盖模型管理、操作和网络搜索功能,支持本地和云部署两种模式。该服务器采用热交换架构,使用 TypeScript 和 Zod 验证,测试覆盖率达到 96%。
试试问 AI
装完之后,这里有 7 个你可以让 AI 做的事:
什么时候选它
如果您想将 Ollama 的本地 LLM 能力与 Claude Desktop 或 Cline 集成,特别是需要通过单个界面同时实现模型操作和网络搜索功能时,选择此 MCP 服务器。
什么时候不要选它
如果您寻找开源许可(AGPL-3.0 可能带来合规问题)或需要超出 Ollama 原生支持的广泛工具调用功能,请避免使用此服务器。
此 server 暴露的工具
从 README 抽取出 12 个工具ollama_listList all available local models
ollama_showGet detailed information about a specific model
ollama_pullDownload models from Ollama library
ollama_pushPush models to Ollama library
ollama_copyCreate a copy of an existing model
ollama_deleteRemove models from local storage
ollama_createCreate custom models from Modelfile
ollama_psList currently running models
ollama_generateGenerate text completions
ollama_chatInteractive chat with models (supports tools/functions)
ollama_embedGenerate embeddings for text
ollama_web_searchSearch the web with customizable result limits
可对比工具
安装
使用 Claude Desktop 快速开始
添加到 Claude Desktop 配置(macOS 上的 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ollama": {
"command": "npx",
"args": ["-y", "ollama-mcp"]
}
}
}全局安装
npm install -g ollama-mcp用于 Cline (VS Code)
添加到 Cline MCP 设置(cline_mcp_settings.json):
{
"mcpServers": {
"ollama": {
"command": "npx",
"args": ["-y", "ollama-mcp"]
}
}
}FAQ
- 这个服务器是否支持 Ollama Cloud?
- 是的,它同时支持本地 Ollama 实例和 Ollama Cloud。设置 OLLAMA_HOST 为 'https://ollama.com' 并提供 OLLAMA_API_KEY 即可访问云服务。
- 提供多少个工具?
- 服务器提供 14 个全面工具,涵盖模型管理(拉取、推送、复制、删除、创建)、模型操作(聊天、生成、嵌入)以及网络工具(网络搜索、网络抓取),后者需要云 API 密钥。
ollama-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。